# ashok8072014509/hireai architecture

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

- Interactive diagram: https://gitdiagram.com/ashok8072014509/hireai
- Repository: https://github.com/ashok8072014509/hireai

## Overview

HireAI is a full-stack recruitment platform whose main candidate journey runs from applying to a job through four assessed rounds, a hiring decision, and an offer. The frontend provides candidate and recruiter/admin portals; the Express backend exposes the workflows and persists hiring state. The README documents capabilities such as resume intelligence, proctoring, appeals, analytics, scheduling, and onboarding, but many corresponding implementations were not sampled. Those branches are included at subsystem level; their internal wiring is omitted where evidence is unavailable.

Main entry points: [`backend/src/routes/admin.routes.ts`](https://github.com/ashok8072014509/hireai/blob/main/backend/src/routes/admin.routes.ts) (Admin API), [`backend/src/controllers/application.controller.ts`](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/application.controller.ts) (Application Workflow), [`backend/src/controllers/codingAssessment.controller.ts`](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/codingAssessment.controller.ts) (Coding Round), [`backend/src/server.ts`](https://github.com/ashok8072014509/hireai/blob/main/backend/src/server.ts) (HTTP Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_candidate["Candidate Journey"]
  node_frontend["Candidate Portal<br/>[App.tsx]"]
  node_applications["Applications<br/>[Applications.tsx]"]
  node_application_api["Application API"]
  node_application_flow["Application Workflow"]
  node_resume["Resume Intelligence"]
end

subgraph group_assessment["Assessment Engine"]
  node_aptitude["Aptitude Round"]
  node_coding["Coding Round"]
  node_code_execution["Code Execution"]
  node_technical["Technical Interview"]
  node_hr["HR Interview"]
  node_proctoring["Proctoring"]
  node_decision["Hiring Decision"]
end

subgraph group_recruitment["Recruiter Operations"]
  node_admin_portal["Recruiter Portal<br/>[AdminLayout.tsx]"]
  node_admin_api["Admin API<br/>[admin.routes.ts]"]
  node_analytics["Hiring Intelligence"]
  node_appeals["Appeals"]
  node_question_quality["Question Quality"]
end

subgraph group_enterprise["Enterprise Services"]
  node_organizations["Organizations"]
  node_scheduling["Interview Scheduling"]
  node_offers["Offers"]
  node_dossiers["Candidate Dossiers"]
  node_notifications["Notifications"]
end

subgraph group_platform["Application Platform"]
  node_api_client["API Client<br/>[api.ts]"]
  node_server["HTTP Server<br/>[server.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_database[("PostgreSQL<br/>[prisma.ts]")]
  node_media["Media Manager<br/>[mediaManager.ts]"]
  node_proctor_guard["Proctoring Guard"]
  node_proctor_ui["Assessment Runners"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses portal"| node_frontend
node_frontend -->|"routes to"| node_applications
node_applications -.->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_server
node_server -->|"mounts routes"| node_application_api
node_application_api -->|"routes requests"| node_application_flow
node_application_flow -->|"reads and writes"| node_database
node_application_flow -->|"sends confirmations"| node_candidate
node_application_flow -->|"starts four rounds"| node_aptitude
node_candidate -->|"submits resume"| node_resume
node_aptitude -->|"precedes"| node_coding
node_coding -->|"executes code"| node_code_execution
node_coding -->|"precedes"| node_technical
node_technical -->|"precedes"| node_hr
node_candidate -->|"is monitored"| node_proctoring
node_hr -->|"informs decision"| node_decision
node_decision -->|"generates offer"| node_offers
node_admin_portal -.->|"manages hiring"| node_admin_api
node_server -->|"mounts routes"| node_admin_api
node_admin_api -->|"requires roles"| node_auth
node_admin_api -.->|"serves intelligence"| node_analytics
node_admin_api -->|"routes review"| node_question_quality
node_admin_api -.->|"supports resolution"| node_appeals
node_admin_api -->|"serves tenancy"| node_organizations
node_admin_api -->|"serves scheduling"| node_scheduling
node_admin_api -->|"serves offers"| node_offers
node_admin_api -->|"serves notifications"| node_notifications
node_admin_api -.->|"serves dossiers"| node_dossiers
node_auth -->|"checks account"| node_database
node_proctor_ui -->|"uses guard"| node_proctor_guard
node_proctor_guard -->|"stops streams"| node_media
node_proctor_guard -->|"reports violations"| node_api_client

click node_frontend "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/App.tsx"
click node_applications "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/pages/Applications.tsx"
click node_application_api "https://github.com/ashok8072014509/hireai/blob/main/backend/src/routes/application.routes.ts"
click node_application_flow "https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/application.controller.ts"
click node_resume "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/resumeParser.service.ts"
click node_aptitude "https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/assessment.controller.ts"
click node_coding "https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/codingAssessment.controller.ts"
click node_code_execution "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/codeExecution/codeExecution.service.ts"
click node_technical "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/technicalInterview.service.ts"
click node_hr "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/hrInterview.service.ts"
click node_proctoring "https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/proctoring.controller.ts"
click node_decision "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/finalHiringDecision.service.ts"
click node_admin_portal "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/components/AdminLayout.tsx"
click node_admin_api "https://github.com/ashok8072014509/hireai/blob/main/backend/src/routes/admin.routes.ts"
click node_analytics "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/hiringIntelligence.service.ts"
click node_appeals "https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/appeal.controller.ts"
click node_question_quality "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/questionQuality.service.ts"
click node_organizations "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/organization.service.ts"
click node_scheduling "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/interviewScheduling.service.ts"
click node_offers "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/offerManagement.service.ts"
click node_dossiers "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/candidateDossier.service.ts"
click node_notifications "https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/notification.service.ts"
click node_api_client "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/lib/api.ts"
click node_server "https://github.com/ashok8072014509/hireai/blob/main/backend/src/server.ts"
click node_auth "https://github.com/ashok8072014509/hireai/blob/main/backend/src/middleware/auth.ts"
click node_database "https://github.com/ashok8072014509/hireai/blob/main/backend/src/lib/prisma.ts"
click node_media "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/lib/mediaManager.ts"
click node_proctor_guard "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/hooks/useProctoringGuard.ts"
click node_proctor_ui "https://github.com/ashok8072014509/hireai/blob/main/frontend/src/pages/AssessmentRunner.tsx"

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_frontend,node_applications,node_application_api,node_application_flow,node_resume toneBlue
class node_aptitude,node_coding,node_code_execution,node_technical,node_hr,node_proctoring,node_decision toneAmber
class node_admin_portal,node_admin_api,node_analytics,node_appeals,node_question_quality toneMint
class node_organizations,node_scheduling,node_offers,node_dossiers,node_notifications toneRose
class node_api_client,node_server,node_auth,node_database,node_media,node_proctor_guard,node_proctor_ui,node_candidate toneIndigo
```

## Components

### Candidate Journey

- [Candidate Portal](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Applications](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/pages/Applications.tsx): `frontend/src/pages/Applications.tsx`
- [Application API](https://github.com/ashok8072014509/hireai/blob/main/backend/src/routes/application.routes.ts): `backend/src/routes/application.routes.ts`
- [Application Workflow](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/application.controller.ts): `backend/src/controllers/application.controller.ts`
- [Resume Intelligence](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/resumeParser.service.ts): `backend/src/services/resumeParser.service.ts`

### Assessment Engine

- [Aptitude Round](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/assessment.controller.ts): `backend/src/controllers/assessment.controller.ts`
- [Coding Round](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/codingAssessment.controller.ts): `backend/src/controllers/codingAssessment.controller.ts`
- [Code Execution](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/codeExecution/codeExecution.service.ts): `backend/src/services/codeExecution/codeExecution.service.ts`
- [Technical Interview](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/technicalInterview.service.ts): `backend/src/services/technicalInterview.service.ts`
- [HR Interview](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/hrInterview.service.ts): `backend/src/services/hrInterview.service.ts`
- [Proctoring](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/proctoring.controller.ts): `backend/src/controllers/proctoring.controller.ts`
- [Hiring Decision](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/finalHiringDecision.service.ts): `backend/src/services/finalHiringDecision.service.ts`

### Recruiter Operations

- [Recruiter Portal](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/components/AdminLayout.tsx): `frontend/src/components/AdminLayout.tsx`
- [Admin API](https://github.com/ashok8072014509/hireai/blob/main/backend/src/routes/admin.routes.ts): `backend/src/routes/admin.routes.ts`
- [Hiring Intelligence](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/hiringIntelligence.service.ts): `backend/src/services/hiringIntelligence.service.ts`
- [Appeals](https://github.com/ashok8072014509/hireai/blob/main/backend/src/controllers/appeal.controller.ts): `backend/src/controllers/appeal.controller.ts`
- [Question Quality](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/questionQuality.service.ts): `backend/src/services/questionQuality.service.ts`

### Enterprise Services

- [Organizations](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/organization.service.ts): `backend/src/services/organization.service.ts`
- [Interview Scheduling](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/interviewScheduling.service.ts): `backend/src/services/interviewScheduling.service.ts`
- [Offers](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/offerManagement.service.ts): `backend/src/services/offerManagement.service.ts`
- [Candidate Dossiers](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/candidateDossier.service.ts): `backend/src/services/candidateDossier.service.ts`
- [Notifications](https://github.com/ashok8072014509/hireai/blob/main/backend/src/services/notification.service.ts): `backend/src/services/notification.service.ts`

### Application Platform

- [API Client](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [HTTP Server](https://github.com/ashok8072014509/hireai/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [Authentication](https://github.com/ashok8072014509/hireai/blob/main/backend/src/middleware/auth.ts): `backend/src/middleware/auth.ts`
- [PostgreSQL](https://github.com/ashok8072014509/hireai/blob/main/backend/src/lib/prisma.ts): `backend/src/lib/prisma.ts`
- [Media Manager](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/lib/mediaManager.ts): `frontend/src/lib/mediaManager.ts`
- [Proctoring Guard](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/hooks/useProctoringGuard.ts): `frontend/src/hooks/useProctoringGuard.ts`
- [Assessment Runners](https://github.com/ashok8072014509/hireai/blob/main/frontend/src/pages/AssessmentRunner.tsx): `frontend/src/pages/AssessmentRunner.tsx`

### Other components

- **Candidate**

## Connections

- Candidate → Candidate Portal: uses portal (evidence: `README.md`)
- Candidate Portal → Applications: routes to (evidence: `frontend/src/App.tsx`)
- Applications → API Client: requests data (evidence: `frontend/src/pages/Applications.tsx`)
- API Client → HTTP Server: calls API
- HTTP Server → Application API: mounts routes (evidence: `backend/src/server.ts`)
- Application API → Application Workflow: routes requests (evidence: `backend/src/routes/application.routes.ts`)
- Application Workflow → PostgreSQL: reads and writes (evidence: `backend/src/controllers/application.controller.ts`)
- Application Workflow → Candidate: sends confirmations (evidence: `backend/src/controllers/application.controller.ts`)
- Application Workflow → Aptitude Round: starts four rounds (evidence: `README.md`)
- Candidate → Resume Intelligence: submits resume (evidence: `README.md`)
- Aptitude Round → Coding Round: precedes (evidence: `README.md`)
- Coding Round → Code Execution: executes code (evidence: `backend/src/controllers/codingAssessment.controller.ts`)
- Coding Round → Technical Interview: precedes (evidence: `README.md`)
- Technical Interview → HR Interview: precedes (evidence: `README.md`)
- Candidate → Proctoring: is monitored (evidence: `README.md`)
- HR Interview → Hiring Decision: informs decision (evidence: `README.md`)
- Hiring Decision → Offers: generates offer (evidence: `README.md`)
- Recruiter Portal → Admin API: manages hiring
- HTTP Server → Admin API: mounts routes (evidence: `backend/src/server.ts`)
- Admin API → Authentication: requires roles (evidence: `backend/src/routes/admin.routes.ts`)
- Admin API → Hiring Intelligence: serves intelligence
- Admin API → Question Quality: routes review
- Admin API → Appeals: supports resolution
- Admin API → Organizations: serves tenancy
- Admin API → Interview Scheduling: serves scheduling
- Admin API → Offers: serves offers
- Admin API → Notifications: serves notifications
- Admin API → Candidate Dossiers: serves dossiers
- Authentication → PostgreSQL: checks account (evidence: `backend/src/middleware/auth.ts`)
- Assessment Runners → Proctoring Guard: uses guard (evidence: `frontend/src/pages/AssessmentRunner.tsx`)
- Proctoring Guard → Media Manager: stops streams (evidence: `frontend/src/hooks/useProctoringGuard.ts`)
- Proctoring Guard → API Client: reports violations (evidence: `frontend/src/hooks/useProctoringGuard.ts`)
