Skip to content

Dextron04/resume-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ChatGPT Image Oct 27, 2025, 11_25_06 PM

๐Ÿค– AI Resume Generator

Intelligent Resume Tailoring System powered by Anthropic Claude that automatically generates ATS-optimized resumes based on job descriptions.

Python FastAPI Anthropic Phase

๐ŸŽฏ What This System Does

This AI Resume Generator takes your existing experience, projects, and skills, then intelligently tailors them to match any job description you provide. It uses advanced AI to:

  1. Analyze Job Descriptions โ†’ Extract keywords, requirements, and technologies
  2. Match Your Background โ†’ Find relevant projects and experiences
  3. Generate Tailored Resumes โ†’ Create ATS-optimized PDF resumes
  4. Optimize for ATS โ†’ Ensure high compatibility with Applicant Tracking Systems

๐Ÿ”„ Complete System Flow

graph TD
    A[๐Ÿ“„ Job Description Input] --> B[๐Ÿง  Claude AI Analysis]
    B --> C[๐Ÿ” Keyword Extraction]
    C --> D[๐Ÿ“Š Semantic Matching]

    E[๐Ÿ“ Knowledge Base] --> F[๐Ÿ—‚๏ธ Projects Library]
    E --> G[๐Ÿ’ผ Work Experience]
    E --> H[๐Ÿ› ๏ธ Skills Database]

    D --> I[โš–๏ธ Relevance Scoring]
    F --> I
    G --> I
    H --> I

    I --> J[๐ŸŽฏ Smart Selection]
    J --> K[๐Ÿ“ Resume Generation]
    K --> L[๐Ÿ“‘ LaTeX Compilation]
    L --> M[๐Ÿ“„ PDF Output]

    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style M fill:#e8f5e8
Loading

๐Ÿ” Detailed Flow Breakdown:

Phase 1: Knowledge Base Loading

๐Ÿ“ knowledge_base/
โ”œโ”€โ”€ github_projects/     โ† 25+ projects from your portfolio
โ”œโ”€โ”€ work_experience/     โ† Professional experience history
โ”œโ”€โ”€ skills/             โ† Technical skills organized by category
โ”œโ”€โ”€ past_resumes/       โ† Previous resume versions
โ”œโ”€โ”€ templates/          โ† LaTeX resume templates
โ””โ”€โ”€ profile_summary.json โ† Personal information

What Happens:

  1. System loads 25 GitHub projects with extracted technologies
  2. Imports work experience with achievements and responsibilities
  3. Categorizes technical skills (Languages, Frameworks, Tools, etc.)
  4. Validates all data using Pydantic models for type safety

Phase 2: Job Analysis Engine

# User submits job description
POST /api/analyze-job
{
    "job_description": "We need a React developer with Node.js..."
}

# Claude AI processes the description
โ†“
# Extracts structured data:
{
    "required_skills": ["React", "Node.js", "JavaScript"],
    "preferred_skills": ["TypeScript", "AWS", "Docker"],
    "keywords": ["frontend", "API", "responsive"],
    "experience_level": "Mid-level",
    "industry_focus": "Technology",
    "company_name": "TechCorp"
}

What Happens:

  1. Claude AI analyzes the job posting using advanced NLP
  2. Extracts keywords using multiple pattern-matching techniques
  3. Identifies technologies from a database of 80+ known tech stacks
  4. Determines experience level and industry requirements
  5. Handles API failures with intelligent fallback parsing

Phase 3: Semantic Matching (Implemented)

# Sentence transformers convert text to vectors
job_vector = model.encode(job_requirements)
project_vectors = model.encode(project_descriptions)

# Cosine similarity calculates relevance scores
scores = cosine_similarity(job_vector, project_vectors)
# โ†’ [0.85, 0.72, 0.91, 0.45, ...]

# Top projects selected based on relevance
selected_projects = top_projects_by_score(scores, limit=4)

What Happens:

  1. Sentence transformers convert job requirements to numerical vectors
  2. Project summaries are converted to comparable vectors
  3. Cosine similarity calculates relevance scores (0-1 scale)
  4. Smart selection picks the 3-4 most relevant projects
  5. Technology overlap increases project ranking

Phase 4: Resume Generation (Future)

% LaTeX template with dynamic content
\section{Experience}
\resumeSubHeadingListStart
  % Dynamically inserted based on job relevance
  \resumeProjectHeading
    {\textbf{ConnectX} $|$ \emph{React, Node.js, PostgreSQL}}{June 2024}
    \resumeItemListStart
      \resumeItem{Built real-time chat with Socket.io}
      \resumeItem{Implemented JWT authentication}
    \resumeItemListEnd
\resumeSubHeadingListEnd

What Happens:

  1. Template selection based on job type and industry
  2. Dynamic content insertion with most relevant projects
  3. Keyword optimization to match job requirements
  4. LaTeX compilation to professional PDF format
  5. ATS optimization with proper formatting and keywords

๐Ÿ—๏ธ System Architecture

๐Ÿง  Core Components

ai-resume-generator/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ main.py              # ๐Ÿš€ FastAPI application & API endpoints
โ”‚   โ”œโ”€โ”€ models/              # ๐Ÿ“‹ Pydantic data models
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py      # (ProjectModel, ExperienceModel, etc.)
โ”‚   โ”œโ”€โ”€ services/            # ๐Ÿ”ง Business logic
โ”‚   โ”‚   โ””โ”€โ”€ resume_agent.py  # ๐Ÿค– Core AI agent with Claude integration
โ”‚   โ””โ”€โ”€ templates/           # ๐Ÿ“„ LaTeX resume templates (future)
โ”œโ”€โ”€ knowledge_base/          # ๐Ÿ“š Your personal data
โ”œโ”€โ”€ tests/                   # ๐Ÿงช Comprehensive test suite
โ”œโ”€โ”€ static/                  # ๐ŸŒ Web interface files (future)
โ”œโ”€โ”€ output/                  # ๐Ÿ“„ Generated resumes
โ””โ”€โ”€ requirements.txt         # ๐Ÿ“ฆ Python dependencies

๐Ÿ”— API Endpoints

Endpoint Method Purpose Status
/ GET Root endpoint with system info โœ…
/health GET Health check and agent status โœ…
/api/analyze-job POST Analyze job description with Claude โœ…
/api/knowledge-base/summary GET View loaded projects/experience โœ…
/api/generate-resume POST Generate tailored resume ๐Ÿ”„ Phase 2
/api/resume/{id}/download GET Download generated PDF ๐Ÿ”„ Phase 3

๐Ÿงช Data Models

# Job Analysis Output
class JobAnalysisModel(BaseModel):
    required_skills: List[str]
    preferred_skills: List[str]
    keywords: List[str]
    industry_focus: Optional[str]
    experience_level: Optional[str]
    technologies: List[str]
    company_name: Optional[str]

# Project Information
class ProjectModel(BaseModel):
    title: str
    summary: str
    technologies: List[str]
    github_url: Optional[str]
    relevance_score: Optional[float]

# Work Experience
class ExperienceModel(BaseModel):
    company: str
    position: str
    duration: Dict[str, str]
    description: List[str]
    technologies: List[str]
    achievements: List[str]

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

  • Python 3.10+
  • Anthropic API Key (Get one here)
  • Git for cloning the repository

โšก Quick Setup

# 1. Clone the repository
git clone https://github.com/Dextron04/resume-agent.git
cd resume-agent

# 2. Navigate to the AI generator
cd ai-resume-generator

# 3. Run the automated setup script
./setup.sh

# 4. Configure your API key
cp .env.example .env
# Edit .env and add: ANTHROPIC_API_KEY=your_api_key_here

# 5. Pre-download AI models (prevents hanging)
python download_model.py

# 6. Start the API server
uvicorn app.main:app --reload

๐Ÿ”ง Manual Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment
export ANTHROPIC_API_KEY="your_api_key_here"
export KNOWLEDGE_BASE_PATH="../knowledge_base"

# Run tests to verify setup
pytest tests/test_phase1.py -v

# Start the server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

๐Ÿงช Testing the System

๐ŸŒ Interactive API Testing

Open your browser to: http://localhost:8000/docs

๐Ÿ“ž API Examples

Health Check:

curl http://localhost:8000/health

View Your Knowledge Base:

curl http://localhost:8000/api/knowledge-base/summary

Analyze a Job Description:

curl -X POST "http://localhost:8000/api/analyze-job" \
  -H "Content-Type: application/json" \
  -d '{
    "job_description": "We are seeking a React developer with Node.js experience to build modern web applications. Must have experience with JavaScript, TypeScript, PostgreSQL, and AWS deployment."
  }'

Expected Response:

{
  "analysis": {
    "required_skills": ["React", "Node.js", "JavaScript"],
    "preferred_skills": ["TypeScript", "PostgreSQL", "AWS"],
    "keywords": ["web applications", "modern", "developer"],
    "experience_level": "Mid-level",
    "technologies": [
      "React",
      "Node.js",
      "JavaScript",
      "TypeScript",
      "PostgreSQL",
      "AWS"
    ],
    "company_name": null
  },
  "status": "success"
}

๐Ÿงช Running Tests

# Run all Phase 1 tests
pytest tests/test_phase1.py -v

# Run specific tests
pytest tests/test_phase1.py::TestPhase1::test_job_analysis_with_mock_anthropic -v

# Run with coverage
pytest tests/ --cov=app --cov-report=html

๐Ÿ“Š Development Phases

โœ… Phase 1: Core Foundation (Complete)

  • Knowledge Base Loading - Import projects, experience, skills
  • Claude AI Integration - Job description analysis
  • Technology Extraction - Pattern matching from summaries
  • FastAPI Backend - RESTful API with documentation
  • Comprehensive Testing - 100% test coverage for core features
  • Error Handling - Graceful fallbacks and logging

๐Ÿ”„ Phase 2: Intelligent Matching (In Progress)

  • Semantic Similarity Engine - Vector-based project ranking
  • Smart Project Selection - Choose top 3-4 relevant projects
  • Experience Filtering - Select relevant work history
  • Keyword Optimization - Maximize ATS compatibility
  • Relevance Scoring - Quantify job-project alignment

๐Ÿ”ฎ Phase 3: Resume Generation (Planned)

  • LaTeX Template System - Professional resume layouts
  • Dynamic Content Insertion - Job-specific customization
  • PDF Generation Pipeline - High-quality output
  • Multiple Templates - Industry-specific designs
  • ATS Optimization - Maximum compatibility testing

๐ŸŒŸ Phase 4: Advanced Features (Future)

  • Web Interface - User-friendly frontend
  • Resume Versioning - Track multiple versions
  • A/B Testing - Compare different approaches
  • Analytics Dashboard - Success rate tracking
  • Cover Letter Generation - Matching cover letters

๐Ÿ“ˆ Current Capabilities

โœ… What Works Now:

  • ๐Ÿง  AI Job Analysis: Claude analyzes any job description
  • ๐Ÿ“Š Knowledge Base: 25+ projects and work history loaded
  • ๐Ÿ” Technology Extraction: 80+ technologies automatically detected
  • ๐Ÿš€ REST API: Full documentation at /docs
  • ๐Ÿงช Testing Suite: Comprehensive test coverage
  • โšก Performance: Fast startup with model caching

๐Ÿ“Š System Statistics:

  • Projects Loaded: 25 GitHub repositories
  • Work Experience: 6 professional positions
  • Technologies Known: 80+ frameworks and tools
  • API Response Time: < 2 seconds for job analysis
  • Model Cache: ~80MB sentence transformer model
  • Test Coverage: 100% for Phase 1 features

๐Ÿ”ง Configuration

๐ŸŒ Environment Variables

# Required
ANTHROPIC_API_KEY=your_anthropic_api_key_here

# Optional
KNOWLEDGE_BASE_PATH=../knowledge_base  # Path to your data
LOG_LEVEL=INFO                         # Logging verbosity
MODEL_CACHE_DIR=~/.cache/huggingface   # AI model storage

๐Ÿ“ Knowledge Base Structure

knowledge_base/
โ”œโ”€โ”€ github_projects/         # JSON files for each project
โ”‚   โ”œโ”€โ”€ 01_project_name.json
โ”‚   โ”œโ”€โ”€ 02_another_project.json
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ work_experience/         # Professional experience
โ”‚   โ””โ”€โ”€ work_experience.json
โ”œโ”€โ”€ skills/                  # Technical skills by category
โ”‚   โ””โ”€โ”€ skills.json
โ”œโ”€โ”€ past_resumes/           # Previous resume versions
โ”œโ”€โ”€ templates/              # LaTeX templates
โ””โ”€โ”€ profile_summary.json   # Personal information

๐Ÿ› Troubleshooting

โŒ Common Issues & Solutions

Issue: ModuleNotFoundError: No module named 'sentence_transformers'

# Solution: Install missing dependencies
pip install -r requirements.txt

Issue: Import hanging during startup

# Solution: Pre-download models
python download_model.py

Issue: ANTHROPIC_API_KEY environment variable is required

# Solution: Set your API key
export ANTHROPIC_API_KEY="your_key_here"
# Or add it to your .env file

Issue: Server not starting

# Solution: Check if port 8000 is available
lsof -i :8000
# Or use a different port
uvicorn app.main:app --port 8001

๐Ÿ” Debug Mode

# Enable detailed logging
export LOG_LEVEL=DEBUG

# Run with Python debugger
python -m pdb -c continue -m uvicorn app.main:app --reload

๐Ÿ“„ License & Credits

๐Ÿ“œ License

This project is licensed under the MIT License. See LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Anthropic for Claude AI capabilities
  • Hugging Face for sentence transformer models
  • FastAPI for the excellent web framework
  • LaTeX community for resume templates

๐Ÿ‘จโ€๐Ÿ’ป Author

Tushin Kulshreshtha - GitHub


๐Ÿ”„ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ› ๏ธ Development Setup

# Fork the repository
git clone https://github.com/yourusername/resume-agent.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and test
pytest tests/ -v

# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature

# Open a Pull Request

๐Ÿ“ž Support


๐ŸŽฏ Ready to generate your perfect resume?

Get Started API Docs

Transform your job applications with AI-powered resume tailoring!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors