# leetcode2307-coder/resume-agent architecture

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

- Interactive diagram: https://gitdiagram.com/leetcode2307-coder/resume-agent
- Repository: https://github.com/leetcode2307-coder/resume-agent

## Overview

Resume Agent is a cross-platform resume tailoring product. Users submit a resume and job description through Flutter; the API creates a background job, the worker runs analysis and rewrite/review workflows, and results are streamed for the client to display, with PDF generation also documented. The graph preserves interview preparation and resume rendering as capabilities. Some backend wiring is supported only by README statements or import references; uncertain implementation links are omitted or marked unverified.

Main entry points: [`app/main.py`](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/main.py) (FastAPI API), [`app/worker_logic.py`](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/worker_logic.py) (Job processor), [`app/graph/workflow.py`](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/graph/workflow.py) (Agent workflow), [`app/llm.py`](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/llm.py) (LLM adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_flutter["Flutter app<br/>[main.dart]"]
  node_client_screens["Workflow screens"]
  node_client_widgets["Agent result views"]
  node_api_client["API client<br/>[api_service.dart]"]
end

subgraph group_api["API and jobs"]
  node_api_server["FastAPI API<br/>[main.py]"]
  node_auth_routes["Auth endpoints<br/>[auth_routes.py]"]
  node_auth["Token auth<br/>[auth.py]"]
  node_job_queue[("Redis jobs<br/>[main.py]")]
  node_celery["Celery worker<br/>[celery_app.py]"]
  node_worker["Job processor<br/>[worker_logic.py]"]
end

subgraph group_ai["Resume intelligence"]
  node_state["Workflow state<br/>[state.py]"]
  node_workflow["Agent workflow<br/>[workflow.py]"]
  node_analyzer["Resume analyzer<br/>[analyzer.py]"]
  node_rewriter["Resume rewriter<br/>[rewriter.py]"]
  node_critic["Rewrite critic<br/>[critic.py]"]
  node_interviewer["Interview prep<br/>[interview.py]"]
  node_schemas["Resume schemas<br/>[resume.py]"]
  node_prompts["Agent prompts<br/>[prompts.py]"]
  node_llm["LLM adapter<br/>[llm.py]"]
end

subgraph group_output["Documents and storage"]
  node_pdf_builder["Resume builder"]
  node_latex_utils["LaTeX utilities<br/>[latex_utils.py]"]
  node_latex_executor["PDF executor<br/>[latex_executer.py]"]
  node_template["Resume template"]
  node_file_storage[("PDF storage<br/>[storage.py]")]
end

node_user(("Resume user"))
node_llm_provider["OpenRouter / Groq"]

node_user -->|"submits resume"| node_flutter
node_flutter -.->|"presents workflow"| node_client_screens
node_client_screens -.->|"requests jobs"| node_api_client
node_api_client -->|"REST / SSE"| node_api_server
node_api_server -->|"mounts routes"| node_auth_routes
node_auth_routes -.->|"issues token"| node_user
node_api_server -.->|"checks identity"| node_auth
node_api_server -->|"stores job"| node_job_queue
node_api_server -->|"queues job"| node_celery
node_celery -->|"pulls job"| node_job_queue
node_celery -.->|"dispatches task"| node_worker
node_worker -->|"updates events"| node_job_queue
node_worker -->|"streams workflow"| node_workflow
node_workflow -->|"uses state"| node_state
node_workflow -->|"invokes analysis"| node_analyzer
node_workflow -->|"invokes rewrite"| node_rewriter
node_workflow -->|"invokes review"| node_critic
node_workflow -->|"prepares interview"| node_interviewer
node_analyzer -->|"calls model"| node_llm
node_rewriter -->|"calls model"| node_llm
node_critic -->|"calls model"| node_llm
node_interviewer -->|"calls model"| node_llm
node_analyzer -->|"validates output"| node_schemas
node_rewriter -->|"validates output"| node_schemas
node_critic -->|"validates output"| node_schemas
node_interviewer -->|"validates output"| node_schemas
node_analyzer -->|"uses prompt"| node_prompts
node_rewriter -->|"uses prompt"| node_prompts
node_critic -->|"uses prompt"| node_prompts
node_interviewer -->|"uses prompt"| node_prompts
node_llm -->|"requests completions"| node_llm_provider
node_worker -.->|"builds PDF"| node_pdf_builder
node_worker -.->|"generates PDF"| node_latex_executor
node_pdf_builder -->|"uses utilities"| node_latex_utils
node_pdf_builder -.->|"renders template"| node_template
node_worker -->|"stores PDF"| node_file_storage
node_api_server -.->|"serves downloads"| node_file_storage
node_api_server -->|"streams results"| node_client_widgets

click node_flutter "https://github.com/leetcode2307-coder/resume-agent/blob/master/frontend/lib/main.dart"
click node_client_screens "https://github.com/leetcode2307-coder/resume-agent/tree/master/frontend/lib/screens"
click node_client_widgets "https://github.com/leetcode2307-coder/resume-agent/tree/master/frontend/lib/widgets"
click node_api_client "https://github.com/leetcode2307-coder/resume-agent/blob/master/frontend/lib/services/api_service.dart"
click node_api_server "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/main.py"
click node_auth_routes "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/auth_routes.py"
click node_auth "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/auth.py"
click node_job_queue "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/main.py"
click node_celery "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/celery_app.py"
click node_worker "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/worker_logic.py"
click node_state "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/graph/state.py"
click node_workflow "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/graph/workflow.py"
click node_analyzer "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/analyzer.py"
click node_rewriter "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/rewriter.py"
click node_critic "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/critic.py"
click node_interviewer "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/interview.py"
click node_schemas "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/schemas/resume.py"
click node_prompts "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/prompts.py"
click node_llm "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/llm.py"
click node_pdf_builder "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/resume_builder_tool.py"
click node_latex_utils "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/services/latex_utils.py"
click node_latex_executor "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/latex_executer.py"
click node_template "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/templates/resume_template.tex"
click node_file_storage "https://github.com/leetcode2307-coder/resume-agent/blob/master/app/storage.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_flutter,node_client_screens,node_client_widgets,node_api_client,node_user toneBlue
class node_api_server,node_auth_routes,node_auth,node_job_queue,node_celery,node_worker toneAmber
class node_state,node_workflow,node_analyzer,node_rewriter,node_critic,node_interviewer,node_schemas,node_prompts,node_llm,node_llm_provider toneMint
class node_pdf_builder,node_latex_utils,node_latex_executor,node_template,node_file_storage toneRose
```

## Components

### Client experience

- [Flutter app](https://github.com/leetcode2307-coder/resume-agent/blob/master/frontend/lib/main.dart): `frontend/lib/main.dart`
- [Workflow screens](https://github.com/leetcode2307-coder/resume-agent/tree/master/frontend/lib/screens): `frontend/lib/screens`
- [Agent result views](https://github.com/leetcode2307-coder/resume-agent/tree/master/frontend/lib/widgets): `frontend/lib/widgets`
- [API client](https://github.com/leetcode2307-coder/resume-agent/blob/master/frontend/lib/services/api_service.dart): `frontend/lib/services/api_service.dart`

### API and jobs

- [FastAPI API](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/main.py): `app/main.py`
- [Auth endpoints](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/auth_routes.py): `app/auth_routes.py`
- [Token auth](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/auth.py): `app/auth.py`
- [Redis jobs](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/main.py): `app/main.py`
- [Celery worker](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/celery_app.py): `app/celery_app.py`
- [Job processor](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/worker_logic.py): `app/worker_logic.py`

### Resume intelligence

- [Workflow state](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/graph/state.py): `app/graph/state.py`
- [Agent workflow](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/graph/workflow.py): `app/graph/workflow.py`
- [Resume analyzer](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/analyzer.py): `app/agents/analyzer.py`
- [Resume rewriter](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/rewriter.py): `app/agents/rewriter.py`
- [Rewrite critic](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/critic.py): `app/agents/critic.py`
- [Interview prep](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/agents/interview.py): `app/agents/interview.py`
- [Resume schemas](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/schemas/resume.py): `app/schemas/resume.py`
- [Agent prompts](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/prompts.py): `app/prompts.py`
- [LLM adapter](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/llm.py): `app/llm.py`

### Documents and storage

- [Resume builder](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/resume_builder_tool.py): `app/resume_builder_tool.py`
- [LaTeX utilities](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/services/latex_utils.py): `app/services/latex_utils.py`
- [PDF executor](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/latex_executer.py): `app/latex_executer.py`
- [Resume template](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/templates/resume_template.tex): `app/templates/resume_template.tex`
- [PDF storage](https://github.com/leetcode2307-coder/resume-agent/blob/master/app/storage.py): `app/storage.py`

### Other components

- **Resume user**
- **OpenRouter / Groq**

## Connections

- Resume user → Flutter app: submits resume (evidence: `README.md`)
- Flutter app → Workflow screens: presents workflow
- Workflow screens → API client: requests jobs
- API client → FastAPI API: REST / SSE (evidence: `README.md`)
- FastAPI API → Auth endpoints: mounts routes (evidence: `app/main.py`)
- Auth endpoints → Resume user: issues token
- FastAPI API → Token auth: checks identity (evidence: `app/main.py`)
- FastAPI API → Redis jobs: stores job (evidence: `app/main.py`)
- FastAPI API → Celery worker: queues job (evidence: `README.md`)
- Celery worker → Redis jobs: pulls job (evidence: `README.md`)
- Celery worker → Job processor: dispatches task (evidence: `app/celery_app.py`)
- Job processor → Redis jobs: updates events (evidence: `app/worker_logic.py`)
- Job processor → Agent workflow: streams workflow (evidence: `app/worker_logic.py`)
- Agent workflow → Workflow state: uses state (evidence: `app/graph/workflow.py`)
- Agent workflow → Resume analyzer: invokes analysis (evidence: `app/graph/workflow.py`)
- Agent workflow → Resume rewriter: invokes rewrite (evidence: `app/graph/workflow.py`)
- Agent workflow → Rewrite critic: invokes review (evidence: `app/graph/workflow.py`)
- Agent workflow → Interview prep: prepares interview (evidence: `README.md`)
- Resume analyzer → LLM adapter: calls model (evidence: `app/agents/analyzer.py`)
- Resume rewriter → LLM adapter: calls model (evidence: `app/agents/rewriter.py`)
- Rewrite critic → LLM adapter: calls model (evidence: `app/agents/critic.py`)
- Interview prep → LLM adapter: calls model (evidence: `app/agents/interview.py`)
- Resume analyzer → Resume schemas: validates output (evidence: `app/agents/analyzer.py`)
- Resume rewriter → Resume schemas: validates output (evidence: `app/agents/rewriter.py`)
- Rewrite critic → Resume schemas: validates output (evidence: `app/agents/critic.py`)
- Interview prep → Resume schemas: validates output (evidence: `app/agents/interview.py`)
- Resume analyzer → Agent prompts: uses prompt (evidence: `app/agents/analyzer.py`)
- Resume rewriter → Agent prompts: uses prompt (evidence: `app/agents/rewriter.py`)
- Rewrite critic → Agent prompts: uses prompt (evidence: `app/agents/critic.py`)
- Interview prep → Agent prompts: uses prompt (evidence: `app/agents/interview.py`)
- LLM adapter → OpenRouter / Groq: requests completions (evidence: `README.md`)
- Job processor → Resume builder: builds PDF (evidence: `app/worker_logic.py`)
- Job processor → PDF executor: generates PDF (evidence: `app/worker_logic.py`)
- Resume builder → LaTeX utilities: uses utilities (evidence: `app/resume_builder_tool.py`)
- Resume builder → Resume template: renders template
- Job processor → PDF storage: stores PDF (evidence: `app/worker_logic.py`)
- FastAPI API → PDF storage: serves downloads (evidence: `app/main.py`)
- FastAPI API → Agent result views: streams results (evidence: `README.md`)
