A modern, high-performance .NET-based Student Enrollment System API built with Clean Architecture principles and Domain-Driven Design patterns.
dotnet run
then access the link at the specified port that shows up in the terminal after running the app.
it should look sth like this : http://localhost:5260/swagger/index.html
βββββββββββββββββββββββββββββββ
β API (Features) Layer β β FastEndpoints for HTTP endpoints
βββββββββββββββββββββββββββββββ€
β Application Layer β β Business logic & use cases
βββββββββββββββββββββββββββββββ€
β Domain Layer β β Entities & business rules
βββββββββββββββββββββββββββββββ€
β Infrastructure Layer β β Data access & external services
βββββββββββββββββββββββββββββββ
The project follows a clean architecture pattern with distinct layers:
- Contains core business entities:
Student
Class
Enrollment
Mark
- Implements business logic through services:
StudentService
: Manages student operationsClassService
: Handles class managementEnrollmentService
: Processes student enrollmentsMarkService
: Manages academic performance tracking
- Repository implementations for data persistence
- Uses repository pattern with interfaces:
IStudentRepository
IClassRepository
IEnrollmentRepository
IMarkRepository
- Built using FastEndpoints for efficient API endpoint handling
- Organized by feature folders:
- Students
- Classes
- Enrollments
- Marks
- Create, update, and delete student records
- View student details and academic history
- Generate comprehensive student reports
- Track student enrollments across multiple classes
- Create and manage classes
- Assign teachers to classes
- Track class enrollment statistics
- Calculate class average performance
- Enroll students in classes
- Prevent duplicate enrollments
- Track enrollment dates
- Manage class capacity
- Record and manage student marks
- Calculate individual and class averages
- Track examination and assignment scores
- Generate performance reports
- Framework: .NET 6+
- API Architecture: REST with FastEndpoints
- Documentation: Swagger/OpenAPI
- Authentication: Built-in authorization support
- Testing: Includes PowerShell and Shell scripts for testing
- Clear separation of concerns
- Dependency injection
- Interface-based design
- Consistent endpoint naming
- Proper HTTP method usage
- Standardized response formats
- Custom exception types
- Meaningful error messages
- Global exception handling
- Pagination support
- Lazy loading for related entities
- Efficient query optimization
- Input validation
- Business rule enforcement
- Data consistency checks
GET /api/students/{id} # Get student details
GET /api/students/{id}/report # Generate student report
POST /api/students # Create new student
PUT /api/students/{id} # Update student
DELETE /api/students/{id} # Delete student
GET /api/classes/{id} - Get class details
GET /api/classes - List all classes
POST /api/classes - Create new class
PUT /api/classes/{id} - Update class
DELETE /api/classes/{id} - Delete class
POST /api/enrollments - Create new enrollment
GET /api/enrollments/{id} - Get enrollment details
GET /api/enrollments/student/{studentId} - Get student enrollments
GET /api/enrollments/class/{classId} - Get class enrollments
POST /api/marks # Record marks for a student
GET /api/classes/{classId}/average-marks # Calculate average marks for a class
GET /api/students/{studentId}/marks # Get marks for a specific student