# kishore071005/hr architecture

> Architecture diagram of the GitHub repository kishore071005/hr, 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/kishore071005/hr
- Repository: https://github.com/kishore071005/hr

## Overview

Harvik HR is an internal workforce-management dashboard. Users sign in to the React application, which communicates with an Express API for employee records and HR workflows; the API persists domain data and supports background jobs and notifications. The README documents recruitment-to-employee conversion, onboarding, attendance and leave, offboarding, document generation, and operational reporting. The source excerpts show selected service calls; other subsystem links below rely on README statements, not inspection of unsampled implementation.

Main entry points: [`apps/api/src/app.ts`](https://github.com/kishore071005/hr/blob/main/apps/api/src/app.ts) (HTTP API), [`apps/api/src/modules/employees/employee.service.ts`](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/employees/employee.service.ts) (Employee records), [`apps/web/src/App.tsx`](https://github.com/kishore071005/hr/blob/main/apps/web/src/App.tsx) (HR dashboard), [`apps/api/src/jobs/queues.ts`](https://github.com/kishore071005/hr/blob/main/apps/api/src/jobs/queues.ts) (Background jobs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_app["HR dashboard<br/>[App.tsx]"]
  node_web_auth["Session provider<br/>[AuthProvider.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_platform["API platform"]
  node_api["HTTP API<br/>[app.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
end

subgraph group_people["People lifecycle"]
  node_employees["Employee records"]
  node_recruitment["Recruitment"]
  node_onboarding["Onboarding"]
  node_exit["Exit lifecycle<br/>[exit.service.ts]"]
end

subgraph group_operations["Workforce operations"]
  node_attendance["Attendance"]
  node_leave["Leave management<br/>[leave.service.ts]"]
  node_documents["Documents and PDFs<br/>[pdf.service.ts]"]
  node_reports["Operational reports<br/>[report.service.ts]"]
  node_notifications["Notifications"]
end

subgraph group_support["Shared services"]
  node_audit["Audit logging<br/>[audit.service.ts]"]
  node_jobs["Background jobs<br/>[queues.ts]"]
  node_mongo[("MongoDB<br/>[mongo.ts]")]
  node_redis[("Redis<br/>[redis.ts]")]
  node_email["Email delivery<br/>[email.service.ts]"]
end

node_hr_user(("HR user"))

node_hr_user -->|"uses"| node_web_app
node_web_app -->|"provides session"| node_web_auth
node_web_auth -->|"requests session"| node_api_client
node_web_app -->|"calls API"| node_api_client
node_api_client -->|"sends requests"| node_api
node_api -.->|"routes authentication"| node_auth
node_api -.->|"routes HR workflows"| node_employees
node_api -.->|"routes recruitment"| node_recruitment
node_api -.->|"routes onboarding"| node_onboarding
node_api -.->|"routes offboarding"| node_exit
node_api -.->|"routes attendance"| node_attendance
node_api -.->|"routes leave"| node_leave
node_api -.->|"routes documents"| node_documents
node_api -.->|"routes reports"| node_reports
node_api -.->|"routes notifications"| node_notifications
node_recruitment -->|"converts candidate"| node_employees
node_employees -->|"syncs checklist"| node_onboarding
node_auth -->|"records events"| node_audit
node_employees -.->|"records changes"| node_audit
node_api -->|"uses database"| node_mongo
node_api -->|"uses cache and queues"| node_redis
node_jobs -->|"uses BullMQ"| node_redis
node_reports -->|"queues large exports"| node_jobs
node_jobs -->|"schedules reminders"| node_notifications
node_notifications -->|"sends email"| node_email

click node_web_app "https://github.com/kishore071005/hr/blob/main/apps/web/src/App.tsx"
click node_web_auth "https://github.com/kishore071005/hr/blob/main/apps/web/src/features/auth/AuthProvider.tsx"
click node_api_client "https://github.com/kishore071005/hr/blob/main/apps/web/src/api/client.ts"
click node_api "https://github.com/kishore071005/hr/blob/main/apps/api/src/app.ts"
click node_auth "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_employees "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/employees/employee.service.ts"
click node_recruitment "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/recruitment/candidate-conversion.service.ts"
click node_onboarding "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/onboarding/onboarding.service.ts"
click node_exit "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/exit/exit.service.ts"
click node_attendance "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/attendance/attendance.service.ts"
click node_leave "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/leave/leave.service.ts"
click node_documents "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/documents/pdf.service.ts"
click node_reports "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/reports/report.service.ts"
click node_notifications "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/notifications/notification.service.ts"
click node_audit "https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/audit/audit.service.ts"
click node_jobs "https://github.com/kishore071005/hr/blob/main/apps/api/src/jobs/queues.ts"
click node_mongo "https://github.com/kishore071005/hr/blob/main/apps/api/src/db/mongo.ts"
click node_redis "https://github.com/kishore071005/hr/blob/main/apps/api/src/db/redis.ts"
click node_email "https://github.com/kishore071005/hr/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_web_app,node_web_auth,node_api_client,node_hr_user toneBlue
class node_api,node_auth toneAmber
class node_employees,node_recruitment,node_onboarding,node_exit toneMint
class node_attendance,node_leave,node_documents,node_reports,node_notifications toneRose
class node_audit,node_jobs,node_mongo,node_redis,node_email toneIndigo
```

## Components

### Web application

- [HR dashboard](https://github.com/kishore071005/hr/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Session provider](https://github.com/kishore071005/hr/blob/main/apps/web/src/features/auth/AuthProvider.tsx): `apps/web/src/features/auth/AuthProvider.tsx`
- [API client](https://github.com/kishore071005/hr/blob/main/apps/web/src/api/client.ts): `apps/web/src/api/client.ts`

### API platform

- [HTTP API](https://github.com/kishore071005/hr/blob/main/apps/api/src/app.ts): `apps/api/src/app.ts`
- [Authentication](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`

### People lifecycle

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

### Workforce operations

- [Attendance](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/attendance/attendance.service.ts): `apps/api/src/modules/attendance/attendance.service.ts`
- [Leave management](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/leave/leave.service.ts): `apps/api/src/modules/leave/leave.service.ts`
- [Documents and PDFs](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/documents/pdf.service.ts): `apps/api/src/modules/documents/pdf.service.ts`
- [Operational reports](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/reports/report.service.ts): `apps/api/src/modules/reports/report.service.ts`
- [Notifications](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/notifications/notification.service.ts): `apps/api/src/modules/notifications/notification.service.ts`

### Shared services

- [Audit logging](https://github.com/kishore071005/hr/blob/main/apps/api/src/modules/audit/audit.service.ts): `apps/api/src/modules/audit/audit.service.ts`
- [Background jobs](https://github.com/kishore071005/hr/blob/main/apps/api/src/jobs/queues.ts): `apps/api/src/jobs/queues.ts`
- [MongoDB](https://github.com/kishore071005/hr/blob/main/apps/api/src/db/mongo.ts): `apps/api/src/db/mongo.ts`
- [Redis](https://github.com/kishore071005/hr/blob/main/apps/api/src/db/redis.ts): `apps/api/src/db/redis.ts`
- [Email delivery](https://github.com/kishore071005/hr/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 → HR dashboard: uses (evidence: `README.md`)
- HR dashboard → Session provider: provides session (evidence: `apps/web/src/App.tsx`)
- Session provider → API client: requests session (evidence: `apps/web/src/features/auth/AuthProvider.tsx`)
- HR dashboard → API client: calls API (evidence: `README.md`)
- API client → HTTP API: sends requests (evidence: `README.md`)
- HTTP API → Authentication: routes authentication
- HTTP API → Employee records: routes HR workflows
- HTTP API → Recruitment: routes recruitment
- HTTP API → Onboarding: routes onboarding
- HTTP API → Exit lifecycle: routes offboarding
- HTTP API → Attendance: routes attendance
- HTTP API → Leave management: routes leave
- HTTP API → Documents and PDFs: routes documents
- HTTP API → Operational reports: routes reports
- HTTP API → Notifications: routes notifications
- Recruitment → Employee records: converts candidate (evidence: `README.md`)
- Employee records → Onboarding: syncs checklist (evidence: `apps/api/src/modules/employees/employee.service.ts`)
- Authentication → Audit logging: records events (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Employee records → Audit logging: records changes (evidence: `apps/api/src/modules/employees/employee.service.ts`)
- HTTP API → MongoDB: uses database (evidence: `README.md`)
- HTTP API → Redis: uses cache and queues (evidence: `README.md`)
- Background jobs → Redis: uses BullMQ (evidence: `README.md`)
- Operational reports → Background jobs: queues large exports
- Background jobs → Notifications: schedules reminders (evidence: `README.md`)
- Notifications → Email delivery: sends email (evidence: `README.md`)
