How syed-rayyanadil/resume-creator-agent works
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: nodes.py Pipeline Nodes · main.py FastAPI App · graph.py Workflow Graph · resume_template.tex LaTeX Templates
Components 16
Frontend
User-facing Streamlit control panel
- Streamlit UI · Pastes JD, selects model, triggers generation
frontend/app.py
API Boundary
FastAPI entrypoint and request handling
- FastAPI App · Backend HTTP boundary for tailoring requests
app/main.py
Tailoring Workflow
Graph-driven resume generation pipeline
- Workflow Graph · Wires the tailoring steps into an execution flow
app/graph.py - Shared State · Intermediate state passed between workflow steps
app/state.py - Pipeline Nodes · JD parsing, selection, rewriting, and assembly steps
app/nodes.py
Content & Models
Master data, prompts, and model adapter
- Resume Filter · Selects resume content that matches or complements the JD
app/utils/resume_filter.py - Prompt Templates · Extraction and rewriting prompt definitions
app/prompts.py - Ollama Adapter · Wraps the local LLM/runtime interface
app/utils/OllamaConnection.py - Master Profile · Canonical resume profile and experience data
data/my_data.json - Sample JD · Example job description input for demos and testing
Sample_JD.txt - Persistence · Local structured access and persistence layer
app/database.py - Chunker · Splits long text for analysis and processing
app/utils/chunker.py
Rendering
LaTeX and PDF artifact generation
- LaTeX Templates · Resume and cover letter template files
app/templates/resume_template.tex - PDF Builder · Compiles LaTeX into downloadable PDFs
app/utils/pdf_generator.py - Tailored Resume TeX · Intermediate tailored resume source
tailored_resume.tex - Cover Letter TeX · Intermediate cover letter source
cover_letter.tex
Connections 16
- 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