HR Module¶
Purpose¶
The Human Resources module manages employee lifecycles, attendance tracking, leave requests, and complex payroll calculations.
Responsibilities¶
- Managing Employee profiles and records
- Tracking daily Attendance and Shift assignments
- Processing Leave Applications and managing Leave Ledgers
- Calculating and generating Payroll runs
- Managing onboarding and offboarding activities
File Structure¶
| Text Only | |
|---|---|
Database Models¶
EmployeeDepartmentDesignationAttendanceLeaveTypeLeaveApplicationLeaveLedgerEntryPayrollRunPayrollEntrySalaryStructure
API Endpoints¶
GET /api/v1/hr/employeesPOST /api/v1/hr/employeesGET /api/v1/hr/attendancePOST /api/v1/hr/leavesPOST /api/v1/hr/payroll/run
Key Flows¶
sequenceDiagram
participant Admin
participant API
participant DB
Admin->>API: POST /payroll/run (Month: June)
API->>DB: Fetch active employees
API->>DB: Fetch attendance & approved leaves for June
API->>API: Calculate Earnings & Deductions
API->>DB: Create PayrollRun & PayrollEntries
API-->>Admin: 200 OK (Payroll Generated)