How mahammadpiriyev/school-management works
Project Type and Purpose
• This is a full-stack ASP.NET Core MVC web application (School Management System) with a layered architecture:
• Presentation layer (“School” project) using Razor Views, Controllers, and static assets.
• Business logic layer (“School.Business”) with service interfaces and implementations.
• Data access layer (“School.DataAccess”) using Entity Framework Core, Repository and Unit of Work patterns.
• Domain model layer (“School.Entities”) describing core entities and ViewModels.
• Utility layer (“School.Utility”) for cross-cutting concerns (e.g., email sending).
Main Architectural Components
a. Client/browser (Web UI)
b. ASP.NET Core MVC Web App
• Controllers (Areas: Admin, Customer, Identity)
• Views & Razor Pages
• Static assets (wwwroot: CSS, JS, images)
c. Business Layer (“School.Business”)
• IStudentService, ITeacherService interfaces
• StudentService, TeacherService implementations
d. Data Access Layer (“School.DataAccess”)
• ApplicationDbContext (EF Core)
• Repository abstractions (IBaseRepository<T>, IUnitOfWork) and concrete repositories
• EF Migrations
e. Domain Models & ViewModels (“School.Entities”)
• Entities (Student, Teacher, Class, Department, Exam, Mark, ApplicationUser)
• ViewModels for dashboard and CRUD UIs
f. Database (MS SQL Server)
g. External services (e.g., SMTP via EmailSender in School.Utility)
Relationships & Data Flows
1. User → Browser → HTTP Request → MVC Controller
2. Controller calls Business Service (IStudentService, ITeacherService, etc.)
3. Business Service orchestrates domain logic, then calls Data Access layer (UnitOfWork, Repositories)
4. Repository uses Entity Framework DbContext to query/update the SQL Server database
5. Results bubble back: Repository → Service → Controller → View → User’s browser
6. Utility EmailSender invoked by Services for notifications
Architectural Patterns & Design Principles
• Layered Architecture (Presentation → Business → Data Access → Persistence)
• Dependency Injection (services and repositories injected into controllers)
• Repository + Unit of Work patterns abstracting EF Core
• Separation of Concerns: distinct projects for domain models, business logic, data access, utilities, and presentation
• ASP.NET Identity for authentication/authorization (in Areas/Identity)