How andyhacool/hrm works
HRM System is a .NET Core backend for workforce and account management. The evidenced user workflow is an HTTP account request through AccountController and AccountAppService to authentication handlers, which use identity and persistence components and return responses. The repository also defines employee commands, domain events, and event-sourcing components, although the sampled employee command handler is unimplemented and no employee API route appears in the tree. Edges are limited to visible calls and explicit handler responsibilities; unsampled wiring is not inferred.
Main entry points: AccountAppService.cs Account app service · ExchangeRefreshTokenHandler.cs Refresh handler · EmployeeCommandHandler.cs Employee command handler · AccountController.cs Account controller
Components 19
Web API
- Account controller
src/HRM.WebApi/Controllers/AccountController.cs
Application
- Account app service
src/HRM.Application/Services/AccountAppService.cs
Identity
- Login handler
src/HRM.Infra.CrossCutting.Identity/AuthHandlers/LoginHandler.cs - Refresh handler
src/HRM.Infra.CrossCutting.Identity/AuthHandlers/ExchangeRefreshTokenHandler.cs - Registration handler
src/HRM.Infra.CrossCutting.Identity/AuthHandlers/RegisterUserHandler.cs - JWT services
src/HRM.Infra.CrossCutting.Identity/Auth/JwtFactory.cs - User repository
src/HRM.Infra.CrossCutting.Identity/Repositories/UserRepository.cs - Identity context
src/HRM.Infra.CrossCutting.Identity/Models/AppIdentityDbContext.cs
Employee Domain
- Employee commands
src/HRM.Domain/Commands/EmployeeCommand.cs - Command validation
src/HRM.Domain/Validations/RegisterNewEmployeeCommandValidation.cs - Employee command handler
src/HRM.Domain/CommandHandlers/EmployeeCommandHandler.cs - Employee entity
src/HRM.Domain/Entities/Employee.cs - Employee domain events
src/HRM.Domain/Events/EmployeeRegisteredEvent.cs
Persistence
- Employee repository
src/HRM.Infra.Data/Repository/EmployeeRepository.cs - Unit of work
src/HRM.Infra.Data/UoW/UnitOfWork.cs - HRM database context
src/HRM.Infra.Data/Context/HRMContext.cs - SQL event store
src/HRM.Infra.Data/EventSourcing/SqlEventStore.cs - Event store context
src/HRM.Infra.Data/Context/EventSourcingContext.cs
Other components
- API client
Connections 13
- API client → Account controller: sends requests
- Account controller → Account app service: calls account service
- Account app service → Login handler: handles login
- Account app service → Refresh handler: exchanges token
- Account app service → Registration handler: handles registration
- Refresh handler → User repository: loads and updates user
- Refresh handler → JWT services: validates and issues tokens
- User repository → Identity context: uses identity store
- Employee commands → Command validation: validated by
- Employee command handler → Employee repository: uses repository
- Employee command handler → Unit of work: commits changes
- Employee repository → HRM database context: persists employees
- SQL event store → Event store context: stores events