# disha-2601/recruiterx architecture

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

- Interactive diagram: https://gitdiagram.com/disha-2601/recruiterx
- Repository: https://github.com/disha-2601/recruiterx

## Overview

RecruiterX is a recruiter-facing candidate intelligence platform: recruiters define a role, parse a job description, select a candidate pool and run ranking, then review and export a shortlist. The Next.js interface coordinates parsing and run execution; the Python ranker computes candidate-fit signals, while the FastAPI service exposes database operations. The README documents additional audit, analytics, and evaluation capabilities. Some implementation details are unsampled, so those branches are represented at the documented subsystem level.

Main entry points: [`redrob-ranker/rank.py`](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/rank.py) (Hybrid Ranker), [`src/app/api/runs/route.ts`](https://github.com/disha-2601/recruiterx/blob/main/src/app/api/runs/route.ts) (Run Orchestrator), [`api/index.py`](https://github.com/disha-2601/recruiterx/blob/main/api/index.py) (FastAPI Service), [`redrob-ranker/parse_jd.py`](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/parse_jd.py) (JD Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Recruiter Workflow"]
  node_project_setup["Project Setup<br/>[page.tsx]"]
  node_project_state["Project State<br/>[useProjectStore.ts]"]
  node_pipeline_runner["Run Controls<br/>[PipelineRunner.tsx]"]
  node_run_orchestrator["Run Orchestrator<br/>[route.ts]"]
end

subgraph group_ingestion["Job Ingestion"]
  node_jd_parse_route["JD Parse API<br/>[route.ts]"]
  node_jd_parser["JD Parser<br/>[parse_jd.py]"]
  node_jd_embedding["JD Embedding<br/>[embed_jd.py]"]
end

subgraph group_ranking["Candidate Ranking"]
  node_ranker["Hybrid Ranker<br/>[rank.py]"]
  node_skill_match["Skill Match<br/>[skill_match.py]"]
  node_consistency_gate["Consistency Gate"]
  node_reasoning["Reasoning Generator"]
end

subgraph group_backend["API and Persistence"]
  node_backend_api["FastAPI Service<br/>[index.py]"]
  node_database_models["Database Models<br/>[models.py]"]
  node_database[("SQLite Database<br/>[database.py]")]
end

subgraph group_results["Review and Export"]
  node_results_view["Ranked Results<br/>[page.tsx]"]
  node_export_api["CSV Export<br/>[route.ts]"]
end

node_recruiter(("Recruiter"))

node_recruiter -->|"creates project"| node_project_setup
node_project_setup -.->|"sets project state"| node_project_state
node_recruiter -->|"submits job description"| node_jd_parse_route
node_jd_parse_route -->|"runs parser"| node_jd_parser
node_jd_parser -.->|"returns requirements"| node_project_state
node_pipeline_runner -->|"reads run state"| node_project_state
node_pipeline_runner -->|"starts run"| node_run_orchestrator
node_run_orchestrator -->|"runs embedding"| node_jd_embedding
node_run_orchestrator -->|"runs ranking"| node_ranker
node_ranker -->|"parses JD on cache miss"| node_jd_parser
node_ranker -->|"imports scoring"| node_skill_match
node_ranker -->|"imports checks"| node_consistency_gate
node_ranker -->|"imports narratives"| node_reasoning
node_run_orchestrator -->|"writes run results"| node_backend_api
node_backend_api -->|"queries models"| node_database_models
node_backend_api -->|"uses database session"| node_database
node_recruiter -->|"reviews shortlist"| node_results_view
node_results_view -.->|"requests export"| node_export_api

click node_project_setup "https://github.com/disha-2601/recruiterx/blob/main/src/app/(authenticated)/project/new/page.tsx"
click node_project_state "https://github.com/disha-2601/recruiterx/blob/main/src/stores/useProjectStore.ts"
click node_pipeline_runner "https://github.com/disha-2601/recruiterx/blob/main/src/components/project/PipelineRunner.tsx"
click node_jd_parse_route "https://github.com/disha-2601/recruiterx/blob/main/src/app/api/parse-jd/route.ts"
click node_jd_parser "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/parse_jd.py"
click node_jd_embedding "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/embed_jd.py"
click node_run_orchestrator "https://github.com/disha-2601/recruiterx/blob/main/src/app/api/runs/route.ts"
click node_ranker "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/rank.py"
click node_skill_match "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/skill_match.py"
click node_consistency_gate "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/consistency_gate.py"
click node_reasoning "https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/reasoning_generator.py"
click node_backend_api "https://github.com/disha-2601/recruiterx/blob/main/api/index.py"
click node_database_models "https://github.com/disha-2601/recruiterx/blob/main/api/models.py"
click node_database "https://github.com/disha-2601/recruiterx/blob/main/api/database.py"
click node_results_view "https://github.com/disha-2601/recruiterx/blob/main/src/app/(authenticated)/dashboard/results/page.tsx"
click node_export_api "https://github.com/disha-2601/recruiterx/blob/main/src/app/api/export/route.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_project_setup,node_project_state,node_pipeline_runner,node_run_orchestrator toneBlue
class node_jd_parse_route,node_jd_parser,node_jd_embedding toneAmber
class node_ranker,node_skill_match,node_consistency_gate,node_reasoning toneMint
class node_backend_api,node_database_models,node_database toneRose
class node_results_view,node_export_api,node_recruiter toneIndigo
```

## Components

### Recruiter Workflow

- [Project Setup](https://github.com/disha-2601/recruiterx/blob/main/src/app/(authenticated)/project/new/page.tsx): `src/app/(authenticated)/project/new/page.tsx`
- [Project State](https://github.com/disha-2601/recruiterx/blob/main/src/stores/useProjectStore.ts): `src/stores/useProjectStore.ts`
- [Run Controls](https://github.com/disha-2601/recruiterx/blob/main/src/components/project/PipelineRunner.tsx): `src/components/project/PipelineRunner.tsx`
- [Run Orchestrator](https://github.com/disha-2601/recruiterx/blob/main/src/app/api/runs/route.ts): `src/app/api/runs/route.ts`

### Job Ingestion

- [JD Parse API](https://github.com/disha-2601/recruiterx/blob/main/src/app/api/parse-jd/route.ts): `src/app/api/parse-jd/route.ts`
- [JD Parser](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/parse_jd.py): `redrob-ranker/parse_jd.py`
- [JD Embedding](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/embed_jd.py): `redrob-ranker/embed_jd.py`

### Candidate Ranking

- [Hybrid Ranker](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/rank.py): `redrob-ranker/rank.py`
- [Skill Match](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/skill_match.py): `redrob-ranker/features/skill_match.py`
- [Consistency Gate](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/consistency_gate.py): `redrob-ranker/features/consistency_gate.py`
- [Reasoning Generator](https://github.com/disha-2601/recruiterx/blob/main/redrob-ranker/features/reasoning_generator.py): `redrob-ranker/features/reasoning_generator.py`

### API and Persistence

- [FastAPI Service](https://github.com/disha-2601/recruiterx/blob/main/api/index.py): `api/index.py`
- [Database Models](https://github.com/disha-2601/recruiterx/blob/main/api/models.py): `api/models.py`
- [SQLite Database](https://github.com/disha-2601/recruiterx/blob/main/api/database.py): `api/database.py`

### Review and Export

- [Ranked Results](https://github.com/disha-2601/recruiterx/blob/main/src/app/(authenticated)/dashboard/results/page.tsx): `src/app/(authenticated)/dashboard/results/page.tsx`
- [CSV Export](https://github.com/disha-2601/recruiterx/blob/main/src/app/api/export/route.ts): `src/app/api/export/route.ts`

### Other components

- **Recruiter**

## Connections

- Recruiter → Project Setup: creates project (evidence: `README.md`)
- Project Setup → Project State: sets project state
- Recruiter → JD Parse API: submits job description (evidence: `README.md`)
- JD Parse API → JD Parser: runs parser (evidence: `src/app/api/parse-jd/route.ts`)
- JD Parser → Project State: returns requirements
- Run Controls → Project State: reads run state (evidence: `src/components/project/PipelineRunner.tsx`)
- Run Controls → Run Orchestrator: starts run (evidence: `src/components/project/PipelineRunner.tsx`)
- Run Orchestrator → JD Embedding: runs embedding (evidence: `src/app/api/runs/route.ts`)
- Run Orchestrator → Hybrid Ranker: runs ranking
- Hybrid Ranker → JD Parser: parses JD on cache miss (evidence: `redrob-ranker/rank.py`)
- Hybrid Ranker → Skill Match: imports scoring (evidence: `redrob-ranker/rank.py`)
- Hybrid Ranker → Consistency Gate: imports checks (evidence: `redrob-ranker/rank.py`)
- Hybrid Ranker → Reasoning Generator: imports narratives (evidence: `redrob-ranker/rank.py`)
- Run Orchestrator → FastAPI Service: writes run results (evidence: `src/app/api/runs/route.ts`)
- FastAPI Service → Database Models: queries models (evidence: `api/index.py`)
- FastAPI Service → SQLite Database: uses database session (evidence: `api/index.py`)
- Recruiter → Ranked Results: reviews shortlist (evidence: `README.md`)
- Ranked Results → CSV Export: requests export
