# chaitanya2230/hr-harvik architecture

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

- Interactive diagram: https://gitdiagram.com/chaitanya2230/hr-harvik
- Repository: https://github.com/chaitanya2230/hr-harvik

## Overview

Harvik Technologies is an internal HR dashboard: users sign in, work with employee and HR lifecycle records, and view or export operational reports. The web app routes users to feature pages; API controllers and services implement the domain operations, backed by MongoDB and Redis/BullMQ. The README documents broader capabilities than the sampled source, so those branches are represented without asserting unshown call paths. Dashed edges with null evidence mark the unsampled browser-to-API boundary.

Main entry points: [`apps/api/src/modules/employees/employee.service.ts`](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/employees/employee.service.ts) (Employee records), [`apps/web/src/api/client.ts`](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/api/client.ts) (API client), [`apps/api/src/db/mongo.ts`](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/db/mongo.ts) (MongoDB), [`apps/web/src/App.tsx`](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/App.tsx) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web dashboard"]
  node_webapp["App routes<br/>[App.tsx]"]
  node_authui["Sign-in session<br/>[AuthProvider.tsx]"]
  node_webapi["API client<br/>[client.ts]"]
  node_employeesui["Employee workspace"]
  node_attendanceui["Attendance workspace<br/>[AttendancePage.tsx]"]
  node_reportsui["Reports workspace<br/>[ReportsPage.tsx]"]
end

subgraph group_identity["Identity and governance"]
  node_authapi["Authentication<br/>[auth.service.ts]"]
  node_audit["Audit trail<br/>[audit.service.ts]"]
  node_scope["Employee access scope<br/>[employee.scope.ts]"]
end

subgraph group_workforce["Workforce lifecycle"]
  node_employee["Employee records"]
  node_recruitment["Recruitment pipeline"]
  node_onboarding["Onboarding"]
  node_exit["Exit lifecycle<br/>[exit.service.ts]"]
end

subgraph group_operations["HR operations"]
  node_attendance["Attendance and holidays"]
  node_leave["Leave management<br/>[leave.service.ts]"]
  node_documents["Documents and PDFs"]
  node_assets["Assets and licenses<br/>[license.service.ts]"]
  node_notifications["Notifications and reminders"]
  node_reports["Reports and exports"]
end

subgraph group_platform["Runtime services"]
  node_mongo[("MongoDB<br/>[mongo.ts]")]
  node_redis[("Redis<br/>[redis.ts]")]
  node_queues["BullMQ jobs<br/>[queues.ts]"]
  node_email["Email delivery<br/>[email.service.ts]"]
end

node_user(("HR user"))

node_user -->|"uses"| node_webapp
node_webapp -->|"mounts"| node_authui
node_webapp -->|"routes"| node_employeesui
node_webapp -->|"routes"| node_reportsui
node_user -.->|"uses"| node_attendanceui
node_authui -->|"calls"| node_webapi
node_employeesui -.->|"requests"| node_webapi
node_attendanceui -.->|"requests"| node_webapi
node_reportsui -.->|"requests"| node_webapi
node_webapi -.->|"sends requests"| node_authapi
node_authapi -->|"records activity"| node_audit
node_authapi -->|"checks denylist"| node_redis
node_employee -->|"records changes"| node_audit
node_employee -->|"syncs checklist"| node_onboarding
node_employee -->|"uses scope"| node_scope
node_recruitment -->|"converts candidate"| node_employee
node_reports -.->|"reads domain data"| node_mongo
node_reports -->|"queues large exports"| node_queues
node_notifications -.->|"sends email"| node_email
node_notifications -.->|"schedules reminders"| node_queues
node_employee -.->|"persists records"| node_mongo
node_attendance -.->|"reconciles nightly"| node_queues
node_leave -.->|"stores requests"| node_mongo
node_documents -.->|"stores metadata"| node_mongo
node_assets -.->|"stores assignments"| node_mongo
node_exit -.->|"updates lifecycle"| node_employee

click node_webapp "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/App.tsx"
click node_authui "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/auth/AuthProvider.tsx"
click node_webapi "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/api/client.ts"
click node_employeesui "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/employees/EmployeeListPage.tsx"
click node_attendanceui "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/attendance/AttendancePage.tsx"
click node_reportsui "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/reports/ReportsPage.tsx"
click node_authapi "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_audit "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/audit/audit.service.ts"
click node_scope "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/employees/employee.scope.ts"
click node_employee "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/employees/employee.service.ts"
click node_recruitment "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/recruitment/recruitment.controller.ts"
click node_onboarding "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/onboarding/onboarding.service.ts"
click node_exit "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/exit/exit.service.ts"
click node_attendance "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/attendance/attendance.service.ts"
click node_leave "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/leave/leave.service.ts"
click node_documents "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/documents/document.service.ts"
click node_assets "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/licenses/license.service.ts"
click node_notifications "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/notifications/notification.service.ts"
click node_reports "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/reports/report.controller.ts"
click node_mongo "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/db/mongo.ts"
click node_redis "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/db/redis.ts"
click node_queues "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/jobs/queues.ts"
click node_email "https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/notifications/email.service.ts"

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_webapp,node_authui,node_webapi,node_employeesui,node_attendanceui,node_reportsui,node_user toneBlue
class node_authapi,node_audit,node_scope toneAmber
class node_employee,node_recruitment,node_onboarding,node_exit toneMint
class node_attendance,node_leave,node_documents,node_assets,node_notifications,node_reports toneRose
class node_mongo,node_redis,node_queues,node_email toneIndigo
```

## Components

### Web dashboard

- [App routes](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Sign-in session](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/auth/AuthProvider.tsx): `apps/web/src/features/auth/AuthProvider.tsx`
- [API client](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/api/client.ts): `apps/web/src/api/client.ts`
- [Employee workspace](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/employees/EmployeeListPage.tsx): `apps/web/src/features/employees/EmployeeListPage.tsx`
- [Attendance workspace](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/attendance/AttendancePage.tsx): `apps/web/src/features/attendance/AttendancePage.tsx`
- [Reports workspace](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/web/src/features/reports/ReportsPage.tsx): `apps/web/src/features/reports/ReportsPage.tsx`

### Identity and governance

- [Authentication](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`
- [Audit trail](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/audit/audit.service.ts): `apps/api/src/modules/audit/audit.service.ts`
- [Employee access scope](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/employees/employee.scope.ts): `apps/api/src/modules/employees/employee.scope.ts`

### Workforce lifecycle

- [Employee records](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/employees/employee.service.ts): `apps/api/src/modules/employees/employee.service.ts`
- [Recruitment pipeline](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/recruitment/recruitment.controller.ts): `apps/api/src/modules/recruitment/recruitment.controller.ts`
- [Onboarding](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/onboarding/onboarding.service.ts): `apps/api/src/modules/onboarding/onboarding.service.ts`
- [Exit lifecycle](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/exit/exit.service.ts): `apps/api/src/modules/exit/exit.service.ts`

### HR operations

- [Attendance and holidays](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/attendance/attendance.service.ts): `apps/api/src/modules/attendance/attendance.service.ts`
- [Leave management](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/leave/leave.service.ts): `apps/api/src/modules/leave/leave.service.ts`
- [Documents and PDFs](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/documents/document.service.ts): `apps/api/src/modules/documents/document.service.ts`
- [Assets and licenses](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/licenses/license.service.ts): `apps/api/src/modules/licenses/license.service.ts`
- [Notifications and reminders](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/notifications/notification.service.ts): `apps/api/src/modules/notifications/notification.service.ts`
- [Reports and exports](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/reports/report.controller.ts): `apps/api/src/modules/reports/report.controller.ts`

### Runtime services

- [MongoDB](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/db/mongo.ts): `apps/api/src/db/mongo.ts`
- [Redis](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/db/redis.ts): `apps/api/src/db/redis.ts`
- [BullMQ jobs](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/jobs/queues.ts): `apps/api/src/jobs/queues.ts`
- [Email delivery](https://github.com/chaitanya2230/hr-harvik/blob/main/apps/api/src/modules/notifications/email.service.ts): `apps/api/src/modules/notifications/email.service.ts`

### Other components

- **HR user**

## Connections

- HR user → App routes: uses (evidence: `apps/web/src/App.tsx`)
- App routes → Sign-in session: mounts (evidence: `apps/web/src/App.tsx`)
- App routes → Employee workspace: routes (evidence: `apps/web/src/App.tsx`)
- App routes → Reports workspace: routes (evidence: `apps/web/src/App.tsx`)
- HR user → Attendance workspace: uses
- Sign-in session → API client: calls (evidence: `apps/web/src/features/auth/AuthProvider.tsx`)
- Employee workspace → API client: requests
- Attendance workspace → API client: requests
- Reports workspace → API client: requests
- API client → Authentication: sends requests
- Authentication → Audit trail: records activity (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Authentication → Redis: checks denylist (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Employee records → Audit trail: records changes (evidence: `apps/api/src/modules/employees/employee.service.ts`)
- Employee records → Onboarding: syncs checklist (evidence: `apps/api/src/modules/employees/employee.service.ts`)
- Employee records → Employee access scope: uses scope (evidence: `apps/api/src/modules/employees/employee.service.ts`)
- Recruitment pipeline → Employee records: converts candidate (evidence: `apps/api/src/modules/recruitment/recruitment.controller.ts`)
- Reports and exports → MongoDB: reads domain data
- Reports and exports → BullMQ jobs: queues large exports (evidence: `apps/api/src/modules/reports/report.controller.ts`)
- Notifications and reminders → Email delivery: sends email
- Notifications and reminders → BullMQ jobs: schedules reminders
- Employee records → MongoDB: persists records
- Attendance and holidays → BullMQ jobs: reconciles nightly
- Leave management → MongoDB: stores requests
- Documents and PDFs → MongoDB: stores metadata
- Assets and licenses → MongoDB: stores assignments
- Exit lifecycle → Employee records: updates lifecycle
