# perseus4674/ai-resume-screener architecture

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

- Interactive diagram: https://gitdiagram.com/perseus4674/ai-resume-screener
- Repository: https://github.com/perseus4674/ai-resume-screener

## Overview

TalentScout AI screens uploaded resumes against a job description and presents fit scores and skill gaps in a browser dashboard. The workflow runs from the user’s upload through the FastAPI analysis route, document extraction, text cleaning, scoring and skill comparison, then returns per-resume results for visualization. A separate feedback action sends candidate skills and the job description to an optional OpenAI-backed service. Results are also inserted into SQLite. The PDF-report generator is present but no invocation is shown. Source excerpts establish the backend calls; README and frontend excerpts support the browser/API flow.

Main entry points: [`main.py`](https://github.com/perseus4674/ai-resume-screener/blob/main/main.py) (FastAPI app), [`static/app.js`](https://github.com/perseus4674/ai-resume-screener/blob/main/static/app.js) (Dashboard UI), [`static/index.html`](https://github.com/perseus4674/ai-resume-screener/blob/main/static/index.html) (Web page), [`utils/ai_feedback.py`](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/ai_feedback.py) (AI feedback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_dashboard["Dashboard UI<br/>[app.js]"]
  node_page["Web page<br/>[index.html]"]
end

subgraph group_api["API orchestration"]
  node_api_app["FastAPI app<br/>[main.py]"]
end

subgraph group_analysis["Resume analysis"]
  node_extract["Document extraction<br/>[text_extraction.py]"]
  node_clean["Text cleaning<br/>[preprocessing.py]"]
  node_similarity["Fit scoring<br/>[similarity.py]"]
  node_skills["Skill gap analysis<br/>[skills.py]"]
end

subgraph group_services["Persistence and feedback"]
  node_database[("Results database<br/>[database.py]")]
  node_feedback["AI feedback<br/>[ai_feedback.py]"]
  node_pdf_report["PDF report generator<br/>[pdf_report.py]"]
end

node_user(("Recruiter"))
node_openai["OpenAI"]

node_user -->|"opens"| node_page
node_page -->|"loads"| node_dashboard
node_dashboard -->|"submits requests"| node_api_app
node_api_app -->|"extracts uploads"| node_extract
node_api_app -->|"cleans text"| node_clean
node_api_app -->|"calculates score"| node_similarity
node_api_app -->|"compares skills"| node_skills
node_api_app -->|"initializes and inserts"| node_database
node_api_app -->|"requests feedback"| node_feedback
node_feedback -->|"requests completion"| node_openai

click node_dashboard "https://github.com/perseus4674/ai-resume-screener/blob/main/static/app.js"
click node_page "https://github.com/perseus4674/ai-resume-screener/blob/main/static/index.html"
click node_api_app "https://github.com/perseus4674/ai-resume-screener/blob/main/main.py"
click node_extract "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/text_extraction.py"
click node_clean "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/preprocessing.py"
click node_similarity "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/similarity.py"
click node_skills "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/skills.py"
click node_database "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/database.py"
click node_feedback "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/ai_feedback.py"
click node_pdf_report "https://github.com/perseus4674/ai-resume-screener/blob/main/utils/pdf_report.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,node_page toneBlue
class node_api_app toneAmber
class node_extract,node_clean,node_similarity,node_skills toneMint
class node_database,node_feedback,node_pdf_report toneRose
class node_user,node_openai toneIndigo
```

## Components

### Web interface

- [Dashboard UI](https://github.com/perseus4674/ai-resume-screener/blob/main/static/app.js): `static/app.js`
- [Web page](https://github.com/perseus4674/ai-resume-screener/blob/main/static/index.html): `static/index.html`

### API orchestration

- [FastAPI app](https://github.com/perseus4674/ai-resume-screener/blob/main/main.py): `main.py`

### Resume analysis

- [Document extraction](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/text_extraction.py): `utils/text_extraction.py`
- [Text cleaning](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/preprocessing.py): `utils/preprocessing.py`
- [Fit scoring](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/similarity.py): `utils/similarity.py`
- [Skill gap analysis](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/skills.py): `utils/skills.py`

### Persistence and feedback

- [Results database](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/database.py): `utils/database.py`
- [AI feedback](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/ai_feedback.py): `utils/ai_feedback.py`
- [PDF report generator](https://github.com/perseus4674/ai-resume-screener/blob/main/utils/pdf_report.py): `utils/pdf_report.py`

### Other components

- **Recruiter**
- **OpenAI**

## Connections

- Recruiter → Web page: opens (evidence: `README.md`)
- Web page → Dashboard UI: loads
- Dashboard UI → FastAPI app: submits requests (evidence: `README.md`)
- FastAPI app → Document extraction: extracts uploads (evidence: `main.py`)
- FastAPI app → Text cleaning: cleans text (evidence: `main.py`)
- FastAPI app → Fit scoring: calculates score (evidence: `main.py`)
- FastAPI app → Skill gap analysis: compares skills (evidence: `main.py`)
- FastAPI app → Results database: initializes and inserts (evidence: `main.py`)
- FastAPI app → AI feedback: requests feedback (evidence: `main.py`)
- AI feedback → OpenAI: requests completion (evidence: `utils/ai_feedback.py`)
