How sapirshenkor/employeemanagementsystem works
This is an employee-management product: employees submit absence requests, managers review them against department staffing needs, and administrators manage users, departments, and settings. The frontend exposes role-gated employee, manager, and admin routes; the backend has corresponding absence, administration, authentication, and availability services backed by a relational model. The excerpts show service-to-storage and service-to-service calls, plus application registration and frontend routing. The README is empty, and several pages, controllers, and API clients were not sampled, so their runtime connections are left unspecified.
Main entry points: ApplicationDbContext.cs EF data context · Program.cs API host · App.tsx Role-based routes · AbsenceRequestService.cs Absence workflow
Components 34
Web application
- Role-based routes
frontend/src/App.tsx - Auth context
frontend/src/context/AuthContext.tsx - Auth guards
frontend/src/components/RequireAuth.tsx - Login page
frontend/src/pages/Login.tsx - Employee panel
frontend/src/pages/EmployeePanelPage.tsx - Absence form
frontend/src/components/AbsenceRequestForm.tsx - Manager dashboard
frontend/src/pages/ManagerDashboardPage.tsx - Approval inbox
frontend/src/components/ApprovalInbox.tsx - Master calendar
frontend/src/components/MasterCalendarView.tsx - Admin settings
frontend/src/pages/GlobalSettingsPage.tsx - Absence API client
frontend/src/lib/absenceApi.ts - Admin API client
frontend/src/lib/adminApi.ts
API and security
- API host
backend/EmployeeManagement.Api/Program.cs - Absence endpoints
backend/EmployeeManagement.Api/Controllers/AbsenceRequestsController.cs - Admin endpoints
backend/EmployeeManagement.Api/Controllers/AdminController.cs - Auth endpoints
backend/EmployeeManagement.Api/Controllers/AuthController.cs - JWT claims mapper
backend/EmployeeManagement.Api/Security/SupabaseJwtClaimsMapper.cs - Application roles
backend/EmployeeManagement.Api/Security/AppRoles.cs
Workforce workflows
- Absence workflow
backend/EmployeeManagement.Api/Services/Absence/AbsenceRequestService.cs - Staffing validation
backend/EmployeeManagement.Api/Services/Availability/AvailabilityService.cs - Availability contract
backend/EmployeeManagement.Api/Services/Availability/IAvailabilityService.cs - Admin operations
backend/EmployeeManagement.Api/Services/Admin/AdminService.cs - User provisioning
backend/EmployeeManagement.Api/Services/Auth/UserProvisioningService.cs - Supabase auth client
backend/EmployeeManagement.Api/Services/Auth/SupabaseAuthClient.cs
Domain data
- Profile repository
backend/EmployeeManagement.Api/Repositories/ProfileRepository.cs - EF data context
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - Employee profiles
backend/EmployeeManagement.Api/Data/Entities/Profile.cs - Departments
backend/EmployeeManagement.Api/Data/Entities/Department.cs - Department settings
backend/EmployeeManagement.Api/Data/Entities/DepartmentSettings.cs - Absence requests
backend/EmployeeManagement.Api/Data/Entities/AbsenceRequest.cs - Absence status
backend/EmployeeManagement.Api/Data/Entities/AbsenceStatus.cs - Audit log
backend/EmployeeManagement.Api/Data/Entities/AuditLog.cs
Other components
- User
- Supabase Auth
Connections 30
- User → Role-based routes: uses
- Role-based routes → Auth context: wraps routes
frontend/src/App.tsx - Role-based routes → Login page: routes to
frontend/src/App.tsx - Role-based routes → Auth guards: guards pages
frontend/src/App.tsx - Role-based routes → Employee panel: routes to
frontend/src/App.tsx - Role-based routes → Manager dashboard: routes to
frontend/src/App.tsx - Role-based routes → Admin settings: routes to
frontend/src/App.tsx - API host → EF data context: registers
backend/EmployeeManagement.Api/Program.cs - API host → JWT claims mapper: maps claims
backend/EmployeeManagement.Api/Program.cs - API host → Staffing validation: registers
backend/EmployeeManagement.Api/Program.cs - API host → Absence workflow: registers
backend/EmployeeManagement.Api/Program.cs - API host → Admin operations: registers
backend/EmployeeManagement.Api/Program.cs - API host → Supabase auth client: registers
backend/EmployeeManagement.Api/Program.cs - API host → User provisioning: registers
backend/EmployeeManagement.Api/Program.cs - Absence workflow → EF data context: reads and writes
backend/EmployeeManagement.Api/Services/Absence/AbsenceRequestService.cs - Absence workflow → Staffing validation: validates staffing
backend/EmployeeManagement.Api/Services/Absence/AbsenceRequestService.cs - Absence workflow → Profile repository: looks up profile
backend/EmployeeManagement.Api/Services/Absence/AbsenceRequestService.cs - Staffing validation → EF data context: reads
backend/EmployeeManagement.Api/Services/Availability/AvailabilityService.cs - Admin operations → EF data context: reads and writes
backend/EmployeeManagement.Api/Services/Admin/AdminService.cs - User provisioning → EF data context: writes profiles
backend/EmployeeManagement.Api/Services/Auth/UserProvisioningService.cs - User provisioning → Profile repository: checks profiles
backend/EmployeeManagement.Api/Services/Auth/UserProvisioningService.cs - User provisioning → Supabase auth client: creates accounts
backend/EmployeeManagement.Api/Services/Auth/UserProvisioningService.cs - Supabase auth client → Supabase Auth: calls Auth API
backend/EmployeeManagement.Api/Services/Auth/SupabaseAuthClient.cs - Profile repository → EF data context: queries
backend/EmployeeManagement.Api/Repositories/ProfileRepository.cs - EF data context → Employee profiles: maps entity
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - EF data context → Departments: maps entity
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - EF data context → Department settings: maps entity
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - EF data context → Absence requests: maps entity
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - EF data context → Audit log: maps entity
backend/EmployeeManagement.Api/Data/ApplicationDbContext.cs - Absence requests → Absence status: uses status
backend/EmployeeManagement.Api/Data/Entities/AbsenceRequest.cs