How rudra512004/hrms works
HRMS is a role-controlled human-resources system with a React client and Django REST backend. Users authenticate, enter permission-protected pages, and work across attendance, leave, employee and organization management, payroll, reporting, and administration. Backend domain models hold the HR records; services implement calendar, attendance, authorization, dashboard, payroll, and notification logic. The README establishes the client/API product split but gives few workflow details. Several domain branches are represented from the file tree; their internal calls are omitted where source evidence was not provided.
Main entry points: payroll/services.py Payroll processing · AppRouter.tsx Protected routing · attendance/services.py Attendance calculations · dashboard/services.py Dashboard aggregation
Components 26
Web application
- Application shell
frontend/src/App.tsx - Protected routing
frontend/src/routes/AppRouter.tsx
Identity and access
- Session context
frontend/src/contexts/AuthContext.tsx - Authentication client
frontend/src/services/auth.ts - Branch context
frontend/src/contexts/BranchContext.tsx - Organization client
frontend/src/services/organization.ts - RBAC services
backend/apps/authorization/services.py - Roles and grants
backend/apps/authorization/models.py
Workforce operations
- Attendance and leave
frontend/src/pages - HR administration
frontend/src/pages/admin - Employee records
backend/apps/employees/models.py - Leave records
backend/apps/leaves/models.py - Attendance records
backend/apps/attendance/models.py - Attendance calculations
backend/apps/attendance/services.py - Organization structure
backend/apps/organization/models.py
Dashboards and payroll
- Dashboard page
frontend/src/pages/DashboardPage.tsx - Dashboard aggregation
backend/apps/dashboard/services.py - Payroll management
frontend/src/pages/PayrollPage.tsx - Payroll client
frontend/src/services/payroll.ts - Payroll processing
backend/apps/payroll/services.py - Payroll records
backend/apps/payroll/models.py - Payroll reporting
backend/apps/payroll/services_reporting.py
Shared backend services
- Working calendar
backend/apps/organization/services.py - Notifications
backend/apps/notifications/services.py - Audit logging
backend/apps/audit/services.py
Other components
- HRMS user
Connections 35
- HRMS user → Application shell: uses
- Application shell → Protected routing: renders
frontend/src/App.tsx - Application shell → Session context: provides session
frontend/src/App.tsx - Application shell → Branch context: provides branch
frontend/src/App.tsx - Session context → Authentication client: loads session
frontend/src/contexts/AuthContext.tsx - Branch context → Session context: reads user
frontend/src/contexts/BranchContext.tsx - Branch context → Organization client: lists branches
frontend/src/contexts/BranchContext.tsx - RBAC services → Roles and grants: queries grants
backend/apps/authorization/services.py - RBAC services → Organization structure: resolves branch
backend/apps/authorization/services.py - Protected routing → Dashboard page: routes to
frontend/src/routes/AppRouter.tsx - Protected routing → Attendance and leave: routes to
frontend/src/routes/AppRouter.tsx - Protected routing → HR administration: routes to
frontend/src/routes/AppRouter.tsx - Protected routing → Payroll management: routes to
frontend/src/routes/AppRouter.tsx - Protected routing → Session context: guards routes
- Attendance calculations → Attendance records: queries
backend/apps/attendance/services.py - Attendance calculations → Employee records: uses employee
backend/apps/attendance/services.py - Attendance calculations → Organization structure: resolves branch
backend/apps/attendance/services.py - Attendance calculations → Working calendar: checks workdays
backend/apps/attendance/services.py - Attendance calculations → Leave records: references leave
backend/apps/attendance/services.py - Working calendar → Organization structure: reads calendar
backend/apps/organization/services.py - Dashboard aggregation → RBAC services: uses permissions
backend/apps/dashboard/services.py - Dashboard aggregation → Attendance records: queries attendance
backend/apps/dashboard/services.py - Dashboard aggregation → Leave records: queries leave
backend/apps/dashboard/services.py - Dashboard aggregation → Employee records: queries employees
backend/apps/dashboard/services.py - Payroll management → Payroll client: uses payroll API
frontend/src/pages/PayrollPage.tsx - Payroll processing → Attendance records: reads attendance
backend/apps/payroll/services.py - Payroll processing → Leave records: reads leave
backend/apps/payroll/services.py - Payroll processing → Payroll records: processes payroll
backend/apps/payroll/services.py - Payroll processing → Organization structure: uses organization
backend/apps/payroll/services.py - Payroll processing → Employee records: reads employees
backend/apps/payroll/services.py - Payroll processing → Notifications: sends notices
backend/apps/payroll/services.py - Payroll reporting → Payroll records: reads payroll
backend/apps/payroll/services_reporting.py - Payroll reporting → Attendance records: reads attendance
backend/apps/payroll/services_reporting.py - Payroll reporting → Leave records: reads leave
backend/apps/payroll/services_reporting.py - Audit logging → Notifications: optional integration