How hamzaomary/attendancesystem works
Project type and purpose
• This is a three-layered ASP.NET Core Web API project called “AttendanceSystem.”
• Its purpose is to manage attendance records, users, courses, classrooms, sections, etc., exposing endpoints for a front-end or external clients to consume.
File structure
• Top-level solution file (AttendanceSystem.sln) orchestrates three projects:
• AttendanceSystem.API – the presentation layer (Web API controllers, Program.cs, launch settings, appsettings).
• AttendanceSystem.Domain – the core domain and application logic (DbContext, entities, interfaces for repositories & services, service implementations).
• AttendanceSystem.Infra – the infrastructure/data-access layer (Entity Framework or ADO.NET repositories implementing domain interfaces).
• The Domain folder also contains the Local MDF database file.
• Patterns:
• Onion/Hexagonal architecture – layered separation.
• Repository Pattern – I*Repository interfaces in Domain.Interfaces.Repository and concrete implementations in Infra.Repository.
• Service Layer – I*Service in Domain.Interfaces.Service with implementations in Domain.Services.
• Configuration and DI happen in API/Program.cs using the csproj references.
README for additional insights
• README only contains the title, so no additional architecture guidance is provided. Use the code structure itself for insights.
Required elements
• Clear labels for each layer and component (e.g., Controllers, Services, Repositories, DbContext, Database).
External Client → Controller → Service → Repository → Database
Database → Repository → Service → Controller → External Client
• Blue for API layer
• Green for Domain layer
• Orange for Infra layer