# ranjitacharya13-crypto/smart_resume architecture

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

- Interactive diagram: https://gitdiagram.com/ranjitacharya13-crypto/smart_resume
- Repository: https://github.com/ranjitacharya13-crypto/smart_resume

## Overview

SmartHire AI is an explainable resume-screening application: recruiters prepare a job brief, upload resumes, and review a ranked shortlist with evidence and mentor-style guidance. The sampled API owns extraction, parsing, matching, and persistence; the frontend provides the upload and review workspace. The README documents CPU-friendly JAX matching and SQLite/Postgres support. Some frontend request and result-rendering code and the architecture document were not fully sampled, so those links are omitted or marked unverified.

Main entry points: [`backend/app/main.py`](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/main.py) (Screening endpoints), [`frontend/app/page.tsx`](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/frontend/app/page.tsx) (Upload and shortlist), [`backend/app/database.py`](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/database.py) (Database sessions), [`backend/app/models.py`](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/models.py) (Job and candidate records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Recruiter workspace"]
  node_dashboard["Upload and shortlist<br/>[page.tsx]"]
end

subgraph group_api["Screening API"]
  node_api_routes["Screening endpoints<br/>[main.py]"]
end

subgraph group_analysis["Resume analysis"]
  node_extract["Document extraction<br/>[extraction.py]"]
  node_parser["Document parsing<br/>[parser.py]"]
  node_matcher["Recursive matching<br/>[matcher.py]"]
end

subgraph group_persistence["Application data"]
  node_models["Job and candidate records<br/>[models.py]"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_relational_db[("SQLite or Postgres")]
end

node_recruiter(("Recruiter"))

node_recruiter -->|"uploads resumes"| node_dashboard
node_dashboard -->|"creates job"| node_api_routes
node_dashboard -.->|"uploads and requests shortlist"| node_api_routes
node_api_routes -->|"extracts text"| node_extract
node_api_routes -->|"parses documents"| node_parser
node_api_routes -->|"matches candidate"| node_matcher
node_api_routes -->|"creates and queries"| node_models
node_api_routes -->|"uses sessions"| node_db_session
node_models -->|"inherits base"| node_db_session
node_db_session -->|"connects to"| node_relational_db

click node_dashboard "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/frontend/app/page.tsx"
click node_api_routes "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/main.py"
click node_extract "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/extraction.py"
click node_parser "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/parser.py"
click node_matcher "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/matcher.py"
click node_models "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/models.py"
click node_db_session "https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/database.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_dashboard toneBlue
class node_api_routes toneAmber
class node_extract,node_parser,node_matcher toneMint
class node_models,node_db_session,node_relational_db toneRose
class node_recruiter toneIndigo
```

## Components

### Recruiter workspace

- [Upload and shortlist](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`

### Screening API

- [Screening endpoints](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/main.py): `backend/app/main.py`

### Resume analysis

- [Document extraction](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/extraction.py): `backend/app/services/extraction.py`
- [Document parsing](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/parser.py): `backend/app/services/parser.py`
- [Recursive matching](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/services/matcher.py): `backend/app/services/matcher.py`

### Application data

- [Job and candidate records](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database sessions](https://github.com/ranjitacharya13-crypto/smart_resume/blob/main/backend/app/database.py): `backend/app/database.py`
- **SQLite or Postgres**

### Other components

- **Recruiter**

## Connections

- Recruiter → Upload and shortlist: uploads resumes (evidence: `frontend/app/page.tsx`)
- Upload and shortlist → Screening endpoints: creates job (evidence: `frontend/app/page.tsx`)
- Upload and shortlist → Screening endpoints: uploads and requests shortlist
- Screening endpoints → Document extraction: extracts text (evidence: `backend/app/main.py`)
- Screening endpoints → Document parsing: parses documents (evidence: `backend/app/main.py`)
- Screening endpoints → Recursive matching: matches candidate (evidence: `backend/app/main.py`)
- Screening endpoints → Job and candidate records: creates and queries (evidence: `backend/app/main.py`)
- Screening endpoints → Database sessions: uses sessions (evidence: `backend/app/main.py`)
- Job and candidate records → Database sessions: inherits base (evidence: `backend/app/models.py`)
- Database sessions → SQLite or Postgres: connects to (evidence: `backend/app/database.py`)
