# nikhil26045/hireai architecture

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

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

## Overview

HireAI is a recruitment platform for recruiters and candidates. The documented workflow covers job openings, candidate applications and resume intelligence, followed by candidate evaluation and recruiter review; the backend also models interview stages and evaluation results. The sampled application router delegates application operations to its service, while the API entry point registers the routers. The frontend tree shows public, candidate and recruiter surfaces, but sampled code does not establish frontend-to-API wiring. Interview and evaluation implementations are represented only at the model-directory level.

Main entry points: [`backend/app/main.py`](https://github.com/nikhil26045/hireai/blob/main/backend/app/main.py) (FastAPI entry), [`backend/app/db/database.py`](https://github.com/nikhil26045/hireai/blob/main/backend/app/db/database.py) (SQL database access), [`backend/app/routers/applications.py`](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/applications.py) (Application routes), [`src/app`](https://github.com/nikhil26045/hireai/tree/main/src/app) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend surfaces"]
  node_web["Web application"]
  node_layouts["Role layouts"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API entry and routes"]
  node_api_main["FastAPI entry<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_jobs_routes["Job routes<br/>[jobs.py]"]
  node_applications_routes["Application routes<br/>[applications.py]"]
  node_resumes_routes["Resume routes<br/>[resumes.py]"]
  node_processing_routes["Resume processing routes"]
  node_requirements_routes["Job requirements routes"]
end

subgraph group_services["Recruitment services"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_job_service["Job service<br/>[job_service.py]"]
  node_application_service["Application service"]
  node_resume_service["Resume services"]
  node_requirements_service["Requirement service"]
  node_security["Token and password security<br/>[security.py]"]
end

subgraph group_data["Domain data"]
  node_domain_models["Recruitment models"]
  node_database[("SQL database access<br/>[database.py]")]
end

node_candidate(("Candidate"))
node_recruiter(("Recruiter"))

node_candidate -->|"uses"| node_web
node_recruiter -->|"uses"| node_web
node_web -->|"renders"| node_layouts
node_api_main -->|"registers"| node_auth_routes
node_api_main -->|"registers"| node_jobs_routes
node_api_main -->|"registers"| node_applications_routes
node_api_main -->|"registers"| node_resumes_routes
node_api_main -->|"registers"| node_processing_routes
node_api_main -->|"registers"| node_requirements_routes
node_applications_routes -->|"calls"| node_application_service
node_application_service -->|"reads and writes"| node_database
node_job_service -->|"reads and writes"| node_database
node_auth_service -->|"calls"| node_security
node_auth_service -->|"reads and writes"| node_database
node_applications_routes -->|"queries"| node_database

click node_web "https://github.com/nikhil26045/hireai/tree/main/src/app"
click node_layouts "https://github.com/nikhil26045/hireai/tree/main/src/components/layouts"
click node_api_client "https://github.com/nikhil26045/hireai/blob/main/src/lib/api.ts"
click node_api_main "https://github.com/nikhil26045/hireai/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/auth.py"
click node_jobs_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/jobs.py"
click node_applications_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/applications.py"
click node_resumes_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/resumes.py"
click node_processing_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/resume_processing.py"
click node_requirements_routes "https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/job_requirements.py"
click node_auth_service "https://github.com/nikhil26045/hireai/blob/main/backend/app/services/auth_service.py"
click node_job_service "https://github.com/nikhil26045/hireai/blob/main/backend/app/services/job_service.py"
click node_application_service "https://github.com/nikhil26045/hireai/blob/main/backend/app/services/application_service.py"
click node_resume_service "https://github.com/nikhil26045/hireai/tree/main/backend/app/services"
click node_requirements_service "https://github.com/nikhil26045/hireai/blob/main/backend/app/services/job_requirement_service.py"
click node_domain_models "https://github.com/nikhil26045/hireai/tree/main/backend/app/models"
click node_database "https://github.com/nikhil26045/hireai/blob/main/backend/app/db/database.py"
click node_security "https://github.com/nikhil26045/hireai/blob/main/backend/app/core/security.py"

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_layouts,node_api_client toneBlue
class node_api_main,node_auth_routes,node_jobs_routes,node_applications_routes,node_resumes_routes,node_processing_routes,node_requirements_routes toneAmber
class node_auth_service,node_job_service,node_application_service,node_resume_service,node_requirements_service,node_security toneMint
class node_domain_models,node_database toneRose
class node_candidate,node_recruiter toneIndigo
```

## Components

### Frontend surfaces

- [Web application](https://github.com/nikhil26045/hireai/tree/main/src/app): `src/app`
- [Role layouts](https://github.com/nikhil26045/hireai/tree/main/src/components/layouts): `src/components/layouts`
- [API client](https://github.com/nikhil26045/hireai/blob/main/src/lib/api.ts): `src/lib/api.ts`

### API entry and routes

- [FastAPI entry](https://github.com/nikhil26045/hireai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Job routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/jobs.py): `backend/app/routers/jobs.py`
- [Application routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/applications.py): `backend/app/routers/applications.py`
- [Resume routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/resumes.py): `backend/app/routers/resumes.py`
- [Resume processing routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/resume_processing.py): `backend/app/routers/resume_processing.py`
- [Job requirements routes](https://github.com/nikhil26045/hireai/blob/main/backend/app/routers/job_requirements.py): `backend/app/routers/job_requirements.py`

### Recruitment services

- [Authentication service](https://github.com/nikhil26045/hireai/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Job service](https://github.com/nikhil26045/hireai/blob/main/backend/app/services/job_service.py): `backend/app/services/job_service.py`
- [Application service](https://github.com/nikhil26045/hireai/blob/main/backend/app/services/application_service.py): `backend/app/services/application_service.py`
- [Resume services](https://github.com/nikhil26045/hireai/tree/main/backend/app/services): `backend/app/services`
- [Requirement service](https://github.com/nikhil26045/hireai/blob/main/backend/app/services/job_requirement_service.py): `backend/app/services/job_requirement_service.py`
- [Token and password security](https://github.com/nikhil26045/hireai/blob/main/backend/app/core/security.py): `backend/app/core/security.py`

### Domain data

- [Recruitment models](https://github.com/nikhil26045/hireai/tree/main/backend/app/models): `backend/app/models`
- [SQL database access](https://github.com/nikhil26045/hireai/blob/main/backend/app/db/database.py): `backend/app/db/database.py`

### Other components

- **Candidate**
- **Recruiter**

## Connections

- Candidate → Web application: uses
- Recruiter → Web application: uses
- Web application → Role layouts: renders
- FastAPI entry → Authentication routes: registers
- FastAPI entry → Job routes: registers
- FastAPI entry → Application routes: registers
- FastAPI entry → Resume routes: registers
- FastAPI entry → Resume processing routes: registers
- FastAPI entry → Job requirements routes: registers
- Application routes → Application service: calls
- Application service → SQL database access: reads and writes
- Job service → SQL database access: reads and writes
- Authentication service → Token and password security: calls
- Authentication service → SQL database access: reads and writes
- Application routes → SQL database access: queries
