Skip to content

adhamdr1/Training-System

Repository files navigation

Training System - ASP.NET Core MVC

📋 Overview

A comprehensive training management system built with ASP.NET Core MVC 9.0 for managing students, instructors, courses, and departments in educational institutions.

🚀 Key Features

👥 User Management

  • Authentication & Authorization using ASP.NET Core Identity
  • Student Management - Add, edit, delete, and view students
  • Instructor Management - Comprehensive instructor and course management
  • Department Management - Organize students and instructors by departments

📚 Course Management

  • Add and Edit Courses with grade specifications and duration
  • Course-Department Association - Link courses to specific departments
  • Student Enrollment - Course registration and enrollment system
  • Grade Management - Record and manage student grades

🔐 Security & Protection

  • Strong Authentication with strict password policies
  • Data Encryption for sensitive information
  • Attack Protection - Account lockout after failed attempts
  • Data Validation - Custom Attributes for validation

🛠️ Technologies Used

  • .NET 9.0 - Latest .NET version
  • ASP.NET Core MVC - Web framework
  • Entity Framework Core 9.0 - ORM for database management
  • SQL Server - Database
  • ASP.NET Core Identity - Authentication and authorization
  • Bootstrap - UI framework
  • jQuery - Frontend interactions

📁 Project Structure

TrainingSystem(MVC)/
├── Controllers/           # Controllers
│   ├── AccountController.cs
│   ├── StudentController.cs
│   ├── InstructorController.cs
│   ├── CourseController.cs
│   └── DepartmentController.cs
├── Models/               # Models and Entities
│   ├── Entities/         # Database entities
│   └── ViewModel/        # View models
├── Views/               # Web pages (Razor)
│   ├── Student/         # Student pages
│   ├── Instructor/      # Instructor pages
│   ├── Course/          # Course pages
│   └── Department/      # Department pages
├── Data/                # Data layer
│   ├── Context/         # DbContext
│   └── Configurations/  # Entity Framework configurations
├── Repository/          # Repository pattern
├── Services/            # Services and utilities
└── wwwroot/            # Static files (CSS, JS, Images)

🗄️ Database Schema

Entity-Relationship Diagram (ERD)

image-ad231b4d-b458-4b1f-9ed9-9f2b7176baf3

The database schema includes the following main entities and their relationships:

Main Entities:

  • Student - Students with personal and academic information
  • Instructor - Instructors with their specializations
  • Course - Training courses with grades and duration
  • Department - Academic departments
  • Enrollment - Student course registrations
  • ApplicationUser - System users (Identity)

Relationships:

  • One student belongs to one department
  • One instructor belongs to one department
  • One course can belong to multiple departments
  • One student can enroll in multiple courses

⚙️ Installation & Setup

Prerequisites:

  • .NET 9.0 SDK
  • SQL Server
  • Visual Studio 2022 or VS Code

Installation Steps:

  1. Clone the repository:
git clone [repository-url]
cd TrainingSystem(MVC)
  1. Update connection string:
// In appsettings.json
{
  "constr": "Server=YOUR_SERVER;Database=TrainingSystem;Integrated Security=true;TrustServerCertificate=true;"
}
  1. Apply migrations:
dotnet ef database update
  1. Run the project:
dotnet run
  1. Open browser:
https://localhost:5001

🎯 Usage

For Students:

  • Register new account
  • View available courses
  • Enroll in courses
  • View grades and progress

For Instructors:

  • Manage assigned courses
  • Record student grades
  • View enrolled student lists

For Administrators:

  • Manage all users
  • Manage departments and courses
  • View reports and statistics

📸 Screenshots

Homepage

image-e1a06f9d-af6d-483f-ac9a-4f1d91bfc5d9

The main landing page features a modern design with:

  • Welcome message and call-to-action
  • Statistics dashboard showing system metrics
  • Navigation menu for easy access to all features
  • Responsive design for all devices

Student Registration Form

image-d560be08-3971-4164-8ddc-89e2d8a7315b

The student registration form includes:

  • Comprehensive validation with real-time feedback
  • Password strength requirements
  • Email uniqueness validation
  • User-friendly interface with clear error messages

Student Profile Dashboard

image-15afbeee-76dc-4d58-a3c1-ec160fbf95a2

Student profile page displays:

  • Personal information and avatar
  • Enrolled courses with status indicators
  • Course progress tracking
  • Quick action buttons for profile management

Access Control System

image-3a8384cf-1cdb-40ae-b257-af317ced87a2

The system implements robust access control:

  • Role-based permissions
  • Clear access denied messages
  • Secure navigation based on user roles
  • Administrator-only features protection

🔧 Customization

Adding New Fields:

  1. Modify entity in Models/Entities/
  2. Add configuration in Data/Configurations/
  3. Create new migration
  4. Update ViewModels and Views

Adding New Pages:

  1. Add action in Controller
  2. Create View in appropriate folder
  3. Add route if necessary

📊 Advanced Features

  • Pagination - Results pagination
  • Search & Filter - Advanced search and filtering
  • Validation - Data validation with custom attributes
  • Error Handling - Comprehensive error handling
  • Responsive Design - Mobile-friendly design
  • Role-Based Access Control - Secure user permissions
  • Real-time Validation - Client-side and server-side validation
  • User-Friendly Interface - Modern UI with Bootstrap

Default Accounts:

Test Coverage:

  • Unit tests for repositories
  • Integration tests for controllers
  • UI tests for critical user flows

📈 Performance

Optimizations:

  • Entity Framework query optimization
  • Caching for frequently accessed data
  • Lazy loading for related entities
  • Pagination for large datasets

🔒 Security Features

  • Password Complexity - Strict password requirements (6+ chars, uppercase, lowercase, numbers, special characters)
  • Account Lockout - Automatic lockout after 3 failed login attempts
  • Email Uniqueness - Global email validation to prevent duplicates
  • SQL Injection Prevention - Entity Framework parameterized queries
  • XSS Protection - Input sanitization and encoding
  • Role-Based Authorization - Granular permission system
  • Session Management - Secure user session handling

About

Built Training System using ASP.Net Core MVC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages