# rahulkumar971/hr-management-system architecture

> Architecture diagram of the GitHub repository rahulkumar971/hr-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahulkumar971/hr-management-system
- Repository: https://github.com/rahulkumar971/hr-management-system

## Overview

HRMS is a full-stack human-resources application: a Next.js interface for employee and HR/admin tasks, backed by a Spring Boot REST API and MySQL. Users authenticate, then manage employee records and use domain workflows including attendance, leave, onboarding, recruitment, payroll, performance, training, and notifications. The backend separates request controllers, business services, repositories, and persistent entities. The README documents the three-tier stack and the source index shows selected controller-to-service and service-to-repository dependencies; many feature-specific implementations were not sampled, so their internal links are not expanded.

Main entry points: [`backend/hrms/src/main/java/com/hrms/controller`](https://github.com/rahulkumar971/hr-management-system/tree/main/backend/hrms/src/main/java/com/hrms/controller) (REST controllers), [`backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java`](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java) (Employee persistence), [`frontend/src/app`](https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/app) (Role-based workspace), [`frontend/src/lib`](https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/lib) (API clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web experience"]
  node_web["Role-based workspace"]
  node_webapi["API clients"]
end

subgraph group_identity["Identity and employees"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_employees["Employee records"]
  node_employee_store["Employee persistence"]
  node_employee_entity["Employee identity model<br/>[Employee.java]"]
end

subgraph group_workforce["Workforce operations"]
  node_attendance["Attendance and reports"]
  node_leave["Leave management<br/>[LeaveService.java]"]
  node_payroll["Payroll and payslips"]
end

subgraph group_talent["Talent lifecycle"]
  node_onboarding["Onboarding and documents"]
  node_recruitment["Recruitment"]
  node_performance["Performance reviews"]
  node_training["Training and enrollment"]
end

subgraph group_platform["Backend platform"]
  node_api["REST controllers"]
  node_notifications["Notifications and greetings"]
  node_email["Email delivery<br/>[EmailService.java]"]
  node_security["Request security<br/>[JwtAuthFilter.java]"]
end

node_users(("HR and employees"))
node_mysql[("MySQL database")]

node_users -->|"use"| node_web
node_web -.->|"requests through"| node_webapi
node_webapi -.->|"calls API"| node_api
node_api -->|"delegates auth"| node_auth
node_api -.->|"delegates employee tasks"| node_employees
node_api -.->|"delegates attendance"| node_attendance
node_api -->|"delegates leave"| node_leave
node_api -->|"delegates onboarding"| node_onboarding
node_api -.->|"delegates payroll"| node_payroll
node_api -.->|"delegates hiring"| node_recruitment
node_api -.->|"delegates reviews"| node_performance
node_api -.->|"delegates training"| node_training
node_api -.->|"delegates notifications"| node_notifications
node_auth -->|"looks up accounts"| node_employee_store
node_employees -->|"reads and writes"| node_employee_store
node_employee_store -->|"persists"| node_employee_entity
node_api -->|"sends OTP mail"| node_email
node_api -.->|"persists through backend"| node_mysql
node_api -.->|"protected by"| node_security
node_users -->|"authenticate and manage"| node_api

click node_web "https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/app"
click node_webapi "https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/lib"
click node_api "https://github.com/rahulkumar971/hr-management-system/tree/main/backend/hrms/src/main/java/com/hrms/controller"
click node_auth "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/AuthService.java"
click node_employees "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/EmployeeService.java"
click node_employee_store "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java"
click node_employee_entity "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/entity/Employee.java"
click node_attendance "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/AttendanceService.java"
click node_leave "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/LeaveService.java"
click node_payroll "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/PayrollService.java"
click node_onboarding "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/OnboardingService.java"
click node_recruitment "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/RecruitmentService.java"
click node_performance "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/PerformanceService.java"
click node_training "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/TrainingService.java"
click node_notifications "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/NotificationService.java"
click node_email "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/EmailService.java"
click node_security "https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/security/JwtAuthFilter.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_webapi toneBlue
class node_auth,node_employees,node_employee_store,node_employee_entity,node_mysql toneAmber
class node_attendance,node_leave,node_payroll toneMint
class node_onboarding,node_recruitment,node_performance,node_training toneRose
class node_api,node_notifications,node_email,node_security,node_users toneIndigo
```

## Components

### Web experience

- [Role-based workspace](https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/app): `frontend/src/app`
- [API clients](https://github.com/rahulkumar971/hr-management-system/tree/main/frontend/src/lib): `frontend/src/lib`

### Identity and employees

- [Authentication](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/AuthService.java): `backend/hrms/src/main/java/com/hrms/service/AuthService.java`
- [Employee records](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/EmployeeService.java): `backend/hrms/src/main/java/com/hrms/service/EmployeeService.java`
- [Employee persistence](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java): `backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java`
- [Employee identity model](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/entity/Employee.java): `backend/hrms/src/main/java/com/hrms/entity/Employee.java`

### Workforce operations

- [Attendance and reports](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/AttendanceService.java): `backend/hrms/src/main/java/com/hrms/service/AttendanceService.java`
- [Leave management](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/LeaveService.java): `backend/hrms/src/main/java/com/hrms/service/LeaveService.java`
- [Payroll and payslips](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/PayrollService.java): `backend/hrms/src/main/java/com/hrms/service/PayrollService.java`

### Talent lifecycle

- [Onboarding and documents](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/OnboardingService.java): `backend/hrms/src/main/java/com/hrms/service/OnboardingService.java`
- [Recruitment](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/RecruitmentService.java): `backend/hrms/src/main/java/com/hrms/service/RecruitmentService.java`
- [Performance reviews](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/PerformanceService.java): `backend/hrms/src/main/java/com/hrms/service/PerformanceService.java`
- [Training and enrollment](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/TrainingService.java): `backend/hrms/src/main/java/com/hrms/service/TrainingService.java`

### Backend platform

- [REST controllers](https://github.com/rahulkumar971/hr-management-system/tree/main/backend/hrms/src/main/java/com/hrms/controller): `backend/hrms/src/main/java/com/hrms/controller`
- [Notifications and greetings](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/NotificationService.java): `backend/hrms/src/main/java/com/hrms/service/NotificationService.java`
- [Email delivery](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/service/EmailService.java): `backend/hrms/src/main/java/com/hrms/service/EmailService.java`
- [Request security](https://github.com/rahulkumar971/hr-management-system/blob/main/backend/hrms/src/main/java/com/hrms/security/JwtAuthFilter.java): `backend/hrms/src/main/java/com/hrms/security/JwtAuthFilter.java`

### Other components

- **HR and employees**
- **MySQL database**

## Connections

- HR and employees → Role-based workspace: use (evidence: `README.md`)
- Role-based workspace → API clients: requests through
- API clients → REST controllers: calls API
- REST controllers → Authentication: delegates auth (evidence: `backend/hrms/src/main/java/com/hrms/controller/AuthController.java`)
- REST controllers → Employee records: delegates employee tasks
- REST controllers → Attendance and reports: delegates attendance
- REST controllers → Leave management: delegates leave (evidence: `backend/hrms/src/main/java/com/hrms/controller/LeaveController.java`)
- REST controllers → Onboarding and documents: delegates onboarding (evidence: `backend/hrms/src/main/java/com/hrms/controller/OnboardingController.java`)
- REST controllers → Payroll and payslips: delegates payroll
- REST controllers → Recruitment: delegates hiring
- REST controllers → Performance reviews: delegates reviews
- REST controllers → Training and enrollment: delegates training (evidence: `backend/hrms/src/main/java/com/hrms/controller/TrainingController.java`)
- REST controllers → Notifications and greetings: delegates notifications
- Authentication → Employee persistence: looks up accounts (evidence: `backend/hrms/src/main/java/com/hrms/service/AuthService.java`)
- Employee records → Employee persistence: reads and writes (evidence: `backend/hrms/src/main/java/com/hrms/service/EmployeeService.java`)
- Employee persistence → Employee identity model: persists (evidence: `backend/hrms/src/main/java/com/hrms/repository/EmployeeRepository.java`)
- REST controllers → Email delivery: sends OTP mail (evidence: `backend/hrms/src/main/java/com/hrms/controller/AuthController.java`)
- REST controllers → MySQL database: persists through backend
- REST controllers → Request security: protected by
- HR and employees → REST controllers: authenticate and manage (evidence: `README.md`)
