# ms-karthik0/hrmana architecture

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

- Interactive diagram: https://gitdiagram.com/ms-karthik0/hrmana
- Repository: https://github.com/ms-karthik0/hrmana

## Overview

NexusHR is an HR and workforce intelligence platform. The documented primary workflow is a user entering through the React application, authenticating with the Auth service, then using employee, workforce, payroll, dashboard, and AI capabilities through separately deployed Spring services. Each microservice owns its own database; the legacy monolith is retained but is not the documented Compose runtime. The README establishes service boundaries and HTTP communication; sampled source additionally supports selected controller/service and service/repository calls. Other feature links are documented, not verified from their unsampled implementation.

Main entry points: [`frontend/src/services/api.ts`](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/services/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/App.tsx) (HR workspace), [`services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java`](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java) (Employee lifecycle), [`services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java`](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java) (Login and tokens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["HR workspace<br/>[App.tsx]"]
  node_authctx["Session context<br/>[AuthContext.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_identity["Identity"]
  node_authcontroller["Auth endpoints"]
  node_authservice["Login and tokens<br/>[AuthService.java]"]
  node_userstore[("Identity database")]
end

subgraph group_people["Employee intelligence"]
  node_employeecontroller["Employee endpoints"]
  node_employeeservice["Employee lifecycle"]
  node_employeestore[("Employee database")]
  node_ai["Workforce insights"]
end

subgraph group_workforce["Workforce operations"]
  node_workcontroller["Workforce endpoints"]
  node_attendance["Attendance service"]
  node_leave["Leave management<br/>[LeaveService.java]"]
  node_dash["Executive dashboard"]
  node_workstore[("Workforce database")]
  node_notifications["Alerts"]
end

subgraph group_pay["Payroll"]
  node_paycontroller["Payroll endpoints"]
  node_payservice["Payroll processing"]
  node_paystore[("Payroll database")]
end

node_user(("HR user"))

node_user -->|"uses"| node_app
node_app -->|"provides session"| node_authctx
node_app -->|"loads alerts"| node_api
node_app -.->|"routes features"| node_api
node_api -.->|"sends requests"| node_authcontroller
node_api -.->|"sends requests"| node_employeecontroller
node_api -.->|"sends requests"| node_workcontroller
node_api -.->|"sends requests"| node_paycontroller
node_authcontroller -->|"delegates"| node_authservice
node_authservice -->|"reads and writes"| node_userstore
node_employeecontroller -->|"delegates"| node_employeeservice
node_employeeservice -->|"reads and writes"| node_employeestore
node_ai -->|"analyzes employees"| node_employeestore
node_workcontroller -.->|"delegates"| node_attendance
node_attendance -->|"stores punches"| node_workstore
node_leave -.->|"stores requests"| node_workstore
node_dash -->|"reads metrics"| node_workstore
node_paycontroller -->|"delegates"| node_payservice
node_payservice -->|"stores pay runs"| node_paystore
node_payservice -.->|"sends payroll alert"| node_notifications
node_authservice -.->|"shares identity claims"| node_employeeservice
node_employeeservice -.->|"serves employee data"| node_attendance

click node_app "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/App.tsx"
click node_authctx "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/context/AuthContext.tsx"
click node_api "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/services/api.ts"
click node_authcontroller "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/auth-service/src/main/java/com/zidio/nexushr/controller/AuthController.java"
click node_authservice "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java"
click node_employeecontroller "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/controller/EmployeeController.java"
click node_employeeservice "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java"
click node_ai "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/service/AiIntelligenceService.java"
click node_workcontroller "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/controller/AttendanceController.java"
click node_attendance "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/AttendanceService.java"
click node_leave "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/LeaveService.java"
click node_dash "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/controller/DashboardController.java"
click node_paycontroller "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/payroll-service/src/main/java/com/zidio/nexushr/controller/PayrollController.java"
click node_payservice "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/payroll-service/src/main/java/com/zidio/nexushr/service/PayrollService.java"
click node_notifications "https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/NotificationService.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_app,node_authctx,node_api,node_user toneBlue
class node_authcontroller,node_authservice,node_userstore toneAmber
class node_employeecontroller,node_employeeservice,node_employeestore,node_ai toneMint
class node_workcontroller,node_attendance,node_leave,node_dash,node_workstore,node_notifications toneRose
class node_paycontroller,node_payservice,node_paystore toneIndigo
```

## Components

### Web client

- [HR workspace](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Identity

- [Auth endpoints](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/auth-service/src/main/java/com/zidio/nexushr/controller/AuthController.java): `services/auth-service/src/main/java/com/zidio/nexushr/controller/AuthController.java`
- [Login and tokens](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java): `services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java`
- **Identity database**

### Employee intelligence

- [Employee endpoints](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/controller/EmployeeController.java): `services/employee-service/src/main/java/com/zidio/nexushr/controller/EmployeeController.java`
- [Employee lifecycle](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java): `services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java`
- **Employee database**
- [Workforce insights](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/employee-service/src/main/java/com/zidio/nexushr/service/AiIntelligenceService.java): `services/employee-service/src/main/java/com/zidio/nexushr/service/AiIntelligenceService.java`

### Workforce operations

- [Workforce endpoints](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/controller/AttendanceController.java): `services/workforce-service/src/main/java/com/zidio/nexushr/controller/AttendanceController.java`
- [Attendance service](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/AttendanceService.java): `services/workforce-service/src/main/java/com/zidio/nexushr/service/AttendanceService.java`
- [Leave management](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/LeaveService.java): `services/workforce-service/src/main/java/com/zidio/nexushr/service/LeaveService.java`
- [Executive dashboard](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/controller/DashboardController.java): `services/workforce-service/src/main/java/com/zidio/nexushr/controller/DashboardController.java`
- **Workforce database**
- [Alerts](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/workforce-service/src/main/java/com/zidio/nexushr/service/NotificationService.java): `services/workforce-service/src/main/java/com/zidio/nexushr/service/NotificationService.java`

### Payroll

- [Payroll endpoints](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/payroll-service/src/main/java/com/zidio/nexushr/controller/PayrollController.java): `services/payroll-service/src/main/java/com/zidio/nexushr/controller/PayrollController.java`
- [Payroll processing](https://github.com/ms-karthik0/hrmana/blob/nexusHr_full/services/payroll-service/src/main/java/com/zidio/nexushr/service/PayrollService.java): `services/payroll-service/src/main/java/com/zidio/nexushr/service/PayrollService.java`
- **Payroll database**

### Other components

- **HR user**

## Connections

- HR user → HR workspace: uses (evidence: `README.md`)
- HR workspace → Session context: provides session (evidence: `frontend/src/App.tsx`)
- HR workspace → API client: loads alerts (evidence: `frontend/src/App.tsx`)
- HR workspace → API client: routes features (evidence: `README.md`)
- API client → Auth endpoints: sends requests (evidence: `README.md`)
- API client → Employee endpoints: sends requests (evidence: `README.md`)
- API client → Workforce endpoints: sends requests (evidence: `README.md`)
- API client → Payroll endpoints: sends requests (evidence: `README.md`)
- Auth endpoints → Login and tokens: delegates (evidence: `services/auth-service/src/main/java/com/zidio/nexushr/controller/AuthController.java`)
- Login and tokens → Identity database: reads and writes (evidence: `services/auth-service/src/main/java/com/zidio/nexushr/service/AuthService.java`)
- Employee endpoints → Employee lifecycle: delegates (evidence: `services/employee-service/src/main/java/com/zidio/nexushr/controller/EmployeeController.java`)
- Employee lifecycle → Employee database: reads and writes (evidence: `services/employee-service/src/main/java/com/zidio/nexushr/service/EmployeeService.java`)
- Workforce insights → Employee database: analyzes employees (evidence: `services/employee-service/src/main/java/com/zidio/nexushr/service/AiIntelligenceService.java`)
- Workforce endpoints → Attendance service: delegates
- Attendance service → Workforce database: stores punches (evidence: `services/workforce-service/src/main/java/com/zidio/nexushr/service/AttendanceService.java`)
- Leave management → Workforce database: stores requests
- Executive dashboard → Workforce database: reads metrics (evidence: `services/workforce-service/src/main/java/com/zidio/nexushr/controller/DashboardController.java`)
- Payroll endpoints → Payroll processing: delegates (evidence: `services/payroll-service/src/main/java/com/zidio/nexushr/controller/PayrollController.java`)
- Payroll processing → Payroll database: stores pay runs (evidence: `services/payroll-service/src/main/java/com/zidio/nexushr/service/PayrollService.java`)
- Payroll processing → Alerts: sends payroll alert
- Login and tokens → Employee lifecycle: shares identity claims (evidence: `README.md`)
- Employee lifecycle → Attendance service: serves employee data (evidence: `README.md`)
