# sarthakk04/caliberation-workflow-management architecture

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

- Interactive diagram: https://gitdiagram.com/sarthakk04/caliberation-workflow-management
- Repository: https://github.com/sarthakk04/caliberation-workflow-management

## Overview

This is an HR calibration application: users work through calibration cycles, master-data uploads, GM/DR report preparation and submission, review/return/approval, and final Excel downloads, with role-based dashboards and audit history. The graph connects frontend routes and API calls to the backend endpoints where the sampled evidence supports them; unsampled controller/service details are represented as subsystem nodes with directory paths. Some backend relationships and wiring cannot be confirmed from the available excerpts.

Main entry points: [`frontend/src/api/api.js`](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/api/api.js) (API client), [`src/main/java/com/adp/hrcalibration/service/UploadService.java`](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/UploadService.java) (Upload processing), [`src/main/java/com/adp/hrcalibration/service/ReportService.java`](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/ReportService.java) (Report review workflow), [`src/main/java/com/adp/hrcalibration/controller/DashboardController.java`](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/DashboardController.java) (Role dashboards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_ui["Route and page shell<br/>[App.jsx]"]
  node_authui["Session and permissions<br/>[AuthContext.jsx]"]
  node_client["API client<br/>[api.js]"]
  node_cyclepages["Cycle workspace<br/>[CycleDetail.jsx]"]
  node_reportpages["Report workspace<br/>[Reports.jsx]"]
  node_reportreturn["Return report dialog"]
  node_adminpages["Admin pages<br/>[Users.jsx]"]
  node_auditpage["Audit log page<br/>[AuditLogs.jsx]"]
  node_dashboardpage["Dashboard page<br/>[Dashboard.jsx]"]
end

subgraph group_workflow["Calibration workflow"]
  node_cycles["Cycle endpoints"]
  node_cyclelogic["Cycle management<br/>[CycleService.java]"]
  node_uploads["Master uploads"]
  node_uploadlogic["Upload processing<br/>[UploadService.java]"]
  node_reports["Report endpoints"]
  node_reportlogic["Report review workflow<br/>[ReportService.java]"]
  node_employees["Employee access"]
  node_excel["Excel generation"]
end

subgraph group_identity["Identity and access"]
  node_authapi["Authentication endpoints"]
  node_authservice["Authentication service<br/>[AuthService.java]"]
  node_security["JWT and role security"]
  node_users["User administration"]
  node_userservice["User service<br/>[UserService.java]"]
end

subgraph group_insights["Reporting and oversight"]
  node_dashboards["Role dashboards"]
  node_audit["Audit log service<br/>[AuditService.java]"]
  node_auditapi["Audit endpoint"]
end

subgraph group_persistence["Domain persistence"]
  node_db[("Relational domain store")]
  node_cycledata["Cycle repository"]
  node_employeedata["Employee repository"]
  node_reportdata["Report repository"]
  node_userdata["User repository"]
  node_auditdata["Audit repository"]
end

node_people(("HR staff and leaders"))

node_people -->|"uses"| node_ui
node_ui -->|"checks access"| node_authui
node_authui -->|"authenticates via"| node_client
node_cyclepages -->|"requests data"| node_client
node_reportpages -->|"requests data"| node_client
node_reportpages -->|"opens"| node_reportreturn
node_adminpages -.->|"requests data"| node_client
node_auditpage -.->|"requests logs"| node_client
node_dashboardpage -.->|"requests metrics"| node_client
node_client -->|"calls login"| node_authapi
node_client -->|"calls user API"| node_users
node_client -->|"calls cycle API"| node_cycles
node_client -->|"calls upload API"| node_uploads
node_client -->|"calls report API"| node_reports
node_client -->|"calls employee API"| node_employees
node_client -->|"calls dashboard API"| node_dashboards
node_client -->|"calls audit API"| node_auditapi
node_authapi -->|"delegates to"| node_authservice
node_authservice -->|"queries users"| node_userdata
node_authapi -.->|"secured by"| node_security
node_users -->|"delegates to"| node_userservice
node_userservice -->|"reads and writes"| node_userdata
node_userservice -->|"records actions"| node_audit
node_cycles -->|"delegates to"| node_cyclelogic
node_cycles -->|"generates download"| node_excel
node_cyclelogic -.->|"manages cycles"| node_cycledata
node_uploads -.->|"delegates to"| node_uploadlogic
node_uploadlogic -->|"reads cycles"| node_cycledata
node_uploadlogic -->|"writes employees"| node_employeedata
node_uploadlogic -->|"writes reports"| node_reportdata
node_uploadlogic -->|"matches users"| node_userdata
node_uploadlogic -->|"records actions"| node_audit
node_reports -->|"delegates to"| node_reportlogic
node_reportlogic -->|"reads and updates"| node_reportdata
node_reportlogic -->|"updates assessments"| node_employeedata
node_reportlogic -->|"generates workbook"| node_excel
node_reportlogic -->|"records decisions"| node_audit
node_employees -.->|"reads employees"| node_employeedata
node_dashboards -->|"queries users"| node_userdata
node_dashboards -->|"queries cycles"| node_cycledata
node_dashboards -->|"queries reports"| node_reportdata
node_dashboards -->|"queries employees"| node_employeedata
node_auditapi -.->|"delegates to"| node_audit
node_audit -->|"reads and writes"| node_auditdata
node_cycledata -.->|"persists cycles"| node_db
node_employeedata -->|"persists employees"| node_db
node_reportdata -->|"persists reports"| node_db
node_userdata -->|"persists users"| node_db

click node_ui "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/context/AuthContext.jsx"
click node_client "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/api/api.js"
click node_cyclepages "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/CycleDetail.jsx"
click node_reportpages "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Reports.jsx"
click node_reportreturn "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/components/ReturnReportModal.jsx"
click node_adminpages "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Users.jsx"
click node_auditpage "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/AuditLogs.jsx"
click node_dashboardpage "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Dashboard.jsx"
click node_authapi "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/AuthController.java"
click node_authservice "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/AuthService.java"
click node_security "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/config/SecurityConfig.java"
click node_users "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/UserController.java"
click node_userservice "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/UserService.java"
click node_cycles "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/CycleController.java"
click node_cyclelogic "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/CycleService.java"
click node_uploads "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/UploadController.java"
click node_uploadlogic "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/UploadService.java"
click node_reports "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/ReportController.java"
click node_reportlogic "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/ReportService.java"
click node_employees "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/EmployeeController.java"
click node_excel "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/ExcelGeneratorService.java"
click node_dashboards "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/DashboardController.java"
click node_audit "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/AuditService.java"
click node_auditapi "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/AuditController.java"
click node_db "https://github.com/sarthakk04/caliberation-workflow-management/tree/main/src/main/java/com/adp/hrcalibration/entity"
click node_cycledata "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/CalibrationCycleRepository.java"
click node_employeedata "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/EmployeeRepository.java"
click node_reportdata "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/GmDrReportRepository.java"
click node_userdata "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/UserRepository.java"
click node_auditdata "https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/AuditLogRepository.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_ui,node_authui,node_client,node_cyclepages,node_reportpages,node_reportreturn,node_adminpages,node_auditpage,node_dashboardpage toneBlue
class node_cycles,node_cyclelogic,node_uploads,node_uploadlogic,node_reports,node_reportlogic,node_employees,node_excel toneAmber
class node_authapi,node_authservice,node_security,node_users,node_userservice toneMint
class node_dashboards,node_audit,node_auditapi toneRose
class node_db,node_cycledata,node_employeedata,node_reportdata,node_userdata,node_auditdata,node_people toneIndigo
```

## Components

### Web application

- [Route and page shell](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session and permissions](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/api/api.js): `frontend/src/api/api.js`
- [Cycle workspace](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/CycleDetail.jsx): `frontend/src/pages/CycleDetail.jsx`
- [Report workspace](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Reports.jsx): `frontend/src/pages/Reports.jsx`
- [Return report dialog](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/components/ReturnReportModal.jsx): `frontend/src/components/ReturnReportModal.jsx`
- [Admin pages](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Users.jsx): `frontend/src/pages/Users.jsx`
- [Audit log page](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/AuditLogs.jsx): `frontend/src/pages/AuditLogs.jsx`
- [Dashboard page](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`

### Calibration workflow

- [Cycle endpoints](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/CycleController.java): `src/main/java/com/adp/hrcalibration/controller/CycleController.java`
- [Cycle management](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/CycleService.java): `src/main/java/com/adp/hrcalibration/service/CycleService.java`
- [Master uploads](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/UploadController.java): `src/main/java/com/adp/hrcalibration/controller/UploadController.java`
- [Upload processing](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/UploadService.java): `src/main/java/com/adp/hrcalibration/service/UploadService.java`
- [Report endpoints](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/ReportController.java): `src/main/java/com/adp/hrcalibration/controller/ReportController.java`
- [Report review workflow](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/ReportService.java): `src/main/java/com/adp/hrcalibration/service/ReportService.java`
- [Employee access](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/EmployeeController.java): `src/main/java/com/adp/hrcalibration/controller/EmployeeController.java`
- [Excel generation](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/ExcelGeneratorService.java): `src/main/java/com/adp/hrcalibration/service/ExcelGeneratorService.java`

### Identity and access

- [Authentication endpoints](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/AuthController.java): `src/main/java/com/adp/hrcalibration/controller/AuthController.java`
- [Authentication service](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/AuthService.java): `src/main/java/com/adp/hrcalibration/service/AuthService.java`
- [JWT and role security](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/config/SecurityConfig.java): `src/main/java/com/adp/hrcalibration/config/SecurityConfig.java`
- [User administration](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/UserController.java): `src/main/java/com/adp/hrcalibration/controller/UserController.java`
- [User service](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/UserService.java): `src/main/java/com/adp/hrcalibration/service/UserService.java`

### Reporting and oversight

- [Role dashboards](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/DashboardController.java): `src/main/java/com/adp/hrcalibration/controller/DashboardController.java`
- [Audit log service](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/service/AuditService.java): `src/main/java/com/adp/hrcalibration/service/AuditService.java`
- [Audit endpoint](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/controller/AuditController.java): `src/main/java/com/adp/hrcalibration/controller/AuditController.java`

### Domain persistence

- [Relational domain store](https://github.com/sarthakk04/caliberation-workflow-management/tree/main/src/main/java/com/adp/hrcalibration/entity): `src/main/java/com/adp/hrcalibration/entity`
- [Cycle repository](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/CalibrationCycleRepository.java): `src/main/java/com/adp/hrcalibration/repository/CalibrationCycleRepository.java`
- [Employee repository](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/EmployeeRepository.java): `src/main/java/com/adp/hrcalibration/repository/EmployeeRepository.java`
- [Report repository](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/GmDrReportRepository.java): `src/main/java/com/adp/hrcalibration/repository/GmDrReportRepository.java`
- [User repository](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/UserRepository.java): `src/main/java/com/adp/hrcalibration/repository/UserRepository.java`
- [Audit repository](https://github.com/sarthakk04/caliberation-workflow-management/blob/main/src/main/java/com/adp/hrcalibration/repository/AuditLogRepository.java): `src/main/java/com/adp/hrcalibration/repository/AuditLogRepository.java`

### Other components

- **HR staff and leaders**

## Connections

- HR staff and leaders → Route and page shell: uses (evidence: `frontend/src/App.jsx`)
- Route and page shell → Session and permissions: checks access (evidence: `frontend/src/App.jsx`)
- Session and permissions → API client: authenticates via (evidence: `frontend/src/context/AuthContext.jsx`)
- Cycle workspace → API client: requests data (evidence: `frontend/src/pages/CycleDetail.jsx`)
- Report workspace → API client: requests data (evidence: `frontend/src/pages/Reports.jsx`)
- Report workspace → Return report dialog: opens (evidence: `frontend/src/pages/Reports.jsx`)
- Admin pages → API client: requests data
- Audit log page → API client: requests logs
- Dashboard page → API client: requests metrics
- API client → Authentication endpoints: calls login (evidence: `frontend/src/api/api.js`)
- API client → User administration: calls user API (evidence: `frontend/src/api/api.js`)
- API client → Cycle endpoints: calls cycle API (evidence: `frontend/src/api/api.js`)
- API client → Master uploads: calls upload API (evidence: `frontend/src/api/api.js`)
- API client → Report endpoints: calls report API (evidence: `frontend/src/api/api.js`)
- API client → Employee access: calls employee API (evidence: `frontend/src/api/api.js`)
- API client → Role dashboards: calls dashboard API (evidence: `frontend/src/api/api.js`)
- API client → Audit endpoint: calls audit API (evidence: `frontend/src/api/api.js`)
- Authentication endpoints → Authentication service: delegates to (evidence: `src/main/java/com/adp/hrcalibration/service/AuthService.java`)
- Authentication service → User repository: queries users (evidence: `src/main/java/com/adp/hrcalibration/service/AuthService.java`)
- Authentication endpoints → JWT and role security: secured by
- User administration → User service: delegates to (evidence: `src/main/java/com/adp/hrcalibration/controller/UserController.java`)
- User service → User repository: reads and writes (evidence: `src/main/java/com/adp/hrcalibration/service/UserService.java`)
- User service → Audit log service: records actions (evidence: `src/main/java/com/adp/hrcalibration/service/UserService.java`)
- Cycle endpoints → Cycle management: delegates to (evidence: `src/main/java/com/adp/hrcalibration/controller/CycleController.java`)
- Cycle endpoints → Excel generation: generates download (evidence: `src/main/java/com/adp/hrcalibration/controller/CycleController.java`)
- Cycle management → Cycle repository: manages cycles (evidence: `src/main/java/com/adp/hrcalibration/service/CycleService.java`)
- Master uploads → Upload processing: delegates to
- Upload processing → Cycle repository: reads cycles (evidence: `src/main/java/com/adp/hrcalibration/service/UploadService.java`)
- Upload processing → Employee repository: writes employees (evidence: `src/main/java/com/adp/hrcalibration/service/UploadService.java`)
- Upload processing → Report repository: writes reports (evidence: `src/main/java/com/adp/hrcalibration/service/UploadService.java`)
- Upload processing → User repository: matches users (evidence: `src/main/java/com/adp/hrcalibration/service/UploadService.java`)
- Upload processing → Audit log service: records actions (evidence: `src/main/java/com/adp/hrcalibration/service/UploadService.java`)
- Report endpoints → Report review workflow: delegates to (evidence: `src/main/java/com/adp/hrcalibration/controller/ReportController.java`)
- Report review workflow → Report repository: reads and updates (evidence: `src/main/java/com/adp/hrcalibration/service/ReportService.java`)
- Report review workflow → Employee repository: updates assessments (evidence: `src/main/java/com/adp/hrcalibration/service/ReportService.java`)
- Report review workflow → Excel generation: generates workbook (evidence: `src/main/java/com/adp/hrcalibration/service/ReportService.java`)
- Report review workflow → Audit log service: records decisions (evidence: `src/main/java/com/adp/hrcalibration/service/ReportService.java`)
- Employee access → Employee repository: reads employees
- Role dashboards → User repository: queries users (evidence: `src/main/java/com/adp/hrcalibration/controller/DashboardController.java`)
- Role dashboards → Cycle repository: queries cycles (evidence: `src/main/java/com/adp/hrcalibration/controller/DashboardController.java`)
- Role dashboards → Report repository: queries reports (evidence: `src/main/java/com/adp/hrcalibration/controller/DashboardController.java`)
- Role dashboards → Employee repository: queries employees (evidence: `src/main/java/com/adp/hrcalibration/controller/DashboardController.java`)
- Audit endpoint → Audit log service: delegates to
- Audit log service → Audit repository: reads and writes (evidence: `src/main/java/com/adp/hrcalibration/service/AuditService.java`)
- Cycle repository → Relational domain store: persists cycles (evidence: `src/main/java/com/adp/hrcalibration/repository/CalibrationCycleRepository.java`)
- Employee repository → Relational domain store: persists employees (evidence: `src/main/java/com/adp/hrcalibration/repository/EmployeeRepository.java`)
- Report repository → Relational domain store: persists reports (evidence: `src/main/java/com/adp/hrcalibration/repository/GmDrReportRepository.java`)
- User repository → Relational domain store: persists users (evidence: `src/main/java/com/adp/hrcalibration/repository/UserRepository.java`)
