How aman-devcode1/ems works
EMS is an employee-management application with an Angular client and a .NET Clean Architecture API. Users register or sign in, complete OTP verification where required, receive tokens, and then use role-protected employee, admin, manager, and master-data capabilities. The backend also supports refresh-token rotation, account recovery, and email OTP delivery. The graph includes documented flows and source-index-supported dependencies; unsampled frontend/API wiring and some OTP implementation details are not asserted as direct calls.
Main entry points: AuthService.cs Authentication · EmployeeRepository.cs Repositories · app.routes.ts Routes and Guards · AdminController.cs Admin Endpoints
Components 18
Angular Client
- Auth Screens
Frontend/src/app/features/auth/login/login.ts - OTP Screens
Frontend/src/app/features/auth/verify-otp/verify-otp.ts - Employee Workspace
Frontend/src/app/features/employee-management/employee-list/employee-list.ts - Admin Workspace
Frontend/src/app/features/admin/master-data/master-data.ts - Routes and Guards
Frontend/src/app/app.routes.ts
API Boundary
- Auth Endpoints
Backend/EMS.API/Controllers/AuthController.cs - Admin Endpoints
Backend/EMS.API/Controllers/AdminController.cs - Employee Endpoints
Backend/EMS.API/Controllers/EmployeesController.cs
Business Services
- Authentication
Backend/EMS.Services/Services/AuthService.cs - Employee Management
Backend/EMS.Services/Services/EmployeeService.cs - OTP Processing
Backend/EMS.Services/Services/OtpService.cs - Department and Designation
Backend/EMS.Services/Services/DepartmentService.cs
Persistence
- Repositories
Backend/EMS.Infrastructure/Repositories/EmployeeRepository.cs - Application Database
Backend/EMS.Infrastructure/Data/AppDbContext.cs
Email and Cleanup
- Email Queue
Backend/EMS.Infrastructure/ExternalServices/BackgroundEmailQueue.cs - Email Delivery
Backend/EMS.Infrastructure/ExternalServices/EmailService.cs - Employee Cleanup
Backend/EMS.API/BackgroundServices/EmployeeCleanupService.cs
Other components
- Users
Connections 18
- Users → Auth Screens: starts sign-in
README.md - Auth Screens → Routes and Guards: uses routes
Frontend/src/app/app.routes.ts - OTP Screens → Routes and Guards: uses routes
Frontend/src/app/app.routes.ts - Employee Workspace → Routes and Guards: protected by
Frontend/src/app/app.routes.ts - Admin Workspace → Routes and Guards: protected by
Frontend/src/app/app.routes.ts - Users → Auth Endpoints: sends requests
README.md - Auth Endpoints → Authentication: delegates to
Backend/EMS.API/Controllers/AuthController.cs - Admin Endpoints → Authentication: delegates to
Backend/EMS.API/Controllers/AdminController.cs - Employee Endpoints → Employee Management: delegates to
Backend/EMS.API/Controllers/EmployeesController.cs - Admin Endpoints → Department and Designation: delegates to
Backend/EMS.API/Controllers/AdminController.cs - Authentication → OTP Processing: uses OTP service
Backend/EMS.Services/Services/AuthService.cs - Authentication → Repositories: uses repositories
Backend/EMS.Services/Services/AuthService.cs - Employee Management → Repositories: uses repository
Backend/EMS.Services/Services/EmployeeService.cs - Department and Designation → Repositories: uses repositories
- Repositories → Application Database: queries and saves
Backend/EMS.Infrastructure/Repositories/EmployeeRepository.cs - Authentication → Email Queue: queues OTP email
- Email Queue → Email Delivery: dispatches email
- Employee Cleanup → Application Database: cleans scheduled records
Backend/EMS.API/BackgroundServices/EmployeeCleanupService.cs