# bhahivpm/hr-module-fe architecture

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

- Interactive diagram: https://gitdiagram.com/bhahivpm/hr-module-fe
- Repository: https://github.com/bhahivpm/hr-module-fe

## Overview

This is a React HR-management frontend. Users authenticate, enter a protected application shell, and work across workforce operations or administrative modules; pages use feature services to access the backend. The map includes the documented route surface and shared auth, notification, theme, and API layers. Evidence is limited to the README and supplied source/index references, so unsampled implementation details and unverified links are omitted.

Main entry points: [`src/layouts/MainLayout.jsx`](https://github.com/bhahivpm/hr-module-fe/blob/main/src/layouts/MainLayout.jsx) (App shell), [`src/api/axiosClient.js`](https://github.com/bhahivpm/hr-module-fe/blob/main/src/api/axiosClient.js) (HTTP client), [`src/routes/AppRoutes.jsx`](https://github.com/bhahivpm/hr-module-fe/blob/main/src/routes/AppRoutes.jsx) (Route entry), [`src/context/AuthContext.jsx`](https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/AuthContext.jsx) (Auth state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_routes["Route entry<br/>[AppRoutes.jsx]"]
  node_login["Login<br/>[LoginPage.jsx]"]
  node_layout["App shell<br/>[MainLayout.jsx]"]
end

subgraph group_workforce["Workforce operations"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_employees["Employee management"]
  node_employeeapi["Employee service<br/>[employeeService.js]"]
  node_organization["Organization"]
  node_shifts["Shift management"]
  node_attendance["Attendance<br/>[AttendancePage.jsx]"]
  node_leave["Leave management"]
  node_holidays["Holidays<br/>[HolidayPage.jsx]"]
  node_payroll["Payroll"]
  node_assets["Asset management"]
  node_documents["Documents"]
  node_performance["Performance reviews"]
end

subgraph group_admin["Administration"]
  node_registration["Registrations"]
  node_roles["Role assignment"]
  node_menus["Menu management"]
  node_users["User management"]
end

subgraph group_platform["Shared platform"]
  node_authctx["Auth state<br/>[AuthContext.jsx]"]
  node_authsvc["Auth service<br/>[authService.js]"]
  node_api["HTTP client<br/>[axiosClient.js]"]
  node_notifications["Notifications"]
  node_theme["Theme settings<br/>[ThemeContext.jsx]"]
end

node_user(("User"))
node_backend{{"Backend API"}}

node_user -->|"opens app"| node_routes
node_routes -->|"routes login"| node_login
node_routes -->|"guards routes"| node_layout
node_routes -->|"provides auth"| node_authctx
node_login -->|"updates auth"| node_authctx
node_authctx -->|"validates session"| node_authsvc
node_authsvc -->|"sends requests"| node_api
node_layout -->|"hosts pages"| node_dashboard
node_layout -->|"hosts pages"| node_employees
node_layout -->|"hosts pages"| node_organization
node_layout -->|"hosts pages"| node_shifts
node_layout -->|"hosts pages"| node_attendance
node_layout -->|"hosts pages"| node_leave
node_layout -->|"hosts pages"| node_holidays
node_layout -->|"hosts pages"| node_payroll
node_layout -->|"hosts pages"| node_assets
node_layout -->|"hosts pages"| node_documents
node_layout -->|"hosts pages"| node_performance
node_layout -->|"hosts registration"| node_registration
node_layout -->|"hosts pages"| node_roles
node_layout -->|"hosts pages"| node_menus
node_layout -->|"hosts pages"| node_users
node_employees -->|"uses service"| node_employeeapi
node_employeeapi -->|"sends requests"| node_api
node_attendance -->|"uses service"| node_api
node_leave -->|"uses services"| node_api
node_payroll -->|"uses services"| node_api
node_performance -->|"uses service"| node_api
node_assets -.->|"uses service"| node_api
node_documents -.->|"uses service"| node_api
node_organization -.->|"uses services"| node_api
node_shifts -.->|"uses services"| node_api
node_holidays -.->|"uses service"| node_api
node_registration -->|"submits data"| node_api
node_users -.->|"uses service"| node_api
node_roles -.->|"uses services"| node_api
node_menus -.->|"uses services"| node_api
node_api -->|"HTTP requests"| node_backend
node_api -->|"dispatches API events"| node_notifications
node_layout -.->|"uses provider"| node_theme

click node_routes "https://github.com/bhahivpm/hr-module-fe/blob/main/src/routes/AppRoutes.jsx"
click node_login "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/auth/pages/LoginPage.jsx"
click node_authctx "https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/AuthContext.jsx"
click node_authsvc "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/auth/services/authService.js"
click node_layout "https://github.com/bhahivpm/hr-module-fe/blob/main/src/layouts/MainLayout.jsx"
click node_dashboard "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/dashboard/pages/DashboardPage.jsx"
click node_employees "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/employee/pages/EmployeeManagementPage.jsx"
click node_employeeapi "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/employee/services/employeeService.js"
click node_organization "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/organization/pages/OrganizationPage.jsx"
click node_shifts "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/shift/pages/ShiftManagementPage.jsx"
click node_attendance "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/attendance/pages/AttendancePage.jsx"
click node_leave "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/leave/pages/LeaveManagementPage.jsx"
click node_holidays "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/holiday/pages/HolidayPage.jsx"
click node_payroll "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/payroll/pages/PayrollManagementPage.jsx"
click node_assets "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/asset/pages/AssetManagementPage.jsx"
click node_documents "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/document/pages/DocumentManagementPage.jsx"
click node_performance "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/performance/pages/PerformanceReviewPage.jsx"
click node_registration "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/registration/pages/ClientRegistrationPage.jsx"
click node_roles "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/role-assignment/pages/RoleAssignmentPage.jsx"
click node_menus "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/menu/pages/MenuManagementPage.jsx"
click node_users "https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/user/pages/UserManagementPage.jsx"
click node_api "https://github.com/bhahivpm/hr-module-fe/blob/main/src/api/axiosClient.js"
click node_notifications "https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/NotificationContext.jsx"
click node_theme "https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/ThemeContext.jsx"

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_routes,node_login,node_layout,node_user toneBlue
class node_dashboard,node_employees,node_employeeapi,node_organization,node_shifts,node_attendance,node_leave,node_holidays,node_payroll,node_assets,node_documents,node_performance toneAmber
class node_registration,node_roles,node_menus,node_users,node_backend toneMint
class node_authctx,node_authsvc,node_api,node_notifications,node_theme toneRose
```

## Components

### Access and shell

- [Route entry](https://github.com/bhahivpm/hr-module-fe/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Login](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/auth/pages/LoginPage.jsx): `src/features/auth/pages/LoginPage.jsx`
- [App shell](https://github.com/bhahivpm/hr-module-fe/blob/main/src/layouts/MainLayout.jsx): `src/layouts/MainLayout.jsx`

### Workforce operations

- [Dashboard](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/dashboard/pages/DashboardPage.jsx): `src/features/dashboard/pages/DashboardPage.jsx`
- [Employee management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/employee/pages/EmployeeManagementPage.jsx): `src/features/employee/pages/EmployeeManagementPage.jsx`
- [Employee service](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/employee/services/employeeService.js): `src/features/employee/services/employeeService.js`
- [Organization](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/organization/pages/OrganizationPage.jsx): `src/features/organization/pages/OrganizationPage.jsx`
- [Shift management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/shift/pages/ShiftManagementPage.jsx): `src/features/shift/pages/ShiftManagementPage.jsx`
- [Attendance](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/attendance/pages/AttendancePage.jsx): `src/features/attendance/pages/AttendancePage.jsx`
- [Leave management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/leave/pages/LeaveManagementPage.jsx): `src/features/leave/pages/LeaveManagementPage.jsx`
- [Holidays](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/holiday/pages/HolidayPage.jsx): `src/features/holiday/pages/HolidayPage.jsx`
- [Payroll](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/payroll/pages/PayrollManagementPage.jsx): `src/features/payroll/pages/PayrollManagementPage.jsx`
- [Asset management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/asset/pages/AssetManagementPage.jsx): `src/features/asset/pages/AssetManagementPage.jsx`
- [Documents](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/document/pages/DocumentManagementPage.jsx): `src/features/document/pages/DocumentManagementPage.jsx`
- [Performance reviews](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/performance/pages/PerformanceReviewPage.jsx): `src/features/performance/pages/PerformanceReviewPage.jsx`

### Administration

- [Registrations](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/registration/pages/ClientRegistrationPage.jsx): `src/features/registration/pages/ClientRegistrationPage.jsx`
- [Role assignment](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/role-assignment/pages/RoleAssignmentPage.jsx): `src/features/role-assignment/pages/RoleAssignmentPage.jsx`
- [Menu management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/menu/pages/MenuManagementPage.jsx): `src/features/menu/pages/MenuManagementPage.jsx`
- [User management](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/user/pages/UserManagementPage.jsx): `src/features/user/pages/UserManagementPage.jsx`

### Shared platform

- [Auth state](https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Auth service](https://github.com/bhahivpm/hr-module-fe/blob/main/src/features/auth/services/authService.js): `src/features/auth/services/authService.js`
- [HTTP client](https://github.com/bhahivpm/hr-module-fe/blob/main/src/api/axiosClient.js): `src/api/axiosClient.js`
- [Notifications](https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/NotificationContext.jsx): `src/context/NotificationContext.jsx`
- [Theme settings](https://github.com/bhahivpm/hr-module-fe/blob/main/src/context/ThemeContext.jsx): `src/context/ThemeContext.jsx`

### Other components

- **User**
- **Backend API**

## Connections

- User → Route entry: opens app (evidence: `src/routes/AppRoutes.jsx`)
- Route entry → Login: routes login (evidence: `src/routes/AppRoutes.jsx`)
- Route entry → App shell: guards routes (evidence: `src/routes/AppRoutes.jsx`)
- Route entry → Auth state: provides auth (evidence: `src/routes/AppRoutes.jsx`)
- Login → Auth state: updates auth (evidence: `src/features/auth/pages/LoginPage.jsx`)
- Auth state → Auth service: validates session (evidence: `src/context/AuthContext.jsx`)
- Auth service → HTTP client: sends requests (evidence: `src/features/auth/services/authService.js`)
- App shell → Dashboard: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Employee management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Organization: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Shift management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Attendance: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Leave management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Holidays: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Payroll: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Asset management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Documents: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Performance reviews: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Registrations: hosts registration (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Role assignment: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Menu management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- App shell → User management: hosts pages (evidence: `src/routes/AppRoutes.jsx`)
- Employee management → Employee service: uses service (evidence: `src/features/employee/pages/EmployeeManagementPage.jsx`)
- Employee service → HTTP client: sends requests (evidence: `src/features/employee/services/employeeService.js`)
- Attendance → HTTP client: uses service
- Leave management → HTTP client: uses services
- Payroll → HTTP client: uses services (evidence: `src/features/payroll/pages/PayrollManagementPage.jsx`)
- Performance reviews → HTTP client: uses service
- Asset management → HTTP client: uses service
- Documents → HTTP client: uses service
- Organization → HTTP client: uses services
- Shift management → HTTP client: uses services
- Holidays → HTTP client: uses service
- Registrations → HTTP client: submits data
- User management → HTTP client: uses service
- Role assignment → HTTP client: uses services
- Menu management → HTTP client: uses services
- HTTP client → Backend API: HTTP requests (evidence: `src/api/axiosClient.js`)
- HTTP client → Notifications: dispatches API events (evidence: `src/api/axiosClient.js`)
- App shell → Theme settings: uses provider
