# ealshoba/ai-resume-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/ealshoba/ai-resume-analyzer
- Repository: https://github.com/ealshoba/ai-resume-analyzer

## Overview

AI Resume Analyzer lets a user upload a PDF, optionally provide job and career context, and receive resume and ATS scores, feedback, and—optionally—an improved PDF. The browser submits the form to the FastAPI analysis endpoint; the server extracts resume text, requests structured analysis from Gemini, and can render revised text into a downloadable PDF. README capabilities such as job-description comparison and career-level analysis are included in the AI analysis stage. Source excerpts show these calls, but not every server implementation detail.

Main entry points: [`server/main.py`](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py) (Analyze endpoint), [`client/script.js`](https://github.com/ealshoba/ai-resume-analyzer/blob/main/client/script.js) (Upload and options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_client_ui["Upload and options<br/>[script.js]"]
  node_client_results["Results and download<br/>[script.js]"]
end

subgraph group_backend["Analysis backend"]
  node_api["Analyze endpoint<br/>[main.py]"]
  node_extract["PDF text extraction<br/>[main.py]"]
  node_ai_analysis["Resume analysis<br/>[main.py]"]
  node_response_validation["Analysis validation<br/>[main.py]"]
  node_pdf_generation["Revised PDF generation<br/>[main.py]"]
end

subgraph group_services["External services"]
  node_gemini["Google Gemini"]
end

node_user(("Resume user"))

node_user -->|"selects and configures"| node_client_ui
node_client_ui -->|"posts form"| node_api
node_api -->|"extracts text"| node_extract
node_api -->|"builds prompt"| node_ai_analysis
node_ai_analysis -->|"requests analysis"| node_gemini
node_gemini -->|"returns content"| node_response_validation
node_api -->|"validates response"| node_response_validation
node_api -->|"creates revised PDF"| node_pdf_generation
node_api -->|"returns analysis"| node_client_results
node_client_results -->|"displays and downloads"| node_user

click node_client_ui "https://github.com/ealshoba/ai-resume-analyzer/blob/main/client/script.js"
click node_client_results "https://github.com/ealshoba/ai-resume-analyzer/blob/main/client/script.js"
click node_api "https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py"
click node_extract "https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py"
click node_ai_analysis "https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py"
click node_response_validation "https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py"
click node_pdf_generation "https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/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_client_ui,node_client_results,node_user toneBlue
class node_api,node_extract,node_ai_analysis,node_response_validation,node_pdf_generation toneAmber
class node_gemini toneMint
```

## Components

### Browser client

- [Upload and options](https://github.com/ealshoba/ai-resume-analyzer/blob/main/client/script.js): `client/script.js`
- [Results and download](https://github.com/ealshoba/ai-resume-analyzer/blob/main/client/script.js): `client/script.js`

### Analysis backend

- [Analyze endpoint](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py): `server/main.py`
- [PDF text extraction](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py): `server/main.py`
- [Resume analysis](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py): `server/main.py`
- [Analysis validation](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py): `server/main.py`
- [Revised PDF generation](https://github.com/ealshoba/ai-resume-analyzer/blob/main/server/main.py): `server/main.py`

### External services

- **Google Gemini**

### Other components

- **Resume user**

## Connections

- Resume user → Upload and options: selects and configures (evidence: `client/script.js`)
- Upload and options → Analyze endpoint: posts form (evidence: `client/script.js`)
- Analyze endpoint → PDF text extraction: extracts text (evidence: `server/main.py`)
- Analyze endpoint → Resume analysis: builds prompt (evidence: `server/main.py`)
- Resume analysis → Google Gemini: requests analysis (evidence: `server/main.py`)
- Google Gemini → Analysis validation: returns content (evidence: `server/main.py`)
- Analyze endpoint → Analysis validation: validates response (evidence: `server/main.py`)
- Analyze endpoint → Revised PDF generation: creates revised PDF (evidence: `server/main.py`)
- Analyze endpoint → Results and download: returns analysis (evidence: `client/script.js`)
- Results and download → Resume user: displays and downloads (evidence: `client/script.js`)
