How apollo478/kouka-tech-test works
CongeManagement is an ASP.NET Core leave-management API built around employee records and leave requests. Users create and retrieve employees, then submit, inspect, update, or delete leave requests. The application service validates date ranges and overlaps, enforces pending-status and manager-authorization rules, and delegates persistence through repository interfaces. The README documents PostgreSQL and Entity Framework Core. The graph reflects the sampled controllers, services, repositories, and context; broader wiring is shown only where Program.cs explicitly registers it.
Main entry points: Program.cs Runtime Registration · LeaveRequestService.cs Leave Service · CongeDbContext.cs EF Core Context · EmployeeRepository.cs Employee Repository
Components 15
HTTP API
- Employee API
CongeManagement/Controllers/EmployeeController.cs - Leave API
CongeManagement/Controllers/LeaveRequestController.cs
Application Services
- Employee Service
CongeManagement.Application/Services/EmployeeService.cs - Leave Service
CongeManagement.Application/Services/LeaveRequestService.cs - Leave Rules
CongeManagement.Application/Services/LeaveRequestService.cs
Domain Contracts
- Employee Repository Contract
CongeManagement.Domain/Interfaces/IEmployeeRepository.cs - Leave Repository Contract
CongeManagement.Domain/Interfaces/ILeaveRequestRepository.cs - Employee Model
CongeManagement.Domain/Entities/Employee.cs - Leave Model
CongeManagement.Domain/Entities/LeaveRequest.cs
Persistence
- Employee Repository
CongeManagement.Infrastructure/Repositories/EmployeeRepository.cs - Leave Repository
CongeManagement.Infrastructure/Repositories/LeaveRequestRepository.cs - EF Core Context
CongeManagement.Infrastructure/Context/CongeDbContext.cs
Other components
- API Client
- PostgreSQL
- Runtime Registration
CongeManagement/Program.cs
Connections 18
- API Client → Employee API: HTTP requests
- API Client → Leave API: HTTP requests
- Employee API → Employee Service: calls
- Leave API → Leave Service: calls
- Leave Service → Leave Rules: applies
- Employee Service → Employee Repository Contract: calls
- Leave Service → Leave Repository Contract: calls
- Leave Service → Employee Repository Contract: checks employee
- Employee Repository → Employee Repository Contract: implements
- Leave Repository → Leave Repository Contract: implements
- Employee Repository → EF Core Context: queries and saves
- Leave Repository → EF Core Context: queries and saves
- EF Core Context → PostgreSQL: reads and writes
- Runtime Registration → Employee Service: registers
- Runtime Registration → Leave Service: registers
- Runtime Registration → Employee Repository: registers
- Runtime Registration → Leave Repository: registers
- Runtime Registration → EF Core Context: configures