TΓΌrkΓ§e | English
Bu proje, gΓΌvenlik odaklΔ± bir ΓΆΔrenci bilgi sistemi olarak geliΕtirilmiΕtir. Modern web uygulama mimarilerine uygun olarak tasarlanan sistem, JWT tabanlΔ± kimlik doΔrulama, rol tabanlΔ± yetkilendirme ve kapsamlΔ± gΓΌvenlik ΓΆnlemleriyle kurumsal kullanΔ±ma hazΔ±r bir platform sunmaktadΔ±r.
- JWT Token TabanlΔ± Kimlik DoΔrulama: Stateless authentication ile ΓΆlΓ§eklenebilir gΓΌvenlik
- Refresh Token MekanizmasΔ±: GΓΌvenli oturum yenileme ve uzun sΓΌreli eriΕim yΓΆnetimi
- Rol TabanlΔ± EriΕim KontrolΓΌ: Admin, DanΔ±Εman ve ΓΔrenci rolleri ile detaylΔ± yetki yΓΆnetimi
- Γzel Yetkilendirme Filtreleri: CustomAuth attribute ile granΓΌler eriΕim kontrolΓΌ
- BCrypt Hash AlgoritmasΔ±: EndΓΌstri standardΔ± parola Εifreleme
- GΓΌΓ§lΓΌ Parola PolitikalarΔ±: Minimum karmaΕΔ±klΔ±k gereksinimleri
- GΓΌvenli Parola SΔ±fΔ±rlama: Token tabanlΔ± sΔ±fΔ±rlama mekanizmasΔ± (15 dakika geΓ§erlilik)
- HttpOnly ve Secure Γerezler: XSS ve MITM saldΔ±rΔ±larΔ±na karΕΔ± koruma
- CSRF KorumasΔ±: Anti-forgery token implementasyonu
- Oturum Zaman AΕΔ±mΔ±: YapΔ±landΔ±rΔ±labilir token yaΕam sΓΌresi
- GΓΌvenli ΓΔ±kΔ±Ε: Refresh token'larΔ±n sunucu tarafΔ±nda iptal edilmesi
- Input Validasyonu: Model state validation ve form doΔrulama
- SQL Injection KorumasΔ±: Entity Framework ORM kullanΔ±mΔ±
- GΓΌvenli API Endpoint'leri: Yetkilendirme kontrollΓΌ REST servisleri
βββ OgrenciPortali (MVC Frontend) # KullanΔ±cΔ± ArayΓΌzΓΌ KatmanΔ±
β βββ Controllers/ # MVC Controllers
β βββ Views/ # Razor Views
β βββ Attributes/ # Custom Authorization
β βββ Utils/ # Helper Classes
β
βββ OgrenciPortalApi (Web API) # Δ°Ε MantΔ±ΔΔ± ve Veri KatmanΔ±
β βββ Controllers/ # API Controllers
β βββ Models/ # Entity Framework Models
β βββ Utils/ # JWT, Security Utilities
β βββ Areas/SwaggerUI/ # API Documentation
β
βββ Shared # Ortak BileΕenler KΓΌtΓΌphanesi
β βββ DTO/ # Data Transfer Objects
β βββ Enums/ # Sistem Enums
β βββ Constants/ # Sabit DeΔerler
β
βββ OgrenciPlatform.Shared # Veri Transfer KatmanΔ±
βββ DTO/ # Web-Optimized DTOs
- π€ Admin: Sistem yΓΆneticisi - TΓΌm modΓΌllere eriΕim
- π¨βπ« DanΔ±Εman: Akademik danΔ±Εman - Ders ve ΓΆΔrenci yΓΆnetimi
- π¨βπ ΓΔrenci: ΓΔrenci kullanΔ±cΔ± - Ders kayΔ±t ve takip iΕlemleri
- ASP.NET Web API 2 (.NET Framework 4.7.2) - RESTful API servisleri
- ASP.NET MVC 5 (.NET Framework 4.7.2) - Web uygulama framework'ΓΌ
- Entity Framework 6.5.1 - ORM ve veritabanΔ± eriΕimi (Database-First)
- Microsoft SQL Server - VeritabanΔ± yΓΆnetim sistemi
- Redis Stack 2.8.58 - In-memory caching ve real-time data validation
- Hangfire 1.8.21 - Background job processing ve scheduled tasks
- Microsoft.Owin 4.2.3 - OWIN middleware
- Microsoft.Owin.Security.Jwt 4.2.3 - JWT token middleware
- System.IdentityModel.Tokens.Jwt 8.13.0 - JWT token iΕlemleri
- BCrypt.Net-Next 4.0.3 - Parola hashleme
- Claims-based Authentication - KullanΔ±cΔ± bilgileri ve roller
- Deepseek API Integration - AI-powered course description generation
- Hangfire Background Processing - Automated cache updates ve scheduled tasks
- Real-time Validation - Redis-based instant form validation
- Bootstrap 5.3.7 - Responsive UI framework
- jQuery 3.7.1 - JavaScript kΓΌtΓΌphanesi ve validation
- Fetch API - Modern asenkron HTTP istekleri
- Real-time AJAX - Instant user feedback ve validation
- MailKit 4.13.0 - Modern email handling
- MimeKit 4.13.0 - Email formatting and parsing
- AutoMapper 15.0.1 - Object mapping
- Autofac 6.4.0 / Unity 5.11.8 - Dependency injection containers
- log4net 3.1.0 - Comprehensive logging framework
- Newtonsoft.Json 13.0.3 - JSON serialize/deserialize
- DotNetEnv 3.1.1 - Environment variables yΓΆnetimi
- Swashbuckle 5.6.0 - API documentation ve testing
- Visual Studio 2019 veya ΓΌzeri
- .NET Framework 4.7.2
- Microsoft SQL Server 2016 veya ΓΌzeri
- IIS Express veya IIS
git clone https://github.com/alpeerkaraca/OgrenciPlatform.git
cd OgrenciPlatform- SQL Server'da yeni bir veritabanΔ± oluΕturun
OgrenciPortalApi/Web.configdosyasΔ±nda connection string'i gΓΌncelleyin:
<connectionStrings>
<add name="OgrenciPortalContext"
connectionString="Data Source=SERVER;Initial Catalog=DBNAME;User ID=USER;Password=PASS" />
</connectionStrings>API projesinde .env dosyasΔ± oluΕturun (.env.example'dan kopyalayΔ±n):
# JWT Configuration
JWT_MASTER_KEY="your_super_secret_jwt_key_minimum_256_bits"
JWT_ISSUER="https://yourdomain.com"
JWT_AUDIENCE="https://yourdomain.com"
ACCESS_TOKEN_EXPIRATION_MINUTES=15
REFRESH_TOKEN_EXPIRATION_DAYS=7
# API Configuration
API_BASE_ADDRESS="https://localhost:44301/"
# Email Configuration (Password Reset)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
# Redis Configuration
REDIS_CONNECTION_STRING="localhost:6379"
# AI Configuration (Deepseek API)
DEEPSEEK_API_KEY="your_deepseek_api_key"
DEEPSEEK_API_URL="https://api.deepseek.com"
# Background Jobs Configuration
HANGFIRE_DASHBOARD_USERNAME="admin"
HANGFIRE_DASHBOARD_PASSWORD="your_secure_password"- JWT_MASTER_KEY en az 256 bit (32 karakter) olmalΔ±dΔ±r
- Γretim ortamΔ±nda gΓΌΓ§lΓΌ, rastgele bir anahtar kullanΔ±n
- SMTP bilgilerini gΓΌvenli Εekilde saklayΔ±n
- SQL Server baΔlantΔ± bilgilerini Εifreleyin
-
Δ°lk olarak API'yi baΕlatΔ±n:
- Visual Studio'da OgrenciPortalApi projesini baΕlatΔ±n
- Swagger UI:
https://localhost:44301/swagger
-
ArdΔ±ndan MVC uygulamasΔ±nΔ± baΕlatΔ±n:
- OgrenciPortali projesini baΕlatΔ±n
- Web arayΓΌzΓΌ:
https://localhost:44302
-
.envdosyalarΔ±nΔ±.gitignore'a ekleyin - VarsayΔ±lan admin hesabΔ± iΓ§in gΓΌΓ§lΓΌ parola kullanΔ±n
- Development sertifikalarΔ±nΔ± kullanΔ±n (HTTPS)
- SQL Server authentication yerine Windows Authentication tercih edin
- JWT anahtarlarΔ±nΔ± Azure Key Vault veya benzeri servislerde saklayΔ±n
- SSL/TLS sertifikasΔ± yapΔ±landΔ±rΔ±n (Let's Encrypt)
- Database connection string'lerini Εifreleyin
- Application Insights veya benzeri monitoring ekleyin
- Rate limiting implementasyonu
- IP whitelist/blacklist yapΔ±landΔ±rmasΔ±
- GΓΌvenlik baΕlΔ±klarΔ± (HSTS, CSP, X-Frame-Options)
- log4net ile gΓΌvenlik olaylarΔ±nΔ± loglayin
- BaΕarΔ±sΔ±z giriΕ denemelerini takip edin
- API rate limiting loglarΔ±
- Kritik iΕlemler iΓ§in audit trail
API endpoint'leri ve gΓΌvenlik modeli iΓ§in Swagger UI kullanΔ±n:
- Development:
https://localhost:44301/swagger - API Base URL:
https://localhost:44301/api/
# Authentication & Authorization
POST /api/user/login # KullanΔ±cΔ± giriΕi
POST /api/auth/refresh-token # Token yenileme
POST /api/auth/logout # GΓΌvenli Γ§Δ±kΔ±Ε
# User Management
GET /api/user/profile # KullanΔ±cΔ± profili
POST /api/user/change-password # Parola deΔiΕikliΔi
POST /api/user/test-email # Real-time email validation (Redis)
# Course Management
GET /api/courses/list # Ders listesi
POST /api/courses/generate-description # AI-powered course description
# Student Operations
GET /api/student/my-courses # ΓΔrencinin dersleri
POST /api/student/enroll # Ders kaydΔ±
# Background Jobs
GET /hangfire # Background jobs dashboard (Admin only)
- β‘ Redis Cache System: KullanΔ±cΔ± e-posta adresleri Redis'te cache'lenerek lightning-fast validation saΔlandΔ±
- π Otomatik Cache GΓΌncelleme: Hangfire background job'larΔ± ile cache her 15 dakikada bir yenilenir
- β±οΈ Real-time Form Validation: KullanΔ±cΔ±lar form giriΕlerinde anΔ±nda email existence feedback alΔ±r
- π Performance Enhancement: Email validation iΓ§in veritabanΔ± sorgu yΓΌkΓΌ ΓΆnemli ΓΆlΓ§ΓΌde azaltΔ±ldΔ±
- π‘ Yeni API Endpoint:
POST /api/user/test-emailendpoint'i eklendi
- π€ AI Course Description Generation: Deepseek API entegrasyonu ile otomatik ders aΓ§Δ±klamasΔ± ΓΌretimi
- βοΈ Hangfire Background Processing: Scheduled task'lar ve background job management
- π― Automated Content Generation: AI destekli iΓ§erik ΓΌretim sistemi
- π Background Jobs Dashboard: Admin kullanΔ±cΔ±lar iΓ§in job monitoring ve management
- π Scheduled Cache Updates: Otomatik cache yenileme job'larΔ±
- β KapsamlΔ± README dosyalarΔ±: TΓΌm projeler iΓ§in detaylΔ± dokΓΌmantasyon eklendi
- π Shared KΓΌtΓΌphane DokΓΌmantasyonu:
SharedveOgrenciPlatform.Sharedprojelerine README dosyalarΔ± eklendi - ποΈ Mimari GΓΌncellemeleri: Proje mimarisi diyagramΔ± iki ayrΔ± Shared kΓΌtΓΌphanesini yansΔ±tacak Εekilde gΓΌncellendi
- π TutarlΔ±lΔ±k Δ°yileΕtirmeleri: Γok dilli dokΓΌmantasyon tutarlΔ±lΔ±ΔΔ± saΔlandΔ±
- π¨ Modern Theme Implementation: Yeni renk paleti ve geliΕtirilmiΕ layout stilleri
- π± Enhanced Modal System: Improved modal behavior ve button state handling
- β‘ AJAX Functionality: Fetch API ile modern asenkron HTTP istekleri
- β¨ Real-time Validation: Instant form validation ve user feedback
- Bu repository'yi fork edin
- Feature branch oluΕturun (
git checkout -b feature/amazing-feature) - DeΔiΕikliklerinizi commit edin (
git commit -m 'Add amazing feature') - Branch'inizi push edin (
git push origin feature/amazing-feature) - Pull Request oluΕturun
GΓΌvenlik aΓ§Δ±ΔΔ± tespit ederseniz, lΓΌtfen public issue aΓ§mak yerine doΔrudan [maintainer]'a ulaΕΔ±n.
Bu proje MIT lisansΔ± altΔ±nda lisanslanmΔ±ΕtΔ±r. Detaylar iΓ§in LICENSE dosyasΔ±na bakΔ±n.
This project is a security-focused student information system developed with modern web application architecture. The system offers an enterprise-ready platform with JWT-based authentication, role-based authorization, and comprehensive security measures.
- JWT Token-Based Authentication: Scalable security with stateless authentication
- Refresh Token Mechanism: Secure session renewal and long-term access management
- Role-Based Access Control: Detailed permission management with Admin, Advisor, and Student roles
- Custom Authorization Filters: Granular access control with CustomAuth attributes
- BCrypt Hash Algorithm: Industry-standard password encryption
- Strong Password Policies: Minimum complexity requirements
- Secure Password Reset: Token-based reset mechanism (15-minute validity)
- HttpOnly and Secure Cookies: Protection against XSS and MITM attacks
- CSRF Protection: Anti-forgery token implementation
- Session Timeout: Configurable token lifespan
- Secure Logout: Server-side refresh token revocation
- Input Validation: Model state validation and form verification
- SQL Injection Protection: Entity Framework ORM usage
- Secure API Endpoints: Authorization-controlled REST services
βββ OgrenciPortali (MVC Frontend) # User Interface Layer
β βββ Controllers/ # MVC Controllers
β βββ Views/ # Razor Views
β βββ Attributes/ # Custom Authorization
β βββ Utils/ # Helper Classes
β
βββ OgrenciPortalApi (Web API) # Business Logic and Data Layer
β βββ Controllers/ # API Controllers
β βββ Models/ # Entity Framework Models
β βββ Utils/ # JWT, Security Utilities
β βββ Areas/SwaggerUI/ # API Documentation
β
βββ Shared # Common Components Library
β βββ DTO/ # Data Transfer Objects
β βββ Enums/ # System Enums
β βββ Constants/ # Constants
β
βββ OgrenciPlatform.Shared # Data Transfer Layer
βββ DTO/ # Web-Optimized DTOs
- π€ Admin: System administrator - Full system access
- π¨βπ« Advisor (DanΔ±Εman): Academic advisor - Course and student management
- π¨βπ Student (ΓΔrenci): Student user - Course registration and tracking
- ASP.NET Web API 2 (.NET Framework 4.7.2) - RESTful API services
- ASP.NET MVC 5 (.NET Framework 4.7.2) - Web application framework
- Entity Framework 6.5.1 - ORM and database access (Database-First)
- Microsoft SQL Server - Database management system
- Redis Stack 2.8.58 - In-memory caching and real-time data validation
- Hangfire 1.8.21 - Background job processing and scheduled tasks
- Microsoft.Owin 4.2.3 - OWIN middleware
- Microsoft.Owin.Security.Jwt 4.2.3 - JWT token middleware
- System.IdentityModel.Tokens.Jwt 8.13.0 - JWT token operations
- BCrypt.Net-Next 4.0.3 - Password hashing
- Claims-based Authentication - User information and roles
- Deepseek API Integration - AI-powered course description generation
- Hangfire Background Processing - Automated cache updates and scheduled tasks
- Real-time Validation - Redis-based instant form validation
- Bootstrap 5.3.7 - Responsive UI framework
- jQuery 3.7.1 - JavaScript library and validation
- Fetch API - Modern asynchronous HTTP requests
- Real-time AJAX - Instant user feedback and validation
- MailKit 4.13.0 - Modern email handling
- MimeKit 4.13.0 - Email formatting and parsing
- AutoMapper 15.0.1 - Object mapping
- Autofac 6.4.0 / Unity 5.11.8 - Dependency injection containers
- log4net 3.1.0 - Comprehensive logging framework
- Newtonsoft.Json 13.0.3 - JSON serialize/deserialize
- DotNetEnv 3.1.1 - Environment variables management
- Swashbuckle 5.6.0 - API documentation and testing
- Visual Studio 2019 or higher
- .NET Framework 4.7.2
- Microsoft SQL Server 2016 or higher
- IIS Express or IIS
git clone https://github.com/alpeerkaraca/OgrenciPlatform.git
cd OgrenciPlatform- Create a new database in SQL Server
- Update the connection string in
OgrenciPortalApi/Web.config:
<connectionStrings>
<add name="OgrenciPortalContext"
connectionString="Data Source=SERVER;Initial Catalog=DBNAME;User ID=USER;Password=PASS" />
</connectionStrings>Create a .env file in the API project (copy from .env.example):
# JWT Configuration
JWT_MASTER_KEY="your_super_secret_jwt_key_minimum_256_bits"
JWT_ISSUER="https://yourdomain.com"
JWT_AUDIENCE="https://yourdomain.com"
ACCESS_TOKEN_EXPIRATION_MINUTES=15
REFRESH_TOKEN_EXPIRATION_DAYS=7
# API Configuration
API_BASE_ADDRESS="https://localhost:44301/"
# Email Configuration (Password Reset)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
# Redis Configuration
REDIS_CONNECTION_STRING="localhost:6379"
# AI Configuration (Deepseek API)
DEEPSEEK_API_KEY="your_deepseek_api_key"
DEEPSEEK_API_URL="https://api.deepseek.com"
# Background Jobs Configuration
HANGFIRE_DASHBOARD_USERNAME="admin"
HANGFIRE_DASHBOARD_PASSWORD="your_secure_password"- JWT_MASTER_KEY must be at least 256 bits (32 characters)
- Use a strong, random key in production
- Secure SMTP credentials
- Encrypt SQL Server connection information
-
Start the API first:
- Launch OgrenciPortalApi project in Visual Studio
- Swagger UI:
https://localhost:44301/swagger
-
Then start the MVC application:
- Launch OgrenciPortali project
- Web interface:
https://localhost:44302
- Add
.envfiles to.gitignore - Use strong passwords for default admin accounts
- Use development certificates (HTTPS)
- Prefer Windows Authentication over SQL Server authentication
- Store JWT keys in Azure Key Vault or similar services
- Configure SSL/TLS certificates (Let's Encrypt)
- Encrypt database connection strings
- Add Application Insights or similar monitoring
- Implement rate limiting
- Configure IP whitelist/blacklist
- Set security headers (HSTS, CSP, X-Frame-Options)
- Log security events with log4net
- Track failed login attempts
- Monitor API rate limiting
- Implement audit trail for critical operations
Use Swagger UI for API endpoints and security model:
- Development:
https://localhost:44301/swagger - API Base URL:
https://localhost:44301/api/
# Authentication & Authorization
POST /api/user/login # User login
POST /api/auth/refresh-token # Token refresh
POST /api/auth/logout # Secure logout
# User Management
GET /api/user/profile # User profile
POST /api/user/change-password # Password change
POST /api/user/test-email # Real-time email validation (Redis)
# Course Management
GET /api/courses/list # Course listing
POST /api/courses/generate-description # AI-powered course description
# Student Operations
GET /api/student/my-courses # Student's courses
POST /api/student/enroll # Course enrollment
# Background Jobs
GET /hangfire # Background jobs dashboard (Admin only)
- β‘ Redis Cache System: User email addresses cached in Redis for lightning-fast validation
- π Automated Cache Updates: Hangfire background jobs refresh cache every 15 minutes
- β±οΈ Real-time Form Validation: Users get instant email existence feedback during form input
- π Performance Enhancement: Significantly reduced database query load for email validation
- π‘ New API Endpoint: Added
POST /api/user/test-emailendpoint
- π€ AI Course Description Generation: Deepseek API integration for automated course description generation
- βοΈ Hangfire Background Processing: Scheduled tasks and background job management
- π― Automated Content Generation: AI-powered content generation system
- π Background Jobs Dashboard: Job monitoring and management for admin users
- π Scheduled Cache Updates: Automated cache refresh background jobs
- β Comprehensive README Files: Detailed documentation added for all projects
- π Shared Library Documentation: README files added to
SharedandOgrenciPlatform.Sharedprojects - ποΈ Architecture Updates: Project architecture diagram updated to reflect both Shared libraries
- π Consistency Improvements: Multilingual documentation consistency ensured
- π¨ Modern Theme Implementation: New color palette and improved layout styles
- π± Enhanced Modal System: Improved modal behavior and button state handling
- β‘ AJAX Functionality: Fetch API integration for modern asynchronous HTTP requests
- β¨ Real-time Validation: Instant form validation and user feedback
- Fork this repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
If you discover a security vulnerability, please contact the maintainer directly instead of opening a public issue.
This project is licensed under the MIT License. See the LICENSE file for details.