# syed-rayyanadil/resume-creator-agent architecture

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

- Interactive diagram: https://gitdiagram.com/syed-rayyanadil/resume-creator-agent
- Repository: https://github.com/syed-rayyanadil/resume-creator-agent

## Overview

1. **Two-process architecture**
   - The repo is split into a **Streamlit UI** in `frontend/app.py` and a **FastAPI backend** under `app/`.
   - The frontend is the user-facing control plane; the backend does the actual JD analysis, content selection, LLM prompting, and document generation.

2. **User interaction layer**
   - The Streamlit app lets a user paste a job description, choose a model, and trigger generation.
   - It is primarily a thin orchestration/UI layer that sends requests to the backend and receives generated artifacts such as tailored resume content and downloadable files.

3. **Backend entrypoint and API boundary**
   - `app/main.py` is the FastAPI entrypoint.
   - This is the boundary between UI requests and the internal tailoring pipeline; it likely exposes endpoints for analysis and resume generation.

4. **Graph-based generation pipeline**
   - `app/graph.py`, `app/nodes.py`, and `app/state.py` indicate a **multi-step workflow** rather than a single prompt call.
   - `state.py` likely defines the shared intermediate state that flows through the pipeline.
   - `nodes.py` appears to hold individual transformation steps such as JD parsing, skill selection, experience selection, and final assembly.
   - `graph.py` likely wires those steps together into a directed execution flow.

5. **Resume tailoring logic**
   - `app/utils/resume_filter.py` is the core matching layer that filters the master resume content against the job description.
   - This is where the repository enforces “strictly match or complement the JD” behavior described in the README.
   - The output of this stage becomes the content fed into the writing and formatting stages.

6. **LLM integration and prompt engineering**
   - `app/prompts.py` contains the prompt templates used to guide rewriting and extraction.
   - `app/utils/OllamaConnection.py` is the model adapter layer, isolating the rest of the system from the specific LLM provider/runtime.
   - The architecture suggests that model choice is a configurable dependency rather than being hardcoded into the business logic.

7. **Document generation and formatting**
   - `app/templates/resume_template.tex` and `app/templates/cover_letter_template.tex` are the LaTeX rendering templates for final output.
   - `app/utils/pdf_generator.py` is the document build step that turns generated LaTeX into a PDF deliverable.
   - This creates a distinct final-stage boundary: structured tailored content is transformed into a presentation-ready artifact.

8. **Data sources and master profile**
   - `data/my_data.json` is the persistent master resume profile containing personal info, skills, experience, education, and projects.
   - `Sample_JD.txt` is a sample input job description for testing and demos.
   - The system appears to treat the JSON file as the canonical source of truth and selectively extracts from it for each JD.

9. **Supporting utilities and persistence**
   - `app/utils/chunker.py` suggests long JD or profile text is split into manageable chunks before analysis.
   - `app/database.py` likely handles local persistence or structured access to stored data, even though the repo does not show a full database stack.
   - These utilities support the pipeline but are not the primary business logic.

10. **Generated artifacts and feedback loop**
   - Root-level files like `cover_letter.tex` and `tailored_resume.tex` look like generated or intermediate outputs.
   - `app/test_nodes.py` and `test_jinja.py` indicate validation around graph steps and template rendering.
   - This suggests the system is designed to verify both the orchestration logic and the final document formatting separately.

11. **End-to-end data flow**
   - The main flow is: **JD input in Streamlit → backend analysis graph → master data filtering → LLM-assisted rewriting → LaTeX rendering → PDF output**.
   - The key architectural boundary is between the **interactive frontend** and the **generation backend**, with the graph/state layer acting as the internal workflow engine.

12. **What matters most for an architecture diagram**
   - Show the Streamlit UI, FastAPI backend, the graph/node/state workflow, the master JSON resume data, the LLM adapter, and the LaTeX/PDF generation step as distinct components.
   - The most important arrows are from UI to backend, from backend to master data and LLM, and from backend to LaTeX/PDF artifacts.

Main entry points: [`app/nodes.py`](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/nodes.py) (Pipeline Nodes), [`app/main.py`](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/main.py) (FastAPI App), [`app/graph.py`](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/graph.py) (Workflow Graph), [`app/templates/resume_template.tex`](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/templates/resume_template.tex) (LaTeX Templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_app["Streamlit UI<br/>[app.py]"]
end

subgraph group_api["API Boundary"]
  node_main_api["FastAPI App<br/>api entrypoint<br/>[main.py]"]
end

subgraph group_workflow["Tailoring Workflow"]
  node_graph_engine{{"Workflow Graph<br/>orchestrator<br/>[graph.py]"}}
  node_pipeline_state(("Shared State<br/>state model<br/>[state.py]"))
  node_pipeline_nodes["Pipeline Nodes<br/>transform steps<br/>[nodes.py]"]
end

subgraph group_content["Content & Models"]
  node_jd_filter["Resume Filter<br/>matching logic<br/>[resume_filter.py]"]
  node_prompt_bank["Prompt Templates<br/>prompting<br/>[prompts.py]"]
  node_llm_adapter["Ollama Adapter<br/>model connector"]
  node_master_data[("Master Profile<br/>json source<br/>[my_data.json]")]
  node_jd_sample["Sample JD<br/>input sample<br/>[Sample_JD.txt]"]
  node_db_layer["Persistence<br/>storage access<br/>[database.py]"]
  node_chunker["Chunker<br/>text utility<br/>[chunker.py]"]
end

subgraph group_rendering["Rendering"]
  node_tex_templates["LaTeX Templates<br/>render templates"]
  node_pdf_build["PDF Builder<br/>document build<br/>[pdf_generator.py]"]
  node_resume_tex["Tailored Resume TeX<br/>generated artifact"]
  node_cover_tex["Cover Letter TeX<br/>generated artifact<br/>[cover_letter.tex]"]
end

node_frontend_app -->|"send JD + options"| node_main_api
node_main_api -->|"start workflow"| node_graph_engine
node_graph_engine -->|"init state"| node_pipeline_state
node_graph_engine -->|"run steps"| node_pipeline_nodes
node_pipeline_nodes -->|"select content"| node_jd_filter
node_pipeline_nodes -->|"split text"| node_chunker
node_pipeline_nodes -->|"apply prompts"| node_prompt_bank
node_pipeline_nodes -->|"call model"| node_llm_adapter
node_jd_filter -->|"read profile"| node_master_data
node_main_api -.->|"read/write"| node_db_layer
node_main_api -.->|"accept sample input"| node_jd_sample
node_pipeline_nodes -->|"render structure"| node_tex_templates
node_tex_templates -->|"emit resume"| node_resume_tex
node_tex_templates -->|"emit cover"| node_cover_tex
node_resume_tex -->|"compile"| node_pdf_build
node_cover_tex -->|"compile"| node_pdf_build

click node_frontend_app "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/frontend/app.py"
click node_main_api "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/main.py"
click node_graph_engine "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/graph.py"
click node_pipeline_state "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/state.py"
click node_pipeline_nodes "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/nodes.py"
click node_jd_filter "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/resume_filter.py"
click node_prompt_bank "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/prompts.py"
click node_llm_adapter "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/OllamaConnection.py"
click node_master_data "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/data/my_data.json"
click node_jd_sample "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/Sample_JD.txt"
click node_db_layer "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/database.py"
click node_chunker "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/chunker.py"
click node_tex_templates "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/templates/resume_template.tex"
click node_pdf_build "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/pdf_generator.py"
click node_resume_tex "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/tailored_resume.tex"
click node_cover_tex "https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/cover_letter.tex"

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_frontend_app toneBlue
class node_main_api toneAmber
class node_graph_engine,node_pipeline_state,node_pipeline_nodes toneMint
class node_jd_filter,node_prompt_bank,node_llm_adapter,node_master_data,node_jd_sample,node_db_layer,node_chunker toneRose
class node_tex_templates,node_pdf_build,node_resume_tex,node_cover_tex toneIndigo
```

## Components

### Frontend

User-facing Streamlit control panel

- [Streamlit UI](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/frontend/app.py): ui · Pastes JD, selects model, triggers generation · `frontend/app.py`

### API Boundary

FastAPI entrypoint and request handling

- [FastAPI App](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/main.py): api entrypoint · Backend HTTP boundary for tailoring requests · `app/main.py`

### Tailoring Workflow

Graph-driven resume generation pipeline

- [Workflow Graph](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/graph.py): orchestrator · Wires the tailoring steps into an execution flow · `app/graph.py`
- [Shared State](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/state.py): state model · Intermediate state passed between workflow steps · `app/state.py`
- [Pipeline Nodes](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/nodes.py): transform steps · JD parsing, selection, rewriting, and assembly steps · `app/nodes.py`

### Content & Models

Master data, prompts, and model adapter

- [Resume Filter](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/resume_filter.py): matching logic · Selects resume content that matches or complements the JD · `app/utils/resume_filter.py`
- [Prompt Templates](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/prompts.py): prompting · Extraction and rewriting prompt definitions · `app/prompts.py`
- [Ollama Adapter](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/OllamaConnection.py): model connector · Wraps the local LLM/runtime interface · `app/utils/OllamaConnection.py`
- [Master Profile](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/data/my_data.json): json source · Canonical resume profile and experience data · `data/my_data.json`
- [Sample JD](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/Sample_JD.txt): input sample · Example job description input for demos and testing · `Sample_JD.txt`
- [Persistence](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/database.py): storage access · Local structured access and persistence layer · `app/database.py`
- [Chunker](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/chunker.py): text utility · Splits long text for analysis and processing · `app/utils/chunker.py`

### Rendering

LaTeX and PDF artifact generation

- [LaTeX Templates](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/templates/resume_template.tex): render templates · Resume and cover letter template files · `app/templates/resume_template.tex`
- [PDF Builder](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/app/utils/pdf_generator.py): document build · Compiles LaTeX into downloadable PDFs · `app/utils/pdf_generator.py`
- [Tailored Resume TeX](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/tailored_resume.tex): generated artifact · Intermediate tailored resume source · `tailored_resume.tex`
- [Cover Letter TeX](https://github.com/syed-rayyanadil/resume-creator-agent/blob/main/cover_letter.tex): generated artifact · Intermediate cover letter source · `cover_letter.tex`

## Connections

- Streamlit UI → FastAPI App: send JD + options · UI submits user input to backend
- FastAPI App → Workflow Graph: start workflow · API hands request to the tailoring pipeline
- Workflow Graph → Shared State: init state · Creates shared execution state
- Workflow Graph → Pipeline Nodes: run steps · Executes the ordered transformation nodes
- Pipeline Nodes → Resume Filter: select content · Matches master profile content to the JD
- Pipeline Nodes → Chunker: split text · Prepares long inputs for analysis
- Pipeline Nodes → Prompt Templates: apply prompts · Uses prompt templates for extraction and rewriting
- Pipeline Nodes → Ollama Adapter: call model · Delegates rewriting and extraction to the LLM layer
- Resume Filter → Master Profile: read profile · Consumes canonical resume data
- FastAPI App → Persistence: read/write · Supports structured persistence and retrieval
- FastAPI App → Sample JD: accept sample input · Can use example JD for testing or demo flows
- Pipeline Nodes → LaTeX Templates: render structure · Fills LaTeX templates with tailored content
- LaTeX Templates → Tailored Resume TeX: emit resume · Produces tailored resume source
- LaTeX Templates → Cover Letter TeX: emit cover · Produces cover letter source
- Tailored Resume TeX → PDF Builder: compile · Builds final resume PDF output
- Cover Letter TeX → PDF Builder: compile · Builds final cover letter PDF output
