# seekai-786/resume-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/seekai-786/resume-analyzer
- Repository: https://github.com/seekai-786/resume-analyzer

## Overview

AI Resume Analyzer is a Flask app for recruiters to submit a job description and multiple resumes, then view the top three matches. The main workflow validates and saves uploaded files, extracts and cleans their text, compares it with the job description using TF-IDF and cosine similarity, and renders ranked results. The implementation is concentrated in main.py; the README documents supported formats and workflow stages, while the template’s implementation was not sampled. Edges reflect the shown route and function calls or documented user flow.

Main entry points: [`main.py`](https://github.com/seekai-786/resume-analyzer/blob/main/main.py) (Upload handler), [`templates/app.html`](https://github.com/seekai-786/resume-analyzer/blob/main/templates/app.html) (Upload and results UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Recruiter interface"]
  node_web_interface["Upload and results UI<br/>[app.html]"]
  node_upload_handler["Upload handler<br/>[main.py]"]
  node_results["Top candidates<br/>[main.py]"]
end

subgraph group_processing["Resume processing"]
  node_file_validation["File validation<br/>[main.py]"]
  node_upload_storage[("Uploaded files<br/>[main.py]")]
  node_text_extraction["Text extraction<br/>[main.py]"]
  node_text_cleaning["Text cleaning<br/>[main.py]"]
end

subgraph group_matching["Matching and ranking"]
  node_match_resumes["Resume matching<br/>[main.py]"]
  node_tfidf["TF-IDF vectorization<br/>[main.py]"]
  node_cosine["Cosine similarity<br/>[main.py]"]
  node_ranking["Score ranking<br/>[main.py]"]
end

node_recruiter(("Recruiter"))

node_recruiter -->|"enters inputs"| node_web_interface
node_web_interface -->|"submits resumes"| node_upload_handler
node_upload_handler -->|"checks files"| node_file_validation
node_upload_handler -->|"saves files"| node_upload_storage
node_upload_handler -->|"extracts text"| node_text_extraction
node_text_extraction -->|"returns text"| node_text_cleaning
node_upload_handler -->|"cleans job text"| node_text_cleaning
node_upload_handler -->|"matches resumes"| node_match_resumes
node_match_resumes -->|"vectorizes documents"| node_tfidf
node_match_resumes -->|"calculates similarity"| node_cosine
node_match_resumes -->|"sorts scores"| node_ranking
node_ranking -->|"returns top three"| node_results
node_upload_handler -->|"renders results"| node_web_interface

click node_web_interface "https://github.com/seekai-786/resume-analyzer/blob/main/templates/app.html"
click node_upload_handler "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_file_validation "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_upload_storage "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_text_extraction "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_text_cleaning "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_match_resumes "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_tfidf "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_cosine "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_ranking "https://github.com/seekai-786/resume-analyzer/blob/main/main.py"
click node_results "https://github.com/seekai-786/resume-analyzer/blob/main/main.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_interface,node_upload_handler,node_results toneBlue
class node_file_validation,node_upload_storage,node_text_extraction,node_text_cleaning toneAmber
class node_match_resumes,node_tfidf,node_cosine,node_ranking toneMint
class node_recruiter toneIndigo
```

## Components

### Recruiter interface

- [Upload and results UI](https://github.com/seekai-786/resume-analyzer/blob/main/templates/app.html): `templates/app.html`
- [Upload handler](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Top candidates](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`

### Resume processing

- [File validation](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Uploaded files](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Text extraction](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Text cleaning](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`

### Matching and ranking

- [Resume matching](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [TF-IDF vectorization](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Cosine similarity](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`
- [Score ranking](https://github.com/seekai-786/resume-analyzer/blob/main/main.py): `main.py`

### Other components

- **Recruiter**

## Connections

- Recruiter → Upload and results UI: enters inputs (evidence: `README.md`)
- Upload and results UI → Upload handler: submits resumes (evidence: `main.py`)
- Upload handler → File validation: checks files (evidence: `main.py`)
- Upload handler → Uploaded files: saves files (evidence: `main.py`)
- Upload handler → Text extraction: extracts text (evidence: `main.py`)
- Text extraction → Text cleaning: returns text (evidence: `main.py`)
- Upload handler → Text cleaning: cleans job text (evidence: `main.py`)
- Upload handler → Resume matching: matches resumes (evidence: `main.py`)
- Resume matching → TF-IDF vectorization: vectorizes documents (evidence: `main.py`)
- Resume matching → Cosine similarity: calculates similarity (evidence: `main.py`)
- Resume matching → Score ranking: sorts scores (evidence: `main.py`)
- Score ranking → Top candidates: returns top three (evidence: `main.py`)
- Upload handler → Upload and results UI: renders results (evidence: `main.py`)
