Skip to content

Gojer16/RoleMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Resume Tailoring System

AI-powered resume tailoring system that adapts your base resume to specific job descriptions while preserving truthfulness.

🎯 Overview

This system intelligently tailors resumes to job postings by:

  • Analyzing job requirements and your resume
  • Scoring relevance of each bullet point
  • Rewriting content for clarity (without fabrication)
  • Filtering low-relevance bullets
  • Reordering sections by relevance
  • Generating tailored resumes in multiple formats

Key Principle: Preserve truth, improve signal-to-noise ratio.

✨ Features

  • PDF Parsing: Layout-aware extraction preserving structure
  • LLM Integration: Gemini and DeepSeek support with structured outputs
  • Job Detection: Auto-extracts requirements from job descriptions
  • Alignment Scoring: 0-1 relevance score per bullet with explanations
  • Controlled Rewriting: Strict no-fabrication rules with hallucination detection
  • Quality Validation: Automated checks for metric consistency, keyword stuffing
  • Multiple Formats: Output as PDF, DOCX, or Markdown
  • Chrome Extension: One-click tailoring from job boards (LinkedIn, Indeed, Greenhouse, Lever)
  • REST API: Full-featured API with auto-generated docs
  • Docker Support: Easy deployment locally or to cloud

πŸš€ Quick Start

Prerequisites

  • Python 3.11+
  • uv (Python package manager)
  • API key for Gemini or DeepSeek
  • Docker (optional, for containerized deployment)

Installation

  1. Clone and setup:
cd backend
uv venv
source .venv/bin/activate  # On macOS/Linux
# On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
  1. Configure API keys:
cp .env.example .env
# Edit .env and add your API keys
  1. Test the system:
# Parse a resume
python parse_resume.py path/to/resume.pdf

# Extract job requirements
python extract_job.py sample_job.txt

# Score alignment
python score_alignment.py path/to/resume.pdf sample_job.txt

# Complete pipeline
python assemble_resume.py path/to/resume.pdf sample_job.txt

Using Docker

cp .env.example .env
# Edit .env with API keys
./start-docker.sh

Access API at http://localhost:8000/docs

πŸ“– Usage

Command Line Tools

Parse Resume:

python parse_resume.py resume.pdf

Extract Job Requirements:

python extract_job.py job_description.txt
python extract_job.py --text "Job description text here"

Score Alignment:

python score_alignment.py resume.pdf job_description.txt

Rewrite Resume:

python rewrite_resume.py resume.pdf job_description.txt
python rewrite_resume.py resume.pdf job_description.txt gemini 0.6

Complete Pipeline:

python assemble_resume.py resume.pdf job_description.txt
python assemble_resume.py resume.pdf job_description.txt --format pdf --threshold 0.4

Quality Validation:

python validate_quality.py resume.pdf job_description.txt

API Server

Start server:

cd backend
./start_server.sh

API Endpoints:

  • POST /api/parse-resume - Parse PDF resume
  • POST /api/extract-job - Extract job requirements
  • POST /api/score-alignment - Score resume-job alignment
  • POST /api/tailor-resume - Complete tailoring pipeline

Documentation:

See backend/API_EXAMPLES.md for detailed usage.

Chrome Extension

  1. Install extension:

    • Open chrome://extensions/
    • Enable "Developer mode"
    • Click "Load unpacked"
    • Select extension folder
  2. Start backend:

    cd backend
    ./start_server.sh
  3. Use extension:

    • Navigate to job posting (LinkedIn, Indeed, etc.)
    • Click extension icon
    • Upload resume PDF
    • Click "Tailor Resume"
    • Download tailored resume

See extension/README.md for detailed instructions.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Chrome Extension (MV3)                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Content Script  │────────▢│   Popup UI / Service     β”‚  β”‚
β”‚  β”‚  (Job Detection) β”‚         β”‚   Worker (API Client)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                     β”‚ REST API
                                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FastAPI Backend (Python)                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              Resume Processing Pipeline               β”‚   β”‚
β”‚  β”‚  1. Parse     β†’  2. Extract  β†’  3. Score             β”‚   β”‚
β”‚  β”‚       ↓              ↓              ↓                 β”‚   β”‚
β”‚  β”‚  4. Rewrite   β†’  5. Assemble β†’  6. Validate          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  PDF Parser      β”‚  β”‚  LLM Orchestrator            β”‚    β”‚
β”‚  β”‚  (PyMuPDF/       β”‚  β”‚  (Gemini/DeepSeek +          β”‚    β”‚
β”‚  β”‚   pdfplumber)    β”‚  β”‚   Instructor)                β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

backend/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ models/          # Pydantic data models
β”‚   β”œβ”€β”€ parsers/         # PDF and text parsing
β”‚   β”œβ”€β”€ llm/            # LLM integration
β”‚   β”œβ”€β”€ pipeline/       # Processing pipeline
β”‚   └── api/            # FastAPI endpoints
β”œβ”€β”€ tests/              # Test suite
β”œβ”€β”€ *.py               # CLI tools
└── requirements.txt    # Python dependencies

extension/
β”œβ”€β”€ manifest.json       # Extension configuration
β”œβ”€β”€ content.js         # Job detection
β”œβ”€β”€ background.js      # Service worker
β”œβ”€β”€ popup.html/js      # UI and logic
└── config.js          # Environment config

πŸ§ͺ Testing

Run Tests

cd backend
pytest tests/

Manual Testing

See extension/TESTING.md for comprehensive testing checklist.

Test Coverage

  • Unit tests for parsers, models, and pipeline components
  • Integration tests for API endpoints
  • Manual testing guide for extension

πŸš€ Deployment

Local (Docker)

./start-docker.sh

Cloud Deployment

See DEPLOYMENT.md for detailed guides:

  • AWS ECS + Fargate ($10-30/month)
  • GCP Cloud Run ($0-10/month with free tier)
  • Azure Container Instances ($10-20/month)

Hybrid Setup

Extension supports multiple environments:

  • Local: http://localhost:8000
  • Staging: Configure in extension settings
  • Production: Configure in extension settings

πŸ”’ Security

  • API keys stored in environment variables
  • Secrets management for cloud deployment
  • CORS configured for extension
  • Input validation on all endpoints
  • Quality validation prevents bad outputs

πŸ’° Cost Optimization

LLM Costs (per resume):

  • Gemini Flash: ~$0.01-0.02
  • DeepSeek: ~$0.005-0.01

Infrastructure:

  • Local: Free (your machine)
  • Cloud: $0-30/month depending on platform and usage

Tips:

  • Use DeepSeek for lower costs
  • Cloud Run scales to zero (pay per use)
  • Set relevance threshold higher to reduce processing

πŸ› Troubleshooting

Common Issues

"No job detected"

  • Refresh page and wait 2-3 seconds
  • Use manual input fallback

"Failed to tailor resume"

  • Check backend is running
  • Verify API keys are configured
  • Check quality validation didn't fail

"Quality validation failed"

  • Lower relevance threshold
  • Check for metric changes in rewrite
  • Review validation report

Extension can't connect

  • Verify backend URL in extension
  • Check CORS configuration
  • Look at browser console for errors

See DEPLOYMENT.md for more troubleshooting tips.

πŸ“š Documentation

  • API Examples: backend/API_EXAMPLES.md
  • Extension Guide: extension/README.md
  • Extension Testing: extension/TESTING.md
  • Deployment Guide: DEPLOYMENT.md

πŸŽ“ How It Works

Pipeline Stages

  1. Parse Resume: Extract structured data from PDF
  2. Extract Job: Analyze job description for requirements
  3. Score Alignment: Rate each bullet's relevance (0-1)
  4. Rewrite Bullets: Improve clarity without fabrication
  5. Assemble Resume: Filter, reorder, and format
  6. Validate Quality: Check for hallucinations and issues

Quality Controls

  • No Fabrication: Strict rules prevent inventing experience
  • Metric Consistency: Detects if numbers were added/changed
  • Hallucination Detection: Multiple checks for false content
  • Content Loss Prevention: Warns if too many bullets removed
  • Keyword Stuffing Detection: Flags unnatural repetition

🀝 Contributing

This is a personal project, but suggestions are welcome!

πŸ“„ License

MIT License - See LICENSE file for details

πŸ™ Acknowledgments

Built with:

  • FastAPI for the API
  • Instructor for structured LLM outputs
  • PyMuPDF & pdfplumber for PDF parsing
  • ReportLab for PDF generation
  • Google Gemini & DeepSeek for LLM capabilities

πŸ“ž Support

For issues or questions:

  1. Check documentation in respective folders
  2. Review troubleshooting section
  3. Check browser/server console logs

Status: Production Ready βœ…

All 12 planned tasks completed. System is fully functional for local use and ready for cloud deployment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors