How ahmadabdelbary2001/hr.leavemanagement.clean works
This is a Clean Architecture HR leave-management application with a Blazor client and .NET API. The principal workflow is an employee or administrator using the client to authenticate and manage leave types, submit or review leave requests, and manage allocations; application handlers apply CRUD/query behavior through persistence contracts, with identity details available for request views. The graph preserves those domain stages and the identity, persistence, and infrastructure layers. Some handlers and UI pages were not sampled, so those links rely only on documented capabilities or are omitted; unsampled internals are not asserted.
Main entry points: Program.cs API host · Repositories Leave repositories · LeaveRequest Request workflow · AuthController.cs Authentication endpoints
Components 17
Blazor client
- Blazor UI
HR.LeaveManagement.BlazorUI - Client authentication
HR.LeaveManagement.BlazorUI/Services/AuthenticationService.cs
API boundary
- API host
HR.LeaveManagement.Api/Program.cs - Authentication endpoints
HR.LeaveManagement.Api/Controllers/AuthController.cs - Leave endpoints
HR.LeaveManagement.Api/Controllers/LeaveRequestsController.cs - Allocation endpoints
HR.LeaveManagement.Api/Controllers/LeaveAllocationsController.cs - Leave type endpoints
HR.LeaveManagement.Api/Controllers/LeaveTypesController.cs
Application features
- Request workflow
HR.LeaveManagement.Application/Features/LeaveRequest - Allocation workflow
HR.LeaveManagement.Application/Features/LeaveAllocation - Leave type workflow
HR.LeaveManagement.Application/Features/LeaveType - Identity contracts
HR.LeaveManagement.Application/Contracts/Identity
Domain model
- Leave entities
HR.LeaveManagement.Domain/LeaveRequest.cs
Identity and infrastructure
- Identity service
HR.LeaveManagement.Identity/Services/AuthService.cs - Email sender
HR.LeaveManagement.Infrastructure/EmailService/EmailSender.cs
Persistence
- Leave repositories
HR.LeaveManagement.Persistence/Repositories - Leave database
HR.LeaveManagement.Persistence/DatabaseContext/HrDatabaseContext.cs
Other components
- Employees and admins
Connections 19
- Employees and admins → Blazor UI: uses
README.md - Blazor UI → API host: sends requests
- Client authentication → Authentication endpoints: authenticates through
- API host → Authentication endpoints: hosts
- API host → Leave endpoints: hosts
- API host → Allocation endpoints: hosts
- API host → Leave type endpoints: hosts
- Leave endpoints → Request workflow: dispatches
HR.LeaveManagement.Api/Controllers/LeaveRequestsController.cs - Allocation endpoints → Allocation workflow: dispatches
HR.LeaveManagement.Api/Controllers/LeaveAllocationsController.cs - Leave type endpoints → Leave type workflow: dispatches
- Authentication endpoints → Identity service: uses
- Request workflow → Leave repositories: reads and writes
- Allocation workflow → Leave repositories: reads and writes
- Leave type workflow → Leave repositories: reads and writes
- Request workflow → Identity contracts: gets employee details
HR.LeaveManagement.Application/Features/LeaveRequest/Queries/GetLeaveRequestDetail/GetLeaveRequestDetailQueryHandler.cs - Identity service → Identity contracts: implements
HR.LeaveManagement.Identity/Services/AuthService.cs - Leave repositories → Leave database: uses
HR.LeaveManagement.Persistence/Repositories/LeaveAllocationRepository.cs - Leave database → Leave entities: persists
HR.LeaveManagement.Persistence/DatabaseContext/HrDatabaseContext.cs - Employees and admins → Email sender: receives notifications