A Flask-based backend service for fetching, storing, and matching job postings with resume descriptions using semantic search powered by OpenAI.
- Fetch jobs from RapidAPI (JSearch API)
- Store jobs in MongoDB (with OpenAI vector embedding)
- Match jobs to user resumes using cosine similarity
- Preloading strategy for fallback when live API data is insufficient
- Dockerized for easy setup
- Docker
- Docker Compose
- OpenAI API Key (for embedding)
- RapidAPI Key (for job data)
git clone https://github.com/TaoJR/ResumeModifier.git
cd ResumeModifierIn the root directory:
echo "OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" > .envReplace the value with your actual OpenAI key.
Do NOT commit
.envto GitHub.
docker-compose up --buildThis will:
- Start the Flask app on
localhost:5000 - Start MongoDB (available at
mongodb://localhost:27017for Compass, ormongo:27017inside Docker)
Fetch jobs from API and store them with embedding.
Params (as query):
query: Job keyword (e.g., Python)max_pages: Number of pages (default 1)
curl "http://localhost:5000/jobs/fetch_jobs?query=Python&max_pages=1"Matches the user’s skills with top-k job listings based on OpenAI embedding similarity.
Endpoint: POST /api/match_jobs
Content-Type: application/json
Request Body:
{
"candidate_keywords": "Python Flask MongoDB backend",
"top_k": 5
}curl -X POST http://localhost:5000/api/match_jobs ^
-H "Content-Type: application/json" ^
-d "{\"candidate_keywords\": \"Python Flask MongoDB backend\", \"top_k\": 5}"app/job_api.py: Job fetching & embedding logicapp/routes.py: Resume-job matching logicapp/database.py: MongoDB connectionmatcher.py: Core cosine similarity logicrun.py: Entrypoint
You can connect with MongoDB Compass:
- Host:
localhost - Port:
27017 - Database:
jobSearch - Collection:
jobs
- @TaoJR — Backend / Docker / Matching logic