How merve-1/employee_leave_request works
Employee Leave Request is a leave-management application with a .NET API, a Blazor client, SQL Server persistence, and employee data supplied by DummyJSON. The main workflow is to create and manage leave requests: the API validates and persists requests, enriches them with employee details, and returns request data; HR-authorized users can approve or reject pending requests. The README also documents employee search, filtering, pagination, and deletion. Client-to-API wiring is not established by the sampled client source, so that link is omitted.
Main entry points: LeaveRequestService.cs Request operations · LeaveDbContext.cs EF data access · EmployeeService.cs Employee lookup · LeaveRequestsController.cs Leave endpoints
Components 16
Blazor client
- Leave pages
src/LeaveRequests.Client/Components/Pages/LeaveRequests.razor - JWT claims
src/LeaveRequests.Client/Auth/JwtService.cs
Leave API
- Leave endpoints
src/LeaveRequests.Api/Controllers/LeaveRequestsController.cs - Employee endpoint
src/LeaveRequests.Api/Controllers/EmployeesController.cs - Request operations
src/LeaveRequests.Api/Services/LeaveRequests/LeaveRequestService.cs - Error handling
src/LeaveRequests.Api/Middleware/ExceptionHandlingMiddleware.cs - Request DTOs
src/LeaveRequests.Api/DTOs/LeaveRequestDto.cs
Leave data
- EF data access
src/LeaveRequests.Api/Data/Contexts/LeaveDbContext.cs - Initial requests
src/LeaveRequests.Api/Data/Seeder/LeaveRequestSeed.cs - Leave request model
src/LeaveRequests.Api/Entities/LeaveRequest.cs
Employee integration
- Employee lookup
src/LeaveRequests.Api/Services/Employee/EmployeeService.cs
Other components
- User
- HR reviewer
- API caller
- SQL Server
- DummyJSON users
Connections 16
- User → Leave pages: uses
- HR reviewer → API caller: submits HR action
- API caller → Leave endpoints: sends API requests
- API caller → Employee endpoint: searches employees
- Leave endpoints → Request operations: dispatches
- Employee endpoint → Employee lookup: dispatches
- Request operations → EF data access: reads and writes
- Request operations → Employee lookup: looks up employees
- Employee lookup → DummyJSON users: fetches users
- Employee lookup → DummyJSON users: fetches user list
- EF data access → SQL Server: queries and saves
- EF data access → Leave request model: maps records
- Initial requests → EF data access: provides seed data
- Request operations → Request DTOs: maps responses
- Error handling → Leave endpoints: wraps requests
- User → JWT claims: parses token