Spaces:
Sleeping
Sleeping
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Development Commands
Dependencies & Setup:
uv sync- Install dependencies using uv (recommended)cp .env.example .env- Setup environment variables, then edit.envwith your API keys
Running the Application:
streamlit run src/streamlit_app.py- Start the Streamlit web application (available at http://localhost:8501)uv run streamlit run src/streamlit_app.py- Alternative using uv
Testing:
pytest -q- Run tests quietlypytest src/- Run tests for specific directorypytest -v- Run tests with verbose output
Development:
uv add package-name- Add new dependenciesuv run python -m streamlit run src/streamlit_app.py- Alternative run command
Architecture Overview
This is a Streamlit-based AI resume and cover letter generator that analyzes job descriptions against user background to create tailored documents.
Core Architecture:
- Frontend: Streamlit app (
src/streamlit_app.py) with sidebar inputs and main preview area - Services Layer: Business logic split into focused services
analyse_service.py- JD analysis and user feedback refinementgeneration_service.py- Resume/cover letter generationpdf_service.py- PDF export functionalityllm_service.py- LLM interaction wrapper
- LLM Layer: LiteLLM integration for multi-provider support
litellm_client.py- API client wrapperprompt_templates.py- Template management
Data Flow:
- User inputs JD + background β Analysis service β LLM analysis
- Analysis summary β Generation service β Resume (MD) + Cover letter (text)
- Generated content β PDF service β Exportable PDFs
LLM Integration:
- Uses LiteLLM for multi-provider support (OpenAI, Azure, Gemini)
- Responses parsed as JSON for structured analysis data
- Templates centralized in
llm/prompt_templates.py
PDF Generation:
- WeasyPrint for Markdown β PDF conversion
- Exports to timestamped files in
exports/directory
Key Dependencies:
streamlit- Web UI frameworklitellm- Multi-provider LLM clientweasyprint- PDF generationpydantic- Data validation
Project Structure:
src/
βββ streamlit_app.py # Main application entry point
βββ services/ # Business logic layer
β βββ analyse_service.py # Job description analysis
β βββ generation_service.py # Document generation
β βββ llm_service.py # LLM interaction wrapper
β βββ pdf_service.py # PDF export functionality
βββ llm/ # LLM integration
βββ litellm_client.py # Multi-provider API client
βββ prompt_templates.py # Centralized prompt management
Important Notes:
- Application uses Streamlit session state for workflow persistence
- Environment variables must be configured in
.envbefore running - Supports OpenAI, Azure OpenAI, and Google Gemini via LiteLLM
- PDF exports are saved to
exports/directory with timestamps