spring-hrms is a centralized, full-stack Human Resource Management System (HRMS) for a single organization. Its intent is to replace scattered spreadsheets and disconnected tools with one platform that automates employee management, attendance, leave, payroll, performance, recruitment, onboarding, offboarding, training, and HR reporting.
This is a functional application, not a static UI prototype. Every form, button, table, filter, approval, dashboard, and report must connect to working application logic and persistent database records. The system is compliance-sensitive: payroll, employee documents, and personal information must only be accessible to authorized users, and statutory rates must never be hardcoded.
The audience is the organization's HR operations staff and its workforce: Super Admins who configure the system, HR Admins and HR Executives who run day-to-day HR operations, Department Managers who approve and review their teams, Recruiters who fill roles, Payroll Administrators who run payroll, and Employees who use self-service. The interface is designed as a power tool for keyboard-first operators who care about numbers lining up and audit trails being exact.
spring-hrms is delivered as a responsive web application with a React + TypeScript + Tailwind CSS frontend, a Python FastAPI backend, and a PostgreSQL database, deployed with Docker and environment-based configuration. Frontend, backend, database models, business logic, and API layers are kept clearly separated. The backend exposes OpenAPI/Swagger documentation.
Seven roles operate the system under backend-enforced role-based access control: Super Admin, HR Admin, HR Executive, Department Manager, Employee, Recruiter, and Payroll Administrator. Permissions are enforced on the backend, not only by hiding frontend pages, and organization-level data isolation applies to all protected state.
The system covers ten functional areas: Employee Management, Attendance Management, Leave Management, Payroll and Salary Management, Recruitment and Applicant Tracking, Onboarding and Offboarding, Performance Management, Training and Development, Employee Self-Service, and HR Analytics and Reporting. Each area is backed by normalized PostgreSQL tables with foreign keys, constraints, indexes, and migrations, and by complete, tested business workflows that use database transactions where needed to prevent inconsistent updates.
Delivery ownership. spring-hrms is a first-party application. All working surfaces — dashboards, records, approval queues, payroll runs, reports, and self-service pages — are owned and rendered by the application itself. There is no external or provider-owned surface carrying accepted product behavior.
Identity and access. The application owns identity. Because the system must keep durable, actor-specific state (employee records, leave balances, payslips, approvals, audit history) bound to the correct participant, first-use identity establishment and returning verification are required. Two first-use paths exist:
Returning users verify through sign-in. The public entry surface (Landing) and the three identity surfaces (Login, Sign Up, Invitation Acceptance) are anonymously reachable; every other destination requires an authenticated session and is further restricted by role. A protected destination never owns the interaction that establishes access to itself.
Current vs. future boundary. Everything described in this document is current scope. The system must not be claimed production-ready until its security, payroll calculations, integration tests, backups, and deployment configuration have been verified — that verification is a current acceptance obligation, not a future feature. Statutory rates and legal compliance are explicitly out of scope as hardcoded values: statutory rules are configurable, and calculations must be validated against current applicable regulations before production use.
Explicit exclusions. No excessive gradients, unnecessary animations, cluttered dashboards, or decorative components that reduce usability. No fake data as a substitute for implemented functionality; any seed/demo data must be clearly labeled. No hardcoded statutory rates and no assumption of legal compliance.
EMPLOYEES 248 · DEPARTMENTS 12 · OPEN REQS 9 — set in tabular JetBrains Mono at 14px. Right 42% is a full-height #1B1D20 panel showing a real, working slice of the product: a scrollable "Pending approvals" queue with three leave requests, each row a name, a date range in monospace, and a status pill, plus a thin tangerine rule marking the row under the cursor.#1B1D20 block with a 1px hairline, a 12px uppercase muted label, and a 40px monospace figure — no icons, no sparkline decoration, no coloured card backgrounds; the only colour is the figure's status tint. Below it, two-thirds/one-third chart rows. Content is scoped to the signed-in role: Super Admin sees system and access KPIs; HR Admin sees headcount, onboarding, and HR report KPIs; HR Executive sees assigned-operation KPIs; Department Manager sees team attendance, pending leave approvals, and review KPIs; Employee sees personal attendance, leave balance, and payslip KPIs; Recruiter sees requisition, applicant, and interview KPIs; Payroll Administrator sees payroll run, validation, and processing KPIs.PAY-2025-07) above the run name. All figures are exact tabular values.Each requirement is a distinct story point with provenance, lifecycle facts, and observable acceptance. Provenance is explicit (source-stated), basic_default (accepted default), or required_inference (indispensable inferred mechanics).
FR-1 — Returning verification. As a Super Admin, HR Admin, HR Executive, Department Manager, Employee, Recruiter, or Payroll Administrator, I should sign in with my credentials to establish an authenticated session and reach my role-appropriate Dashboard. Provenance: required_inference. Trigger: submission of credentials on Login. Observable result: an authenticated session is established and the role-appropriate Dashboard renders. Access state: anonymous entry. Failure/recovery: invalid credentials, disabled account, or backend unavailability produce a clear inline message without clearing fields; the user corrects input and resubmits. Continuation: the user proceeds to their role-scoped modules.
FR-2 — Self-service first-use enrollment. As an Employee, I should create my account through Sign Up so I can begin using self-service. Provenance: required_inference. Trigger: submission of the enrollment form. Observable result: the account is created, a first session is established, and the Dashboard renders. Access state: anonymous entry. Failure/recovery: duplicate email, weak password, or validation failure produce inline field errors; the user corrects and resubmits. Continuation: the employee proceeds to My Profile and My Attendance.
FR-3 — Invitation-based first-use enrollment. As a Super Admin, HR Admin, HR Executive, Department Manager, Recruiter, or Payroll Administrator, I should accept an invitation issued by an authorized administrator so I can activate my provisioned account. Provenance: required_inference. Trigger: opening the invitation link and submitting the password-creation form on Invitation Acceptance. Observable result: the account is activated with the assigned role and a first session is established. Access state: anonymous entry with a valid invitation token. Failure/recovery: expired, already-used, or invalid tokens produce a clear message with a path to request a new invitation. Continuation: the user proceeds to their role-scoped modules.
FR-4 — Access provisioning and role assignment. As a Super Admin, I should manage user access and role assignment in Settings so that every role operates within correct permissions and organization-level data isolation. Provenance: explicit. Trigger: creating or editing a user's role assignment, or issuing an invitation. Observable result: the assignment is persisted and enforced by the backend. Access state: role-restricted to Super Admin. Failure/recovery: unauthorized change attempts are rejected by the backend; validation errors are inline. Continuation: the affected user can accept the invitation or sign in with the assigned role.
FR-5 — Backend-enforced RBAC. As the system, I should enforce role-based permissions on the backend for every protected operation, not only by hiding frontend pages. Provenance: explicit. Trigger: any API request to a protected resource. Observable result: authorized requests succeed; unauthorized requests are rejected regardless of frontend state. Access state: authenticated session with role. Failure/recovery: rejection returns a safe error without leaking protected data. Continuation: the user remains on an authorized surface.
FR-6 — Organization-level data isolation. As the system, I should isolate data at the organization level so that records from one organization are never exposed to another. Provenance: explicit. Trigger: any data read or write. Observable result: only in-organization records are returned or mutated. Access state: authenticated session bound to an organization. Failure/recovery: cross-organization access attempts are rejected. Continuation: normal in-organization operation.
FR-7 — Employee records with unique IDs. As an HR Admin or HR Executive, I should create and maintain employee profiles with unique employee IDs so every person has one citable record. Provenance: explicit. Trigger: creating or editing an employee on Employees. Observable result: the record persists with a unique employee ID. Access state: role-restricted. Failure/recovery: duplicate or invalid IDs are rejected with inline errors. Continuation: the record is available for onboarding and downstream modules.
FR-8 — Employment attributes. As an HR Admin or HR Executive, I should record department, designation, reporting manager, employment type, and joining date for each employee. Provenance: explicit. Trigger: editing the employment section of an employee record. Observable result: attributes persist and drive manager-scoped behavior. Access state: role-restricted. Failure/recovery: invalid references are rejected with inline errors. Continuation: the reporting manager relationship governs leave approvals and team views.
FR-9 — Contact and emergency contacts. As an HR Admin or HR Executive, I should maintain contact information and emergency contacts for each employee. Provenance: explicit. Trigger: editing the contact section of an employee record. Observable result: contact and emergency-contact data persist. Access state: role-restricted; personal information is accessible only to authorized users. Failure/recovery: validation errors are inline. Continuation: the data is available to authorized HR users.
FR-10 — Secure document storage and access permissions. As an HR Admin or HR Executive, I should store employee documents securely and control who can access them. Provenance: explicit. Trigger: uploading a document and setting its access permissions. Observable result: the document is stored with validated file type and access is restricted to authorized users. Access state: role-restricted. Failure/recovery: invalid files are rejected with a reason; unauthorized access attempts are rejected by the backend. Continuation: authorized users can retrieve the document.
FR-11 — Employee status and employment history. As an HR Admin or HR Executive, I should change employee status and view employment history so the record reflects the person's actual state over time. Provenance: explicit. Trigger: a status change with confirmation. Observable result: the new status persists and the history entry is appended. Access state: role-restricted. Failure/recovery: invalid transitions are rejected with a clear message. Continuation: downstream modules reflect the new status.
FR-12 — Employee search and filter. As an HR Admin or HR Executive, I should search, filter, sort, and paginate employee records so I can find the right person quickly. Provenance: explicit. Trigger: entering search terms or filter values. Observable result: the table updates to matching rows with useful empty states. Access state: role-restricted. Failure/recovery: no matches produce a useful empty state with a clear-filter action. Continuation: the user opens the record.
FR-13 — Check-in and check-out. As an Employee, I should check in and check out so my working hours are recorded. Provenance: explicit. Trigger: the check-in or check-out control on My Attendance. Observable result: the punch is recorded with a timestamp and the summary updates. Access state: role-restricted to the signed-in employee's own record. Failure/recovery: duplicate punches are prevented with a clear message; failures allow retry. Continuation: the employee views the updated summary.
FR-14 — Working hours and attendance summaries. As an Employee, I should view my working hours and attendance summaries so I can verify my own record. Provenance: explicit. Trigger: opening My Attendance. Observable result: exact tabular working hours and summaries render. Access state: role-restricted. Failure/recovery: load failure allows retry. Continuation: the employee filters by date range.
FR-15 — Shift and holiday configuration. As an HR Admin or HR Executive, I should configure shifts and holidays so attendance is evaluated against the correct schedule. Provenance: explicit. Trigger: creating or editing shifts and holidays on Attendance. Observable result: configuration persists and applies to attendance evaluation. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: attendance records reflect the configured schedule.
FR-16 — Late arrivals, missing punches, and corrections. As an HR Admin, HR Executive, or Department Manager, I should review late arrivals and missing punches and apply corrections so attendance records are accurate. Provenance: explicit. Trigger: selecting a flagged record and submitting a correction with a reason. Observable result: the correction persists and the record updates. Access state: role-restricted. Failure/recovery: corrections require a reason; failures allow retry. Continuation: the corrected record feeds monthly reports.
FR-17 — Monthly attendance reports. As an HR Admin or HR Executive, I should generate monthly attendance reports so attendance can be reviewed and exported. Provenance: explicit. Trigger: selecting a month and generating the report on Attendance. Observable result: the report renders with exact tabular values and can be exported. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is exported or reviewed.
FR-18 — Team attendance review. As a Department Manager, I should review my team's attendance and generate team reports so I can act on team-level patterns. Provenance: explicit. Trigger: opening Team Attendance. Observable result: team attendance and reports render with exact tabular values. Access state: role-restricted to the manager's team. Failure/recovery: load or export failure allows retry. Continuation: the manager filters or exports.
FR-19 — Configurable leave types and balances. As an HR Admin or HR Executive, I should configure leave types and leave balances so leave policy is expressed in the system. Provenance: explicit. Trigger: creating or editing a leave type and its balance rules on Leave Settings. Observable result: configuration persists and governs leave applications. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: employees can apply against the configured types.
FR-20 — Leave application. As an Employee, I should apply for leave with dates, reason, and supporting documents where applicable so my request enters the approval workflow. Provenance: explicit. Trigger: submitting the leave application form on My Leave. Observable result: the request persists with status pending and the balance reflects the request. Access state: role-restricted to the employee's own requests. Failure/recovery: validation errors are inline; insufficient balance is blocked with a clear message. Continuation: the request appears in the manager's approval queue.
FR-21 — Manager approval and rejection with comments. As a Department Manager, I should approve or reject leave requests with comments so my team's leave is decided and recorded. Provenance: explicit. Trigger: an approve or reject decision on Leave Approvals. Observable result: the decision persists with the comment, the balance updates, and the requester is notified. Access state: role-restricted to the manager's team. Failure/recovery: rejection requires a comment; decision failure allows retry. Continuation: the employee sees the updated status.
FR-22 — Leave cancellation. As an Employee, I should cancel a leave request so my plans and balances stay accurate. Provenance: explicit. Trigger: the cancel control on a request in My Leave, with confirmation. Observable result: the request is cancelled and the balance is restored. Access state: role-restricted to the employee's own requests. Failure/recovery: cancellation of an already-decided request is handled with a clear message; failures allow retry. Continuation: the employee views the updated history.
FR-23 — Leave history and balance updates. As an Employee, I should view my leave history and balance updates so I know where I stand. Provenance: explicit. Trigger: opening My Leave. Observable result: history and current balances render with exact tabular values. Access state: role-restricted. Failure/recovery: load failure allows retry. Continuation: the employee applies for or cancels leave.
FR-24 — Leave notifications and audit history. As an HR Admin or HR Executive, I should view leave notifications and audit history so leave decisions are traceable. Provenance: explicit. Trigger: opening the audit history and notification log on Leave Settings. Observable result: notifications and audit entries render with exact timestamps. Access state: role-restricted. Failure/recovery: load failure allows retry. Continuation: the user reviews or filters the history.
FR-25 — Salary structures and effective dates. As a Payroll Administrator, I should configure salary structures with effective dates so pay is correct for the period it applies to. Provenance: explicit. Trigger: creating or editing a salary structure with an effective date on Payroll. Observable result: the structure persists and applies from its effective date. Access state: role-restricted. Failure/recovery: overlapping or invalid effective dates are rejected with inline errors. Continuation: the structure is used in payroll preparation.
FR-26 — Earnings, allowances, deductions, and net salary. As a Payroll Administrator, I should define earnings, allowances, and deductions so net salary is calculated exactly. Provenance: explicit. Trigger: configuring components on a salary structure. Observable result: components persist and net salary is computed with exact tabular values. Access state: role-restricted. Failure/recovery: invalid component values are rejected with inline errors. Continuation: the structure is ready for a payroll run.
FR-27 — Payroll preparation and validation. As a Payroll Administrator, I should prepare a payroll run and validate it so errors are caught before approval. Provenance: explicit. Trigger: preparing a run for a payroll period and running validation. Observable result: the run is prepared and validation returns a pass or a list of offending records. Access state: role-restricted. Failure/recovery: validation failures list the offending records; the administrator corrects them and re-validates. Continuation: a validated run proceeds to approval.
FR-28 — Authorized payroll approval. As an authorized approver (Payroll Administrator or HR Admin), I should approve a validated payroll run so processing is authorized. Provenance: explicit. Trigger: the approval control on a validated run. Observable result: the run is marked approved and the approval is recorded in the audit log. Access state: role-restricted to authorized roles; unauthorized approval attempts are rejected by the backend. Failure/recovery: approval of an unvalidated run is blocked with a clear message. Continuation: the run proceeds to processing.
FR-29 — Payroll processing and payslip generation. As a Payroll Administrator, I should process an approved payroll run and generate payslips so employees are paid and can access their payslips. Provenance: explicit. Trigger: the process control on an approved run. Observable result: the run is processed, payslips are generated, and the run ID is recorded. Access state: role-restricted. Failure/recovery: processing failure allows retry without duplicating results. Continuation: employees can view and download payslips.
FR-30 — Payslip viewing and download. As an Employee, I should view and download my payslips so I have my own pay records. Provenance: explicit. Trigger: opening My Payslips and selecting a payslip. Observable result: the payslip renders with exact tabular values and downloads. Access state: role-restricted to the employee's own payslips. Failure/recovery: load or download failure allows retry. Continuation: the employee filters by payroll period.
FR-31 — Payroll history and reconciliation reports. As a Payroll Administrator, I should view payroll history and produce reconciliation reports so payroll is auditable. Provenance: explicit. Trigger: opening payroll history or generating a reconciliation report on Payroll. Observable result: history and reconciliation reports render with exact tabular values and can be exported. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is exported or reviewed.
FR-32 — Configurable statutory rules and payroll periods. As a Payroll Administrator, I should configure statutory rules and payroll periods so calculations follow current applicable regulations without hardcoded rates. Provenance: explicit. Trigger: creating or editing statutory rules and payroll periods on Payroll Settings. Observable result: configuration persists with effective dates; no rate is hardcoded. Access state: role-restricted. Failure/recovery: unconfigured rates are flagged; validation errors are inline. Continuation: payroll validation uses the configured rules.
FR-33 — Job requisitions and postings. As a Recruiter or HR Admin, I should create job requisitions and postings so open roles are tracked. Provenance: explicit. Trigger: creating a requisition and posting on Recruitment. Observable result: the requisition persists with a citable requisition number and the posting is recorded. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: applicants can be associated with the requisition.
FR-34 — Applicant profiles and document uploads. As a Recruiter or HR Admin, I should manage applicant profiles and resume/document uploads so candidate information is complete. Provenance: explicit. Trigger: creating an applicant profile and uploading documents. Observable result: the profile and validated documents persist. Access state: role-restricted. Failure/recovery: invalid files are rejected with a reason. Continuation: the applicant moves through stages.
FR-35 — Application stages and interview scheduling. As a Recruiter or HR Admin, I should move applicants through application stages and schedule interviews so the pipeline advances. Provenance: explicit. Trigger: a stage change or interview scheduling action. Observable result: the stage persists and the interview is scheduled. Access state: role-restricted. Failure/recovery: scheduling conflicts are surfaced with a clear message. Continuation: interview feedback is recorded.
FR-36 — Interview feedback and hiring decisions. As a Recruiter or HR Admin, I should record interview feedback and hiring decisions so selection is documented. Provenance: explicit. Trigger: submitting feedback and a hiring decision. Observable result: feedback and the decision persist against the applicant. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: a selected candidate is converted into an employee record.
FR-37 — Candidate-to-employee conversion. As a Recruiter or HR Admin, I should convert a selected candidate into an employee record so hiring flows into onboarding. Provenance: explicit. Trigger: the conversion action on a selected candidate, with confirmation. Observable result: an employee record is created and linked to the candidate. Access state: role-restricted. Failure/recovery: conversion failure allows retry without creating duplicates. Continuation: the new employee enters the onboarding checklist.
FR-38 — Joining and exit checklists. As an HR Admin or HR Executive, I should run joining and exit checklists so every start and departure follows the same steps. Provenance: explicit. Trigger: starting a checklist for an employee on Onboarding & Offboarding. Observable result: the checklist persists with its tasks. Access state: role-restricted. Failure/recovery: incomplete mandatory items block completion with inline errors. Continuation: tasks are assigned and tracked.
FR-39 — Document verification and policy acknowledgements. As an HR Admin or HR Executive, I should verify documents and capture policy acknowledgements so compliance is recorded. Provenance: explicit. Trigger: verifying a document or capturing an acknowledgement. Observable result: the verification or acknowledgement persists against the employee. Access state: role-restricted. Failure/recovery: missing or invalid documents are flagged with a reason. Continuation: the checklist advances.
FR-40 — Task assignment and completion tracking. As an HR Admin or HR Executive, I should assign tasks and track their completion so onboarding and offboarding progress is visible. Provenance: explicit. Trigger: assigning a task or marking one complete. Observable result: the task state persists and checklist progress updates. Access state: role-restricted. Failure/recovery: save failure allows retry. Continuation: the checklist proceeds to the next step.
FR-41 — Asset allocation and return. As an HR Admin or HR Executive, I should allocate and record the return of assets so company property is accounted for. Provenance: explicit. Trigger: allocating an asset or recording its return. Observable result: the asset ledger persists the allocation or return. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: the checklist reflects the asset state.
FR-42 — Exit interviews, clearance, and final settlement. As an HR Admin or HR Executive, I should conduct exit interviews, record clearance, and run the final settlement workflow so departures complete correctly. Provenance: explicit. Trigger: recording an exit interview, clearing departments, and running final settlement. Observable result: the interview, clearance, and final settlement persist and the offboarding completes. Access state: role-restricted. Failure/recovery: outstanding clearance blocks completion with inline errors. Continuation: the employee record reflects the completed exit.
FR-43 — Goals, KPIs, and review cycles. As an HR Admin or Department Manager, I should configure goals, KPIs, and review cycles so performance is measured consistently. Provenance: explicit. Trigger: creating a review cycle with goals and KPIs on Performance. Observable result: the cycle, goals, and KPIs persist. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: employees can submit self-assessments.
FR-44 — Employee self-assessments. As an Employee, I should submit a self-assessment so my perspective is part of the review. Provenance: explicit. Trigger: submitting the self-assessment form on My Performance. Observable result: the self-assessment persists against the active cycle. Access state: role-restricted to the employee's own review. Failure/recovery: validation errors are inline; submission failure allows retry. Continuation: the manager conducts the review.
FR-45 — Manager reviews and feedback. As a Department Manager, I should conduct manager reviews and provide feedback so the review is complete. Provenance: explicit. Trigger: submitting the manager review and feedback. Observable result: the review and feedback persist. Access state: role-restricted to the manager's team. Failure/recovery: finalization is blocked until manager feedback is complete. Continuation: the final review is recorded.
FR-46 — Review history and performance reports. As an HR Admin or Department Manager, I should view review history and generate performance reports so performance is auditable. Provenance: explicit. Trigger: opening review history or generating a performance report. Observable result: history and reports render and can be exported. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is exported or reviewed.
FR-47 — Training programs and learning resources. As an HR Admin, I should create training programs and learning resources so employees have structured development. Provenance: explicit. Trigger: creating a program and attaching resources on Training. Observable result: the program and resources persist. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: employees can be enrolled.
FR-48 — Employee enrollment and attendance. As an HR Admin or Employee, I should enroll employees in training and record attendance so participation is tracked. Provenance: explicit. Trigger: enrolling an employee or recording training attendance. Observable result: the enrollment and attendance persist. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: completion and assessment are recorded.
FR-49 — Training completion and assessment records. As an HR Admin, I should record training completion and assessment results so outcomes are documented. Provenance: explicit. Trigger: recording completion and an assessment result. Observable result: the completion and assessment persist against the employee. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: skills and certifications are updated.
FR-50 — Skills and certification tracking. As an HR Admin, I should track skills and certifications so the organization knows its capabilities. Provenance: explicit. Trigger: adding or updating a skill or certification. Observable result: the skill or certification persists with its validity. Access state: role-restricted. Failure/recovery: validation errors are inline. Continuation: the record is available in reports.
FR-51 — Personal dashboard and profile updates. As an Employee, I should view my personal dashboard and update my profile so my information stays current. Provenance: explicit. Trigger: opening My Profile and submitting permitted updates. Observable result: updates persist and the dashboard reflects them. Access state: role-restricted to the employee's own profile. Failure/recovery: validation errors are inline; save failure allows retry. Continuation: the employee returns to the dashboard.
FR-52 — Company announcements, holidays, and notifications. As an Employee, I should view company announcements, holidays, and notifications so I stay informed. Provenance: explicit. Trigger: opening Announcements. Observable result: announcements, the holiday calendar, and notifications render. Access state: role-restricted. Failure/recovery: load failure allows retry. Continuation: the employee marks notifications as read.
FR-53 — Training and performance information according to permissions. As an Employee, I should view my training and performance information according to my permissions so I can act on my own development. Provenance: explicit. Trigger: opening My Performance or Training. Observable result: only information the employee is permitted to see renders. Access state: role-restricted. Failure/recovery: unauthorized access attempts are rejected by the backend. Continuation: the employee submits a self-assessment or completes training.
FR-54 — Headcount and department distribution. As an HR Admin, Department Manager, or Payroll Administrator, I should view total employees and department distribution so I understand the organization's shape. Provenance: explicit. Trigger: running the headcount report on Reports. Observable result: headcount and distribution render with exact tabular values. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-55 — Attendance and leave trends. As an HR Admin or Department Manager, I should view attendance and leave trends so I can spot patterns. Provenance: explicit. Trigger: running the attendance and leave trend report. Observable result: trends render as charts and tables. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-56 — Recruitment funnel and hiring statistics. As an HR Admin, I should view the recruitment funnel and hiring statistics so hiring is measurable. Provenance: explicit. Trigger: running the recruitment report. Observable result: funnel and hiring statistics render. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-57 — Payroll summaries. As a Payroll Administrator or HR Admin, I should view payroll summaries so payroll is reviewable at a glance. Provenance: explicit. Trigger: running the payroll summary report. Observable result: payroll summaries render with exact tabular values. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-58 — Employee turnover and onboarding status. As an HR Admin, I should view employee turnover and onboarding status so attrition and ramp-up are visible. Provenance: explicit. Trigger: running the turnover and onboarding report. Observable result: turnover and onboarding status render. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-59 — Performance and training reports. As an HR Admin or Department Manager, I should view performance and training reports so development outcomes are measurable. Provenance: explicit. Trigger: running the performance and training report. Observable result: performance and training reports render. Access state: role-restricted. Failure/recovery: report failure allows retry. Continuation: the report is filtered or exported.
FR-60 — Report filters. As an HR Admin, Department Manager, or Payroll Administrator, I should filter reports by date, department, employee, and status so I can narrow to what matters. Provenance: explicit. Trigger: applying filter values on Reports. Observable result: the report updates to the filtered scope with a useful empty state when nothing matches. Access state: role-restricted. Failure/recovery: no matches produce a useful empty state with a clear-filter action. Continuation: the user adjusts filters or exports.
FR-61 — CSV and PDF exports. As an HR Admin, Department Manager, or Payroll Administrator, I should export reports as CSV or PDF where appropriate so results can be shared. Provenance: explicit. Trigger: the CSV or PDF export control on a report. Observable result: the export downloads with progress and completion feedback. Access state: role-restricted. Failure/recovery: export failure reports the reason and allows retry. Continuation: the user shares or archives the export.
FR-62 — Audit logs for sensitive changes and approvals. As a Super Admin, I should review audit logs of sensitive changes and approvals so the system is traceable. Provenance: explicit. Trigger: opening Audit Logs and applying filters. Observable result: audit entries render with actor, entity, action, and exact timestamps. Access state: role-restricted to Super Admin. Failure/recovery: load failure allows retry. Continuation: the user opens the affected record.
FR-63 — System and organization configuration. As a Super Admin, I should configure system and organization settings so the HRMS matches the organization. Provenance: explicit. Trigger: editing settings on Settings. Observable result: settings persist and apply across the system. Access state: role-restricted to Super Admin. Failure/recovery: validation errors are inline; unauthorized changes are rejected by the backend. Continuation: the configuration governs other modules.
FR-64 — HR Executive assigned operations. As an HR Executive, I should complete the HR operational tasks assigned to me within my limited permissions so I can support HR operations. Provenance: explicit. Trigger: opening HR Operations and completing an assigned task. Observable result: the task completion persists. Access state: role-restricted to assigned operations. Failure/recovery: unauthorized actions are rejected by the backend; completion failure allows retry. Continuation: the task leaves the assigned queue.
Product context. The Super Admin is the system's owner-operator: the person who stands up the HRMS for the organization and keeps it correct. Their work is configuration and control, not day-to-day HR processing.
Primary goal. Keep the system configured, the organization's settings accurate, and access correctly assigned so every other role operates within the right permissions and data isolation.
Distinct accepted responsibilities. Configure system and organization settings; manage user access and role assignment; issue invitations to privileged and internal roles; review audit logs of sensitive changes and approvals.
Relevant inputs or decisions. Organization settings values; role assignments; invitation issuance; audit filters (actor, entity, action, date range).
Interactions with other accepted participants. The Super Admin provisions every other role. Their access decisions determine what HR Admins, HR Executives, Department Managers, Recruiters, Payroll Administrators, and Employees can see and do. Their audit review observes the actions of all other roles.
Observable success. Settings persist and apply system-wide; role assignments are enforced by the backend; invitations activate accounts with the correct role; audit entries render with exact timestamps and link to affected records.
Product context. The HR Admin is the broadest operational role: they own employee records, recruitment, onboarding, payroll administration, and HR reports. They are the person who keeps the organization's HR data complete and correct.
Primary goal. Maintain accurate employee records and run HR operations end to end, from hiring through onboarding, payroll administration, and reporting.
Distinct accepted responsibilities. Maintain employee profiles, employment attributes, contact and emergency contacts, documents and their access permissions, status, and employment history; run joining and exit checklists, document verification, policy acknowledgements, task tracking, asset allocation and return, exit interviews, clearance, and final settlement; administer payroll alongside the Payroll Administrator; produce HR reports across headcount, attendance, leave, recruitment, payroll, turnover, onboarding, performance, and training.
Relevant inputs or decisions. Employee record edits; document uploads and access decisions; checklist task assignments and verifications; report filters and exports.
Interactions with other accepted participants. The HR Admin works with HR Executives on assigned operations, with Recruiters on requisitions and candidate conversion, with Department Managers on team data and reviews, with Payroll Administrators on payroll administration, and with Employees whose records and onboarding they maintain.
Observable success. Employee records persist with unique IDs and complete attributes; documents are stored securely with correct access; checklists complete; reports render and export.
Product context. The HR Executive performs assigned HR operations with limited permissions. Their work is a scoped subset of HR Admin work, and their access is restricted to their assignments.
Primary goal. Complete the HR operational tasks assigned to them accurately and within their permissions.
Distinct accepted responsibilities. Support employee records, attendance and leave processing, and onboarding tasks within the scope assigned to them.
Relevant inputs or decisions. Assigned task list; task detail; completion decisions.
Interactions with other accepted participants. The HR Executive receives assignments from HR Admins and works alongside them on employee records, attendance and leave processing, and onboarding. Their limited permissions mean they see only their assigned scope.
Observable success. Assigned tasks complete and leave the queue; unauthorized actions are rejected by the backend; their work is visible to the HR Admin who assigned it.
Product context. The Department Manager owns team-level oversight: attendance, leave approvals, performance reviews, and team reports. They are the decision-maker for their team's day-to-day HR events.
Primary goal. Keep their team's attendance, leave, and performance accurate and decided, and report on team outcomes.
Distinct accepted responsibilities. Review team attendance and generate team reports; approve or reject leave requests with comments; conduct performance reviews and provide feedback; finalize reviews; view team performance reports.
Relevant inputs or decisions. Team attendance records and corrections; leave requests with dates, reasons, and supporting documents; approve/reject decisions with comments; self-assessments from their team; manager review and feedback.
Interactions with other accepted participants. The Department Manager decides on leave requests submitted by Employees, reviews their self-assessments, and reports to HR Admins. Their team scope is derived from the reporting-manager relationship recorded on employee records.
Observable success. Leave decisions record with comments and update balances; team attendance and reports render with exact values; reviews finalize only after manager feedback is complete.
Product context. The Employee is the self-service user: the person whose record, attendance, leave, payslips, training, and performance live in the system. They interact with the HRMS most frequently and most personally.
Primary goal. Manage their own HR affairs — attendance, leave, payslips, profile, training, and performance — without going through HR for routine tasks.
Distinct accepted responsibilities. Check in and check out; view working hours and attendance summaries; apply for and cancel leave; view leave history, approval status, and balances; view and download payslips; view and update their profile; submit self-assessments; complete training; view announcements, holidays, and notifications; view training and performance information according to permissions.
Relevant inputs or decisions. Check-in/check-out actions; leave application dates, reason, and supporting documents; cancellation decisions; profile updates; self-assessment content.
Interactions with other accepted participants. The Employee submits leave requests that Department Managers decide; receives payslips generated by Payroll Administrators; receives announcements and notifications; and sees performance feedback from their manager.
Observable success. Punches record and summaries update; leave requests submit, get decided, and update balances; payslips render and download; profile updates persist; self-assessments submit.
Product context. The Recruiter owns the hiring pipeline: job openings, applicants, interview schedules, and recruitment stages. Their work is pipeline-shaped and stage-driven.
Primary goal. Fill open roles by moving candidates through a documented pipeline to a hiring decision and into onboarding.
Distinct accepted responsibilities. Create job requisitions and postings; manage applicant profiles and resume/document uploads; move applicants through application stages; schedule interviews; record interview feedback and hiring decisions; convert selected candidates into employee records.
Relevant inputs or decisions. Requisition details; applicant profiles and documents; stage transitions; interview schedules; feedback and hiring decisions; conversion decisions.
Interactions with other accepted participants. The Recruiter works with HR Admins on requisitions and conversion; converted candidates become Employees who enter the onboarding checklist run by HR Admins and HR Executives.
Observable success. Requisitions persist with citable numbers; applicants move through stages; interviews schedule; feedback and decisions record; conversion creates an employee record without duplicates.
Product context. The Payroll Administrator owns the money: salary structures, payroll runs, deductions, payslips, and payroll reports. Their work is exact, period-driven, and compliance-sensitive.
Primary goal. Run payroll correctly for each period — configured, validated, approved, processed, and reconciled — with exact figures and no hardcoded statutory rates.
Distinct accepted responsibilities. Configure salary structures and effective dates; define earnings, allowances, and deductions; prepare and validate payroll runs; obtain authorized approval; process runs and generate payslips; produce payroll history and reconciliation reports; configure statutory rules and payroll periods.
Relevant inputs or decisions. Salary structure components and effective dates; payroll period selection; validation results and corrections; approval decisions; statutory rule configuration.
Interactions with other accepted participants. The Payroll Administrator works alongside HR Admins on payroll administration; their processed runs produce payslips that Employees view and download; their statutory configuration is reviewed by Super Admins through audit logs.
Observable success. Structures persist with effective dates; validation catches errors before approval; approved runs process and generate payslips; reconciliation reports render and export with exact tabular values.
PAY-2025-07).Muse and headline. Rasmus Andersson. Systematic product craft with an opinion: warm graphite HRMS, tangerine signal, tabular numerals as ornament. The emotional register is trust, legibility, and stamina — a power tool readable after the eighth hour, dense with records, and honest about state.
Dark mode (primary):
| Role | Token | Hex |
|---|---|---|
| Background | --bg | #141517 |
| Surface / panel | --surface | #1B1D20 |
| Text (body, tables) | --text | #F2EFE9 |
| Primary (actions, active nav, focus) | --primary | #E8613C |
| Accent (positive/complete signal only) | --accent | #C9F24D |
| Muted (metadata, timestamps, helper) | --muted | #8C8F94 |
| Hairline border | --border | rgba(242,239,233,0.10) |
| Sticky-header shadow | --header-shadow | 0 1px 0 rgba(0,0,0,0.4) |
Status semantics (fixed, never decorative):
| Meaning | Token | Hex |
|---|---|---|
| Action required | --status-action | #E8613C |
| Positive / complete | --status-positive | #C9F24D |
| Pending / warning | --status-pending | #E0B341 |
| Error / rejected | --status-error | #D9534F |
Light mode variant: background #F6F3EE (warm paper), text #141517 (ink), same tangerine #E8613C and lime #C9F24D accents, so both modes share one identity.
Compact, rectilinear, precise. 6px radius on inputs and buttons; 10px on panels and modals; 999px only for status pills. Hairline 1px borders at 10% warm white do the structural work instead of shadows; a single 0 1px 0 rgba(0,0,0,0.4) under sticky headers. Focus is a 2px tangerine ring with 2px offset, never a glow. No rounded-blob containers, no floating glass, no drop shadows on cards — depth comes from surface lift (#1B1D20 over #141517) and rules.
4/8pt scale. 12-column grid with 24px gutters; 1280px max reading width for forms; full-bleed for tables.
The interface is the imagery: real data tables, charts, org trees, and audit timelines. Supporting graphics are schematic only — thin-stroke diagram icons for modules, a simple org-chart line drawing, sparkline and bar charts in the four status colours. Employee photos are square, 1px-bordered, desaturated 10% so they sit inside the graphite rather than popping out of it. No stock photography, no gradient blobs, no 3D props.
The product is the hero. The public entry (Landing) is a split, not a centre-stack. The left 58% is graphite #141517 carrying a left-aligned Inter Tight headline — "Every employee record, one system" — at 48px mobile to 96px desktop, with a monospace sub-line reading the live counts of the seeded demo organization: EMPLOYEES 248 · DEPARTMENTS 12 · OPEN REQS 9, set in tabular JetBrains Mono at 14px. A single tangerine 44px-tall Sign in button sits pinned beneath the headline, flush left with the headline's optical edge.
The right 42% is a full-height panel in #1B1D20 showing a real, working slice of the product: a scrollable Pending approvals queue with three leave requests, each row a name, a date range in monospace, and a status pill, plus a thin tangerine rule marking the row under the cursor. No gradient, no illustration, no centred headline-and-button stack — the product itself is the hero image, and it is the actual component the app renders after login.
Signature moves carried through the whole system:
#E8613C bar on the inner edge of the left rail, and the same 3px rule slides to the hovered row in any approval queue — making "where you are" and "what you can act on" the same visual language.EMP-00418, PAY-2025-07) above the name, giving every record a citable identity for audit.#1B1D20 block with a 1px hairline, a 12px uppercase muted label, and a 40px monospace figure — no icons, no sparkline decoration, no coloured card backgrounds; the only colour is the figure's status tint.Interaction Model: Static (direction) Motion Tempo: restrained Hero Dimensionality: flat
EMPLOYEES 248 · DEPARTMENTS 12 · OPEN REQS 9 on the left.#1B1D20 panel with three approval rows, each a name, a monospace date range, and a status pill, with the tangerine rule resting on the first row.prefers-reduced-motion, all counters render final values immediately, transitions become instant, and the hover rule appears without sliding. The approvals queue remains scrollable so every row can be brought fully into view.NFR-1 — Backend-enforced authorization. Permissions must be enforced on the backend, not only by hiding frontend pages. Provenance: explicit. Rationale: the source states this as a hard constraint; frontend-only hiding is insufficient for a compliance-sensitive HRMS.
NFR-2 — Organization-level data isolation. Data must be isolated at the organization level so records from one organization are never exposed to another. Provenance: explicit.
NFR-3 — Restricted access to sensitive data. Payroll, employee documents, and personal information must only be accessible to authorized users. Provenance: explicit.
NFR-4 — No hardcoded statutory rates. Statutory rates must never be hardcoded and legal compliance must never be assumed; calculations must be validated against current applicable regulations before production use. Provenance: explicit.
NFR-5 — Secure password hashing and authentication. Passwords must be securely hashed and authentication must use a secure session or token-based mechanism. Provenance: explicit.
NFR-6 — Input validation and safe error handling. All input must be validated and errors handled safely without leaking protected data. Provenance: explicit.
NFR-7 — Protection against common web vulnerabilities. The system must protect against unauthorized data access and common web vulnerabilities. Provenance: explicit.
NFR-8 — Audit logs for sensitive changes and approvals. Sensitive changes and approvals must be recorded in audit logs. Provenance: explicit.
NFR-9 — Secure document access and file validation. Document access must be secure and uploaded files must be validated. Provenance: explicit.
NFR-10 — Environment variables for credentials and secrets. Credentials and secrets must be supplied through environment variables. Provenance: explicit.
NFR-11 — Automated backups and documented recovery. Automated database backups and a documented recovery strategy must be in place. Provenance: explicit.
NFR-12 — Normalized schema with integrity. PostgreSQL tables must be normalized with appropriate foreign keys, constraints, indexes, and migrations. Provenance: explicit.
NFR-13 — Transactional consistency. Database transactions must be used where needed to prevent inconsistent updates. Provenance: explicit.
NFR-14 — Responsive layouts. Layouts must be responsive for desktop, tablet, and mobile. Provenance: explicit.
NFR-15 — Accessible forms with inline validation. Forms must be accessible with inline validation and clear error messages. Provenance: explicit.
NFR-16 — Loading, confirmation, and feedback states. The interface must provide loading states, confirmation dialogs, and success/error feedback. Provenance: explicit.
NFR-17 — Search, filtering, sorting, pagination, and empty states. Lists must support search, filtering, sorting, pagination, and useful empty states. Provenance: explicit.
NFR-18 — Design restraint. Excessive gradients, unnecessary animations, cluttered dashboards, and decorative components that reduce usability must be avoided. Provenance: explicit.
NFR-19 — No fake data. Fake data must not substitute for implemented functionality; any seed/demo data must be clearly labeled. Provenance: explicit.
NFR-20 — No premature production-readiness claim. The system must not be claimed production-ready until its security, payroll calculations, integration tests, backups, and deployment configuration have been verified. Provenance: explicit.
NFR-21 — Incremental build with per-module verification. The system must be built incrementally, keeping the approved requirements and design as the source of truth. After each module: run frontend and backend tests, validate API authorization, test database persistence and error cases, check responsive layouts, and fix broken workflows before moving forward. Provenance: explicit.
NFR-22 — Deliverables. Maintainable source code, database migrations, API documentation, setup instructions, automated tests, and deployment configuration must be delivered. Provenance: explicit.
NFR-23 — Pre-implementation artifacts. Before implementation, the following must be produced: a requirements specification; a user roles and permission matrix; screen-by-screen user flows; a database ER diagram and schema; a system architecture and API plan; and development milestones and a test plan. Provenance: explicit.
NFR-24 — Readable text and controls at every viewport. Headlines, wordmarks, labels, numbers, cards' text, and controls must stay entirely inside the viewport and their container at 375px, 768px, and 1280px, wrapping or scaling (for example font-size: clamp(...) with its mobile size) to fit, with no other element covering any part of them. Provenance: explicit (design constraint).
NFR-25 — Exact tabular figures. Payroll and attendance figures must show exact tabular values and must not be rounded for display. Provenance: explicit (creative direction).
All choices below are source-specified.
Service boundary. The HRMS is a single first-party application. The FastAPI backend owns all APIs, domain logic, RBAC enforcement, organization-level data isolation, document handling, payroll computation, and audit logging; it is extended with routes and modules rather than split into separate services. The React frontend is served as the application's UI. PostgreSQL is the single persistent store, accessed through migrations. Docker Compose runs the frontend, backend, and database with environment-based configuration. No separate queue worker, microservice, or additional ingress route is required by any accepted workflow.
EMPLOYEES 248 · DEPARTMENTS 12 · OPEN REQS 9) is clearly labeled seed/demo data, per the source's requirement that any seed/demo data be clearly labeled. [Assumption — the counts are illustrative of a seeded demo organization.]EMP-00418).PAY-2025-07).
01 Workspace entry

01 Workspace entry
No comments yet. Be the first!