# athithyan24/human-resource architecture

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

- Interactive diagram: https://gitdiagram.com/athithyan24/human-resource
- Repository: https://github.com/athithyan24/human-resource

## Overview

Arclight HR is a role-based employee lifecycle and people-operations system. Admins structure the organization and onboard employees; employees and leads manage assigned work, deliverables, and timed reports; leads review submissions; admins generate performance reviews and record promotions, transfers, and exits. The React application presents these workflows through role-guarded pages and calls an Express API backed by MongoDB. The README documents the wider feature set; several page and server implementations were not sampled, so their internal call paths are not asserted.

Main entry points: [`client/src/App.jsx`](https://github.com/athithyan24/human-resource/blob/main/client/src/App.jsx) (React app routes), [`server/src/index.js`](https://github.com/athithyan24/human-resource/blob/main/server/src/index.js) (Express API), [`server/src/models`](https://github.com/athithyan24/human-resource/tree/main/server/src/models) (MongoDB models), [`client/src/services/api.js`](https://github.com/athithyan24/human-resource/blob/main/client/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_web["React app routes<br/>[App.jsx]"]
  node_shell["App shell<br/>[AppShell.jsx]"]
  node_client_api["API client<br/>[api.js]"]
  node_auth_state["Session state<br/>[auth.js]"]
  node_org_ui["Directory and org"]
  node_lifecycle_ui["Lifecycle desk<br/>[LifecyclePage.jsx]"]
  node_work_ui["Work board and reports<br/>[WorkPage.jsx]"]
  node_people_ui["People operations"]
  node_comms_ui["Employee services"]
end

subgraph group_org["Organization and lifecycle"]
  node_org_ops["Org administration<br/>[orgController.js]"]
  node_lifecycle_ops["Lifecycle management"]
end

subgraph group_work["Work and performance"]
  node_work_ops["Tasks and reports<br/>[workController.js]"]
  node_dashboard["Dashboard analytics"]
end

subgraph group_people["People services"]
  node_people_ops["Attendance and leave"]
  node_comms_ops["Comms and learning<br/>[commsController.js]"]
end

subgraph group_server["API and persistence"]
  node_api_server["Express API<br/>[index.js]"]
  node_auth["Authentication and RBAC<br/>[auth.js]"]
  node_mongo[("MongoDB models")]
  node_db["MongoDB connection<br/>[db.js]"]
end

node_users(("HR users"))

node_users -->|"use HR desk"| node_web
node_web -->|"routes through"| node_shell
node_web -->|"routes to"| node_org_ui
node_web -->|"routes to"| node_lifecycle_ui
node_web -->|"routes to"| node_work_ui
node_web -->|"routes to"| node_people_ui
node_web -->|"routes to"| node_comms_ui
node_org_ui -.->|"uses API"| node_client_api
node_lifecycle_ui -.->|"uses API"| node_client_api
node_work_ui -->|"calls"| node_client_api
node_people_ui -.->|"uses API"| node_client_api
node_comms_ui -.->|"uses API"| node_client_api
node_client_api -->|"sends API requests"| node_api_server
node_api_server -.->|"protects routes"| node_auth
node_api_server -->|"routes requests"| node_org_ops
node_api_server -->|"routes requests"| node_lifecycle_ops
node_api_server -->|"routes requests"| node_work_ops
node_api_server -->|"routes requests"| node_people_ops
node_api_server -->|"routes requests"| node_comms_ops
node_org_ops -->|"reads and writes"| node_mongo
node_lifecycle_ops -->|"reads and writes"| node_mongo
node_work_ops -->|"reads and writes"| node_mongo
node_dashboard -->|"reads metrics"| node_mongo
node_people_ops -.->|"reads and writes"| node_mongo
node_comms_ops -.->|"reads and writes"| node_mongo
node_db -.->|"connects database"| node_mongo
node_org_ops -->|"onboards before lifecycle"| node_lifecycle_ops
node_work_ops -->|"feeds work analytics"| node_dashboard
node_work_ops -->|"feeds performance review"| node_lifecycle_ops
node_lifecycle_ops -->|"uses attendance measures"| node_people_ops

click node_web "https://github.com/athithyan24/human-resource/blob/main/client/src/App.jsx"
click node_shell "https://github.com/athithyan24/human-resource/blob/main/client/src/layouts/AppShell.jsx"
click node_client_api "https://github.com/athithyan24/human-resource/blob/main/client/src/services/api.js"
click node_auth_state "https://github.com/athithyan24/human-resource/blob/main/client/src/store/auth.js"
click node_org_ui "https://github.com/athithyan24/human-resource/tree/main/client/src/pages"
click node_lifecycle_ui "https://github.com/athithyan24/human-resource/blob/main/client/src/pages/LifecyclePage.jsx"
click node_work_ui "https://github.com/athithyan24/human-resource/blob/main/client/src/pages/WorkPage.jsx"
click node_people_ui "https://github.com/athithyan24/human-resource/tree/main/client/src/pages"
click node_comms_ui "https://github.com/athithyan24/human-resource/tree/main/client/src/pages"
click node_api_server "https://github.com/athithyan24/human-resource/blob/main/server/src/index.js"
click node_auth "https://github.com/athithyan24/human-resource/blob/main/server/src/middlewares/auth.js"
click node_org_ops "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/orgController.js"
click node_lifecycle_ops "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/lifecycleController.js"
click node_work_ops "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/workController.js"
click node_dashboard "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/dashboardController.js"
click node_people_ops "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/peopleOpsController.js"
click node_comms_ops "https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/commsController.js"
click node_mongo "https://github.com/athithyan24/human-resource/tree/main/server/src/models"
click node_db "https://github.com/athithyan24/human-resource/blob/main/server/src/config/db.js"

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_shell,node_client_api,node_auth_state,node_org_ui,node_lifecycle_ui,node_work_ui,node_people_ui,node_comms_ui,node_users toneBlue
class node_org_ops,node_lifecycle_ops toneAmber
class node_work_ops,node_dashboard toneMint
class node_people_ops,node_comms_ops toneRose
class node_api_server,node_auth,node_mongo,node_db toneIndigo
```

## Components

### Web application

- [React app routes](https://github.com/athithyan24/human-resource/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [App shell](https://github.com/athithyan24/human-resource/blob/main/client/src/layouts/AppShell.jsx): `client/src/layouts/AppShell.jsx`
- [API client](https://github.com/athithyan24/human-resource/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Session state](https://github.com/athithyan24/human-resource/blob/main/client/src/store/auth.js): `client/src/store/auth.js`
- [Directory and org](https://github.com/athithyan24/human-resource/tree/main/client/src/pages): `client/src/pages`
- [Lifecycle desk](https://github.com/athithyan24/human-resource/blob/main/client/src/pages/LifecyclePage.jsx): `client/src/pages/LifecyclePage.jsx`
- [Work board and reports](https://github.com/athithyan24/human-resource/blob/main/client/src/pages/WorkPage.jsx): `client/src/pages/WorkPage.jsx`
- [People operations](https://github.com/athithyan24/human-resource/tree/main/client/src/pages): `client/src/pages`
- [Employee services](https://github.com/athithyan24/human-resource/tree/main/client/src/pages): `client/src/pages`

### Organization and lifecycle

- [Org administration](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/orgController.js): `server/src/controllers/orgController.js`
- [Lifecycle management](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/lifecycleController.js): `server/src/controllers/lifecycleController.js`

### Work and performance

- [Tasks and reports](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/workController.js): `server/src/controllers/workController.js`
- [Dashboard analytics](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/dashboardController.js): `server/src/controllers/dashboardController.js`

### People services

- [Attendance and leave](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/peopleOpsController.js): `server/src/controllers/peopleOpsController.js`
- [Comms and learning](https://github.com/athithyan24/human-resource/blob/main/server/src/controllers/commsController.js): `server/src/controllers/commsController.js`

### API and persistence

- [Express API](https://github.com/athithyan24/human-resource/blob/main/server/src/index.js): `server/src/index.js`
- [Authentication and RBAC](https://github.com/athithyan24/human-resource/blob/main/server/src/middlewares/auth.js): `server/src/middlewares/auth.js`
- [MongoDB models](https://github.com/athithyan24/human-resource/tree/main/server/src/models): `server/src/models`
- [MongoDB connection](https://github.com/athithyan24/human-resource/blob/main/server/src/config/db.js): `server/src/config/db.js`

### Other components

- **HR users**

## Connections

- HR users → React app routes: use HR desk (evidence: `README.md`)
- React app routes → App shell: routes through (evidence: `client/src/App.jsx`)
- React app routes → Directory and org: routes to (evidence: `client/src/App.jsx`)
- React app routes → Lifecycle desk: routes to (evidence: `client/src/App.jsx`)
- React app routes → Work board and reports: routes to (evidence: `client/src/App.jsx`)
- React app routes → People operations: routes to (evidence: `client/src/App.jsx`)
- React app routes → Employee services: routes to (evidence: `client/src/App.jsx`)
- Directory and org → API client: uses API (evidence: `client/src/pages/ReviewsPage.jsx`)
- Lifecycle desk → API client: uses API
- Work board and reports → API client: calls (evidence: `client/src/pages/WorkPage.jsx`)
- People operations → API client: uses API (evidence: `client/src/pages/ReviewsPage.jsx`)
- Employee services → API client: uses API (evidence: `client/src/pages/ReviewsPage.jsx`)
- API client → Express API: sends API requests (evidence: `README.md`)
- Express API → Authentication and RBAC: protects routes
- Express API → Org administration: routes requests (evidence: `server/src/index.js`)
- Express API → Lifecycle management: routes requests (evidence: `server/src/index.js`)
- Express API → Tasks and reports: routes requests (evidence: `server/src/index.js`)
- Express API → Attendance and leave: routes requests (evidence: `server/src/index.js`)
- Express API → Comms and learning: routes requests (evidence: `server/src/index.js`)
- Org administration → MongoDB models: reads and writes (evidence: `server/src/controllers/orgController.js`)
- Lifecycle management → MongoDB models: reads and writes (evidence: `server/src/controllers/lifecycleController.js`)
- Tasks and reports → MongoDB models: reads and writes (evidence: `server/src/controllers/workController.js`)
- Dashboard analytics → MongoDB models: reads metrics (evidence: `server/src/controllers/dashboardController.js`)
- Attendance and leave → MongoDB models: reads and writes (evidence: `server/src/controllers/peopleOpsController.js`)
- Comms and learning → MongoDB models: reads and writes (evidence: `server/src/controllers/commsController.js`)
- MongoDB connection → MongoDB models: connects database
- Org administration → Lifecycle management: onboards before lifecycle (evidence: `README.md`)
- Tasks and reports → Dashboard analytics: feeds work analytics (evidence: `README.md`)
- Tasks and reports → Lifecycle management: feeds performance review (evidence: `README.md`)
- Lifecycle management → Attendance and leave: uses attendance measures (evidence: `server/src/controllers/lifecycleController.js`)
