# nithinr8265/scoremycv architecture

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

- Interactive diagram: https://gitdiagram.com/nithinr8265/scoremycv
- Repository: https://github.com/nithinr8265/scoremycv

## Overview

ScoreMyCV is a Flask-based ATS resume analyzer. A signed-in user uploads a PDF, DOCX, or pasted resume; the server extracts text, requests an AI assessment, saves the result, and serves analysis history, detail views, and downloadable reports. Separate capabilities cover password and Google authentication, administration, and the responsive browser UI. The sampled routes show the main storage and analysis calls; template-specific interactions and some UI-to-route wiring are documented or evident only at a high level, so those links are omitted or marked unverified.

Main entry points: [`app.py`](https://github.com/nithinr8265/scoremycv/blob/main/app.py) (Flask app), [`routes/auth.py`](https://github.com/nithinr8265/scoremycv/blob/main/routes/auth.py) (Authentication routes), [`routes/resume.py`](https://github.com/nithinr8265/scoremycv/blob/main/routes/resume.py) (Resume upload), [`routes/analysis.py`](https://github.com/nithinr8265/scoremycv/blob/main/routes/analysis.py) (Analysis workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_flask["Flask app<br/>[app.py]"]
  node_browser["Browser UI<br/>[main.js]"]
  node_views["Page templates"]
end

subgraph group_identity["Identity"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_jwt["JWT utilities<br/>[jwt_util.py]"]
  node_supabase[("Supabase")]
  node_google["Google OAuth"]
end

subgraph group_analysis["Resume analysis"]
  node_resume_routes["Resume upload<br/>[resume.py]"]
  node_extractor["Text extraction<br/>[extractor.py]"]
  node_analysis_routes["Analysis workflow<br/>[analysis.py]"]
  node_groq["Groq analysis<br/>[groq_client.py]"]
end

subgraph group_operations["Reporting and administration"]
  node_history["Analysis history<br/>[analysis.py]"]
  node_reports["Report downloads<br/>[report.py]"]
  node_admin["Admin console<br/>[admin.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_flask
node_flask -->|"registers"| node_auth_routes
node_flask -->|"registers"| node_resume_routes
node_flask -->|"registers"| node_analysis_routes
node_flask -->|"registers"| node_reports
node_flask -->|"registers"| node_admin
node_flask -->|"renders"| node_views
node_browser -->|"API requests"| node_flask
node_auth_routes -->|"reads and writes"| node_supabase
node_auth_routes -->|"creates and decodes"| node_jwt
node_auth_routes -->|"redirects and verifies"| node_google
node_resume_routes -->|"extracts text"| node_extractor
node_resume_routes -->|"stores resume"| node_supabase
node_analysis_routes -->|"loads and saves"| node_supabase
node_analysis_routes -->|"requests assessment"| node_groq
node_history -->|"queries history"| node_supabase
node_reports -->|"loads analysis"| node_supabase
node_admin -->|"queries statistics"| node_supabase

click node_flask "https://github.com/nithinr8265/scoremycv/blob/main/app.py"
click node_browser "https://github.com/nithinr8265/scoremycv/blob/main/static/js/main.js"
click node_views "https://github.com/nithinr8265/scoremycv/tree/main/templates"
click node_auth_routes "https://github.com/nithinr8265/scoremycv/blob/main/routes/auth.py"
click node_jwt "https://github.com/nithinr8265/scoremycv/blob/main/utils/jwt_util.py"
click node_resume_routes "https://github.com/nithinr8265/scoremycv/blob/main/routes/resume.py"
click node_extractor "https://github.com/nithinr8265/scoremycv/blob/main/utils/extractor.py"
click node_analysis_routes "https://github.com/nithinr8265/scoremycv/blob/main/routes/analysis.py"
click node_groq "https://github.com/nithinr8265/scoremycv/blob/main/utils/groq_client.py"
click node_history "https://github.com/nithinr8265/scoremycv/blob/main/routes/analysis.py"
click node_reports "https://github.com/nithinr8265/scoremycv/blob/main/routes/report.py"
click node_admin "https://github.com/nithinr8265/scoremycv/blob/main/routes/admin.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_flask,node_browser,node_views,node_user toneBlue
class node_auth_routes,node_jwt,node_supabase,node_google toneAmber
class node_resume_routes,node_extractor,node_analysis_routes,node_groq toneMint
class node_history,node_reports,node_admin toneRose
```

## Components

### Web experience

- [Flask app](https://github.com/nithinr8265/scoremycv/blob/main/app.py): `app.py`
- [Browser UI](https://github.com/nithinr8265/scoremycv/blob/main/static/js/main.js): `static/js/main.js`
- [Page templates](https://github.com/nithinr8265/scoremycv/tree/main/templates): `templates`

### Identity

- [Authentication routes](https://github.com/nithinr8265/scoremycv/blob/main/routes/auth.py): `routes/auth.py`
- [JWT utilities](https://github.com/nithinr8265/scoremycv/blob/main/utils/jwt_util.py): `utils/jwt_util.py`
- **Supabase**
- **Google OAuth**

### Resume analysis

- [Resume upload](https://github.com/nithinr8265/scoremycv/blob/main/routes/resume.py): `routes/resume.py`
- [Text extraction](https://github.com/nithinr8265/scoremycv/blob/main/utils/extractor.py): `utils/extractor.py`
- [Analysis workflow](https://github.com/nithinr8265/scoremycv/blob/main/routes/analysis.py): `routes/analysis.py`
- [Groq analysis](https://github.com/nithinr8265/scoremycv/blob/main/utils/groq_client.py): `utils/groq_client.py`

### Reporting and administration

- [Analysis history](https://github.com/nithinr8265/scoremycv/blob/main/routes/analysis.py): `routes/analysis.py`
- [Report downloads](https://github.com/nithinr8265/scoremycv/blob/main/routes/report.py): `routes/report.py`
- [Admin console](https://github.com/nithinr8265/scoremycv/blob/main/routes/admin.py): `routes/admin.py`

### Other components

- **User**

## Connections

- User → Flask app: uses (evidence: `app.py`)
- Flask app → Authentication routes: registers (evidence: `app.py`)
- Flask app → Resume upload: registers (evidence: `app.py`)
- Flask app → Analysis workflow: registers (evidence: `app.py`)
- Flask app → Report downloads: registers (evidence: `app.py`)
- Flask app → Admin console: registers (evidence: `app.py`)
- Flask app → Page templates: renders (evidence: `app.py`)
- Browser UI → Flask app: API requests (evidence: `static/js/main.js`)
- Authentication routes → Supabase: reads and writes (evidence: `routes/auth.py`)
- Authentication routes → JWT utilities: creates and decodes (evidence: `routes/auth.py`)
- Authentication routes → Google OAuth: redirects and verifies (evidence: `routes/auth.py`)
- Resume upload → Text extraction: extracts text (evidence: `routes/resume.py`)
- Resume upload → Supabase: stores resume (evidence: `routes/resume.py`)
- Analysis workflow → Supabase: loads and saves (evidence: `routes/analysis.py`)
- Analysis workflow → Groq analysis: requests assessment (evidence: `routes/analysis.py`)
- Analysis history → Supabase: queries history (evidence: `routes/analysis.py`)
- Report downloads → Supabase: loads analysis (evidence: `routes/report.py`)
- Admin console → Supabase: queries statistics (evidence: `routes/admin.py`)
