# eziokwuche/redline architecture

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

- Interactive diagram: https://gitdiagram.com/eziokwuche/redline
- Repository: https://github.com/eziokwuche/redline

## Overview

Redline is a local resume-review and tailoring application. The main workflow uploads a PDF/DOCX, extracts text and a structured profile, saves a session-scoped job description, grades the original resume, then lets the user review an AI-proposed profile, submit edits for a saved revision and rescan, and download a compiled PDF. The API also compares grading results. The graph follows documented flows and indexed imports; unsampled implementation details and some endpoint-level wiring are represented only where the README supports them.

Main entry points: [`frontend/src/App.jsx`](https://github.com/eziokwuche/redline/blob/main/frontend/src/App.jsx) (Workflow UI), [`app/routers/upload.py`](https://github.com/eziokwuche/redline/blob/main/app/routers/upload.py) (Upload and job routes), [`app/services/grading.py`](https://github.com/eziokwuche/redline/blob/main/app/services/grading.py) (Grading and profile workflows), [`app/main.py`](https://github.com/eziokwuche/redline/blob/main/app/main.py) (FastAPI application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["Workflow UI<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_upload_ui["Resume upload<br/>[ResumeUpload.jsx]"]
  node_job_ui["Job description form"]
  node_grade_ui["Grading report<br/>[GradingReport.jsx]"]
  node_editor_ui["Draft editor<br/>[ResumeEditor.jsx]"]
end

subgraph group_api["API workflows"]
  node_app["FastAPI application<br/>[main.py]"]
  node_upload_routes["Upload and job routes<br/>[upload.py]"]
  node_grade_routes["Grade and rescan routes<br/>[grade.py]"]
  node_compare_route["Comparison route<br/>[compare.py]"]
end

subgraph group_analysis["Resume analysis"]
  node_text_extract["Document text extraction<br/>[text_extraction.py]"]
  node_grading["Grading and profile workflows<br/>[grading.py]"]
  node_prompts["LLM prompts<br/>[prompts.py]"]
  node_schemas["Domain schemas<br/>[schemas.py]"]
  node_llm["Provider selection and generation<br/>[llm_client.py]"]
end

subgraph group_persistence["Session and records"]
  node_database[("SQLite database<br/>[database.py]")]
  node_models["Resume and grading records<br/>[models.py]"]
end

subgraph group_outputs["Drafts and outputs"]
  node_latex_renderer["Resume PDF renderer<br/>[latex_renderer.py]"]
  node_latex_template["Resume LaTeX template<br/>[resume.tex.jinja]"]
end

node_user(("Resume reviewer"))
node_llm_services["LLM providers"]
node_pdflatex["pdflatex"]

node_user -->|"uses"| node_webapp
node_webapp -->|"renders"| node_upload_ui
node_webapp -->|"renders"| node_job_ui
node_webapp -->|"renders"| node_grade_ui
node_webapp -->|"renders"| node_editor_ui
node_webapp -->|"calls"| node_api_client
node_upload_ui -->|"submits file"| node_webapp
node_job_ui -->|"submits description"| node_webapp
node_editor_ui -->|"submits edits"| node_webapp
node_api_client -->|"calls API"| node_app
node_app -->|"registers"| node_upload_routes
node_app -->|"registers"| node_grade_routes
node_app -->|"registers"| node_compare_route
node_upload_routes -->|"extracts text"| node_text_extract
node_upload_routes -->|"extracts profile"| node_grading
node_upload_routes -->|"requests rendering"| node_latex_renderer
node_grade_routes -->|"grades and drafts"| node_grading
node_compare_route -->|"compares versions"| node_grading
node_grading -->|"builds prompts"| node_prompts
node_grading -->|"requests generation"| node_llm
node_llm -->|"calls provider"| node_llm_services
node_grading -->|"uses models"| node_schemas
node_upload_routes -->|"gets session"| node_database
node_grade_routes -->|"gets session"| node_database
node_compare_route -->|"gets session"| node_database
node_database -->|"defines base"| node_models
node_app -->|"creates tables"| node_database
node_upload_routes -->|"saves resumes"| node_models
node_grade_routes -->|"saves grading"| node_models
node_compare_route -->|"saves comparison"| node_models
node_upload_routes -->|"renders profile"| node_latex_template
node_latex_renderer -->|"uses template"| node_latex_template
node_upload_routes -->|"compiles PDF"| node_pdflatex
node_webapp -->|"downloads PDF"| node_api_client
node_compare_route -->|"requests comparison"| node_llm

click node_webapp "https://github.com/eziokwuche/redline/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/eziokwuche/redline/blob/main/frontend/src/api.js"
click node_upload_ui "https://github.com/eziokwuche/redline/blob/main/frontend/src/components/ResumeUpload.jsx"
click node_job_ui "https://github.com/eziokwuche/redline/blob/main/frontend/src/components/JobDescriptionForm.jsx"
click node_grade_ui "https://github.com/eziokwuche/redline/blob/main/frontend/src/components/GradingReport.jsx"
click node_editor_ui "https://github.com/eziokwuche/redline/blob/main/frontend/src/components/ResumeEditor.jsx"
click node_app "https://github.com/eziokwuche/redline/blob/main/app/main.py"
click node_upload_routes "https://github.com/eziokwuche/redline/blob/main/app/routers/upload.py"
click node_grade_routes "https://github.com/eziokwuche/redline/blob/main/app/routers/grade.py"
click node_compare_route "https://github.com/eziokwuche/redline/blob/main/app/routers/compare.py"
click node_text_extract "https://github.com/eziokwuche/redline/blob/main/app/services/text_extraction.py"
click node_grading "https://github.com/eziokwuche/redline/blob/main/app/services/grading.py"
click node_prompts "https://github.com/eziokwuche/redline/blob/main/app/services/prompts.py"
click node_schemas "https://github.com/eziokwuche/redline/blob/main/app/schemas.py"
click node_llm "https://github.com/eziokwuche/redline/blob/main/app/services/llm_client.py"
click node_database "https://github.com/eziokwuche/redline/blob/main/app/database.py"
click node_models "https://github.com/eziokwuche/redline/blob/main/app/models.py"
click node_latex_renderer "https://github.com/eziokwuche/redline/blob/main/app/services/latex_renderer.py"
click node_latex_template "https://github.com/eziokwuche/redline/blob/main/app/templates/resume.tex.jinja"

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_webapp,node_api_client,node_upload_ui,node_job_ui,node_grade_ui,node_editor_ui,node_user toneBlue
class node_app,node_upload_routes,node_grade_routes,node_compare_route toneAmber
class node_text_extract,node_grading,node_prompts,node_schemas,node_llm toneMint
class node_database,node_models toneRose
class node_latex_renderer,node_latex_template,node_llm_services,node_pdflatex toneIndigo
```

## Components

### Web client

- [Workflow UI](https://github.com/eziokwuche/redline/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/eziokwuche/redline/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Resume upload](https://github.com/eziokwuche/redline/blob/main/frontend/src/components/ResumeUpload.jsx): `frontend/src/components/ResumeUpload.jsx`
- [Job description form](https://github.com/eziokwuche/redline/blob/main/frontend/src/components/JobDescriptionForm.jsx): `frontend/src/components/JobDescriptionForm.jsx`
- [Grading report](https://github.com/eziokwuche/redline/blob/main/frontend/src/components/GradingReport.jsx): `frontend/src/components/GradingReport.jsx`
- [Draft editor](https://github.com/eziokwuche/redline/blob/main/frontend/src/components/ResumeEditor.jsx): `frontend/src/components/ResumeEditor.jsx`

### API workflows

- [FastAPI application](https://github.com/eziokwuche/redline/blob/main/app/main.py): `app/main.py`
- [Upload and job routes](https://github.com/eziokwuche/redline/blob/main/app/routers/upload.py): `app/routers/upload.py`
- [Grade and rescan routes](https://github.com/eziokwuche/redline/blob/main/app/routers/grade.py): `app/routers/grade.py`
- [Comparison route](https://github.com/eziokwuche/redline/blob/main/app/routers/compare.py): `app/routers/compare.py`

### Resume analysis

- [Document text extraction](https://github.com/eziokwuche/redline/blob/main/app/services/text_extraction.py): `app/services/text_extraction.py`
- [Grading and profile workflows](https://github.com/eziokwuche/redline/blob/main/app/services/grading.py): `app/services/grading.py`
- [LLM prompts](https://github.com/eziokwuche/redline/blob/main/app/services/prompts.py): `app/services/prompts.py`
- [Domain schemas](https://github.com/eziokwuche/redline/blob/main/app/schemas.py): `app/schemas.py`
- [Provider selection and generation](https://github.com/eziokwuche/redline/blob/main/app/services/llm_client.py): `app/services/llm_client.py`

### Session and records

- [SQLite database](https://github.com/eziokwuche/redline/blob/main/app/database.py): `app/database.py`
- [Resume and grading records](https://github.com/eziokwuche/redline/blob/main/app/models.py): `app/models.py`

### Drafts and outputs

- [Resume PDF renderer](https://github.com/eziokwuche/redline/blob/main/app/services/latex_renderer.py): `app/services/latex_renderer.py`
- [Resume LaTeX template](https://github.com/eziokwuche/redline/blob/main/app/templates/resume.tex.jinja): `app/templates/resume.tex.jinja`

### Other components

- **Resume reviewer**
- **LLM providers**
- **pdflatex**

## Connections

- Resume reviewer → Workflow UI: uses (evidence: `README.md`)
- Workflow UI → Resume upload: renders (evidence: `frontend/src/App.jsx`)
- Workflow UI → Job description form: renders (evidence: `frontend/src/App.jsx`)
- Workflow UI → Grading report: renders (evidence: `frontend/src/App.jsx`)
- Workflow UI → Draft editor: renders (evidence: `frontend/src/App.jsx`)
- Workflow UI → API client: calls (evidence: `frontend/src/App.jsx`)
- Resume upload → Workflow UI: submits file (evidence: `README.md`)
- Job description form → Workflow UI: submits description (evidence: `README.md`)
- Draft editor → Workflow UI: submits edits (evidence: `README.md`)
- API client → FastAPI application: calls API (evidence: `README.md`)
- FastAPI application → Upload and job routes: registers (evidence: `app/main.py`)
- FastAPI application → Grade and rescan routes: registers (evidence: `app/main.py`)
- FastAPI application → Comparison route: registers (evidence: `app/main.py`)
- Upload and job routes → Document text extraction: extracts text (evidence: `README.md`)
- Upload and job routes → Grading and profile workflows: extracts profile (evidence: `README.md`)
- Upload and job routes → Resume PDF renderer: requests rendering (evidence: `app/routers/upload.py`)
- Grade and rescan routes → Grading and profile workflows: grades and drafts (evidence: `app/routers/grade.py`)
- Comparison route → Grading and profile workflows: compares versions (evidence: `app/routers/compare.py`)
- Grading and profile workflows → LLM prompts: builds prompts (evidence: `app/services/grading.py`)
- Grading and profile workflows → Provider selection and generation: requests generation (evidence: `app/services/grading.py`)
- Provider selection and generation → LLM providers: calls provider (evidence: `app/services/llm_client.py`)
- Grading and profile workflows → Domain schemas: uses models (evidence: `app/services/grading.py`)
- Upload and job routes → SQLite database: gets session (evidence: `app/routers/upload.py`)
- Grade and rescan routes → SQLite database: gets session (evidence: `app/routers/grade.py`)
- Comparison route → SQLite database: gets session (evidence: `app/routers/compare.py`)
- SQLite database → Resume and grading records: defines base (evidence: `app/database.py`)
- FastAPI application → SQLite database: creates tables (evidence: `app/main.py`)
- Upload and job routes → Resume and grading records: saves resumes (evidence: `app/routers/upload.py`)
- Grade and rescan routes → Resume and grading records: saves grading (evidence: `app/routers/grade.py`)
- Comparison route → Resume and grading records: saves comparison (evidence: `app/routers/compare.py`)
- Upload and job routes → Resume LaTeX template: renders profile (evidence: `README.md`)
- Resume PDF renderer → Resume LaTeX template: uses template (evidence: `app/services/latex_renderer.py`)
- Upload and job routes → pdflatex: compiles PDF (evidence: `app/routers/upload.py`)
- Workflow UI → API client: downloads PDF (evidence: `frontend/src/App.jsx`)
- Comparison route → Provider selection and generation: requests comparison (evidence: `app/routers/compare.py`)
