How kv-raghava/resume_ranking works
Project Type and Purpose
• This is a lightweight, stateless microservice (full-stack backend API) for automating resume ranking.
• Purpose: Receive job descriptions and resumes over HTTP, use OpenAI to extract criteria and score resumes, then return JSON responses.
File Structure
• Top-level:
• app.py – main FastAPI application entry point
• requirements.txt / .env – dependency and configuration
• routes/criteria.py – endpoint for criteria extraction
• routes/scoring.py – endpoint for resume evaluation
• No persistent database: the service is request-driven and uses OpenAI as an external AI engine.
Extracted Insights from README
• Two POST endpoints:
• /extract-criteria
• /evaluate-resume
• Built with FastAPI and OpenAI’s API.
• Configuration via an environment variable (OPENAI_API_KEY).
Main Components & Their Interactions
a. Client (could be a web UI, CLI, or Postman):
• Sends HTTP POST requests with job description or resume payloads.
b. FastAPI Server (app.py):
• Hosts the HTTP server, routes incoming requests.
c. Route Handlers:
• criteria.py – orchestrates extracting criteria logic
• scoring.py – orchestrates resume evaluation logic
d. OpenAI External Service:
• Invoked by route handlers using the OPENAI_API_KEY to perform LLM operations.
e. Environment & Config:
• .env file provides the API key; requirements.txt pins dependencies.
Relationships & Data Flows
1. Client → FastAPI (app.py)
2. FastAPI → Route Handler (criteria.py or scoring.py)
3. Route Handler → OpenAI API (external HTTPS call)
4. OpenAI API → Route Handler (returns JSON with criteria or score)
5. Route Handler → FastAPI → Client (JSON response)
Architectural Patterns & Principles
• Layered (Controller/Router layer, Service/integration layer).
• External facade (OpenAI API) treated as a microservice.
• Stateless design: no local DB; each request is independent.