# sonic-12/ats-resume-scanner architecture

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

- Interactive diagram: https://gitdiagram.com/sonic-12/ats-resume-scanner
- Repository: https://github.com/sonic-12/ats-resume-scanner

## Overview

#### 1. Purpose and runtime shape
ATS Resume Checker is a two-process, local web application that evaluates uploaded PDF resumes for ATS parsing and structural risks. A React/Vite client submits a PDF to a Python/FastAPI API; the API returns a structured report with category scores, detected issues, and recommendations. Analysis is self-contained: no third-party APIs or persistent resume store are part of the design.

Entry points:
- Backend API: `backend/app.py`
- Frontend bootstrap: `frontend/src/main.jsx`
- Frontend root/router state: `frontend/src/App.jsx`

#### 2. Upload-to-analysis boundary
The UI begins on an upload flow, centered on PDF selection and API submission:
- `frontend/src/pages/Upload.jsx`
- `frontend/src/components/Dropzone.jsx`
- `frontend/src/api.js`

`api.js` is the client/server contract boundary. The backend accepts the upload, processes it for that request, and uses `backend/uploads` only as an operational upload location, consistent with the no-persistence intent.

#### 3. Backend orchestration and result contract
`backend/app.py` is the FastAPI composition point: it exposes the REST endpoint(s), coordinates extraction and analysis stages, and serializes the response consumed by the frontend. Core analysis results must remain structured rather than presentation-specific so the client can render backend-produced scores and findings directly.

Relevant paths:
- `backend/app.py`
- `backend/ats_core/resume_model.py`
- `frontend/src/api.js`

#### 4. PDF extraction and normalized resume model
PDF parsing is isolated from ATS evaluation:
- `backend/ats_core/pdf_extractor.py`
- `backend/ats_core/resume_model.py`

The extractor uses PyPDF2 to obtain text and parsing signals from PDF input. The resume model forms the normalized internal representation passed to downstream section detection, rules, scoring, and recommendation generation. This separation is important: parser limitations should surface as ATS-essential findings rather than be conflated with content quality.

#### 5. Structural analysis and ATS rules
Rule-based analysis evaluates whether the extracted document has recognizable resume structure and ATS-safe signals:
- `backend/ats_core/section_detector.py`
- `backend/ats_core/rules.py`

Section detection identifies expected resume areas and organization. Rules translate missing, malformed, or risky signals—such as parseability, headers, contact details, and structure—into concrete issues. These modules define the product’s intentional focus on structural correctness rather than templates or keyword stuffing.

#### 6. Scoring and actionable output
The scoring layer aggregates analysis into a strict 100-point assessment across Tailoring, Content, Sections, and ATS Essentials:
- `backend/ats_core/scorer.py`
- `backend/ats_core/recommendations.py`
- `backend/ats_core/rules.py`

Rules and detected sections feed the scorer; recommendations convert findings into specific fixes. Scores, category breakdowns, issues, and recommendations should be generated from the same underlying findings to prevent UI/report inconsistencies.

#### 7. Report rendering and client-side result lifecycle
The frontend presents the returned report through specialized, display-only components:
- `frontend/src/pages/Report.jsx`
- `frontend/src/components/ScoreGauge.jsx`
- `frontend/src/components/CategoryStats.jsx`
- `frontend/src/components/IssueList.jsx`
- `frontend/src/components/RecommendationList.jsx`

The client temporarily caches result data in browser session/local storage, allowing report navigation without making storage a backend responsibility. React runs via Vite (`frontend/vite.config.js`); FastAPI runs separately with Uvicorn and Python dependencies declared in `backend/requirements.txt`.

Main entry points: [`backend/app.py`](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/app.py) (API orchestration), [`backend/ats_core/rules.py`](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/rules.py) (ATS rules), [`frontend/src/App.jsx`](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/App.jsx) (App router & state), [`frontend/src/pages/Upload.jsx`](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/pages/Upload.jsx) (Upload flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React/Vite Client"]
  node_client_bootstrap["Client bootstrap<br/>React entry<br/>[main.jsx]"]
  node_app_router["App router &amp; state<br/>React root<br/>[App.jsx]"]
  node_upload_page["Upload flow<br/>page<br/>[Upload.jsx]"]
  node_dropzone["PDF selector<br/>[Dropzone.jsx]"]
  node_api_client["API contract client<br/>HTTP client<br/>[api.js]"]
  node_report_page["Report view<br/>page<br/>[Report.jsx]"]
  node_report_components["Report components<br/>display components"]
end

subgraph group_backend["FastAPI Analysis API"]
  node_fastapi_app["API orchestration<br/>FastAPI<br/>[app.py]"]
  node_upload_location[("Operational uploads<br/>temporary files")]
end

subgraph group_analysis["ATS Analysis Core"]
  node_pdf_extractor["PDF extraction<br/>PyPDF2 parser<br/>[pdf_extractor.py]"]
  node_resume_model["Normalized resume<br/>internal model<br/>[resume_model.py]"]
  node_section_detector["Section detection<br/>structural analysis"]
  node_rules["ATS rules<br/>rule engine<br/>[rules.py]"]
  node_scorer["100-point scoring<br/>score aggregator<br/>[scorer.py]"]
  node_recommendations["Recommendations<br/>finding translator<br/>[recommendations.py]"]
end

node_client_bootstrap -->|"mounts"| node_app_router
node_app_router -->|"shows"| node_upload_page
node_app_router -->|"navigates to"| node_report_page
node_upload_page -->|"uses"| node_dropzone
node_upload_page -->|"submits PDF"| node_api_client
node_api_client -->|"multipart upload / report"| node_fastapi_app
node_fastapi_app -.->|"processes upload in"| node_upload_location
node_fastapi_app -->|"extracts PDF"| node_pdf_extractor
node_pdf_extractor -->|"text and signals"| node_resume_model
node_resume_model -->|"analyzes structure"| node_section_detector
node_resume_model -->|"evaluates signals"| node_rules
node_section_detector -->|"detected sections"| node_rules
node_rules -->|"findings"| node_scorer
node_section_detector -->|"section results"| node_scorer
node_rules -->|"findings"| node_recommendations
node_scorer -->|"scores and breakdowns"| node_fastapi_app
node_recommendations -->|"actionable fixes"| node_fastapi_app
node_report_page -->|"renders"| node_report_components

click node_client_bootstrap "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/main.jsx"
click node_app_router "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/App.jsx"
click node_upload_page "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/pages/Upload.jsx"
click node_dropzone "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/components/Dropzone.jsx"
click node_api_client "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/api.js"
click node_report_page "https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/pages/Report.jsx"
click node_fastapi_app "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/app.py"
click node_upload_location "https://github.com/sonic-12/ats-resume-scanner/tree/main/backend/uploads"
click node_pdf_extractor "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/pdf_extractor.py"
click node_resume_model "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/resume_model.py"
click node_section_detector "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/section_detector.py"
click node_rules "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/rules.py"
click node_scorer "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/scorer.py"
click node_recommendations "https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/recommendations.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_bootstrap,node_app_router,node_upload_page,node_dropzone,node_api_client,node_report_page,node_report_components toneBlue
class node_fastapi_app,node_upload_location toneAmber
class node_pdf_extractor,node_resume_model,node_section_detector,node_rules,node_scorer,node_recommendations toneMint
```

## Components

### React/Vite Client

- [Client bootstrap](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/main.jsx): React entry · `frontend/src/main.jsx`
- [App router & state](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/App.jsx): React root · Owns upload/report navigation state. · `frontend/src/App.jsx`
- [Upload flow](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/pages/Upload.jsx): page · `frontend/src/pages/Upload.jsx`
- [PDF selector](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/components/Dropzone.jsx): `frontend/src/components/Dropzone.jsx`
- [API contract client](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/api.js): HTTP client · Submits PDFs and receives structured reports. · `frontend/src/api.js`
- [Report view](https://github.com/sonic-12/ats-resume-scanner/blob/main/frontend/src/pages/Report.jsx): page · Renders temporarily cached report data. · `frontend/src/pages/Report.jsx`
- **Report components**: display components · Scores, categories, issues, and recommendations.

### FastAPI Analysis API

- [API orchestration](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/app.py): FastAPI · Accepts uploads and serializes analysis reports. · `backend/app.py`
- [Operational uploads](https://github.com/sonic-12/ats-resume-scanner/tree/main/backend/uploads): temporary files · Request-processing upload location, not a resume store. · `backend/uploads`

### ATS Analysis Core

- [PDF extraction](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/pdf_extractor.py): PyPDF2 parser · Extracts text and parsing signals. · `backend/ats_core/pdf_extractor.py`
- [Normalized resume](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/resume_model.py): internal model · Parser-independent representation for evaluation. · `backend/ats_core/resume_model.py`
- [Section detection](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/section_detector.py): structural analysis · `backend/ats_core/section_detector.py`
- [ATS rules](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/rules.py): rule engine · Produces structural and parseability findings. · `backend/ats_core/rules.py`
- [100-point scoring](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/scorer.py): score aggregator · Breaks results into Tailoring, Content, Sections, and ATS Essentials. · `backend/ats_core/scorer.py`
- [Recommendations](https://github.com/sonic-12/ats-resume-scanner/blob/main/backend/ats_core/recommendations.py): finding translator · Converts findings into actionable fixes. · `backend/ats_core/recommendations.py`

## Connections

- Client bootstrap → App router & state: mounts
- App router & state → Upload flow: shows
- App router & state → Report view: navigates to
- Upload flow → PDF selector: uses
- Upload flow → API contract client: submits PDF
- API contract client → API orchestration: multipart upload / report
- API orchestration → Operational uploads: processes upload in
- API orchestration → PDF extraction: extracts PDF
- PDF extraction → Normalized resume: text and signals
- Normalized resume → Section detection: analyzes structure
- Normalized resume → ATS rules: evaluates signals
- Section detection → ATS rules: detected sections
- ATS rules → 100-point scoring: findings
- Section detection → 100-point scoring: section results
- ATS rules → Recommendations: findings
- 100-point scoring → API orchestration: scores and breakdowns
- Recommendations → API orchestration: actionable fixes
- Report view → Report components: renders
