How sowmya-bh/aijobboard works
Purpose and Entry Points
Job Scout is a FastAPI-hosted AI job-matching and résumé workflow. The backend serves an auth-gated vanilla HTML/JS client and coordinates search, ATS scoring, and LLM-generated application materials. Primary runtime entry points are server.py (FastAPI routes) and run.py; deployment uses render.yaml with Uvicorn. The separate heavyweight scorer deploys from scorer_service/app.py.
Stateful Agent Workflow
LangGraph implements the primary user workflow in agent/graph.py, with node behavior in agent/nodes.py and session state in agent/state.py. The graph runs résumé parsing/scouting and matching, interrupts for job selection, calls ATS scoring, then interrupts again for user-selected follow-up actions (re-score, cover letter, interview questions, tailored résumé, or chat). Checkpointed state carries the selected job, résumé, results, and per-session LLM credentials.
Job Search and Matching Boundary
MongoDB is the source of truth for jobs, filters, facets, and market analytics through agent/db.py. Search first uses Qdrant semantic ranking plus a Hugging Face-hosted Sentence-BERT embedding endpoint in agent/vectors.py; if that dependency set is absent or fails, agent/matcher.py performs local skill-overlap ranking. This keeps model inference and vector storage outside the app process.
ATS Scoring Boundary
ATS/HR scoring is isolated behind agent/rq_tools.py, which calls a remote ResumeHQ scorer rather than importing torch/SBERT into the API service. The scorer’s deployable service is scorer_service/app.py, with its own dependencies in scorer_service/requirements.txt. Errors remain explicit at this boundary rather than producing fabricated scores.
Identity, User Data, and Secrets
JWT authentication and bcrypt password handling live in agent/auth.py. User profiles, saved jobs, and encrypted BYO LLM keys are persisted in MongoDB via agent/userstore.py; Fernet encryption is implemented in agent/crypto.py. Credentials are decrypted only for graph execution and are not returned to clients.
LLM and Safety Layer
agent/llm_user.py adapts user-provided OpenAI, Anthropic, Groq, or OpenAI-compatible endpoints for generation. agent/llm.py supplies server-side Gemini for résumé parsing and fallback chat. Input sanitization and secret-redaction controls are in agent/guardrails.py; optional LangSmith instrumentation is isolated in agent/trace.py.
Data and Deployment Model
Offline ingestion deliberately separates large data/model workloads from the serving image: data/build_mongo.py loads jobs into MongoDB; data/build_embeddings.py locally generates vectors and upserts Qdrant; data/build_canonical_skills.py enriches skills using spaCy/Gensim. Production requires MongoDB Atlas and optionally Qdrant Cloud, Hugging Face Inference, a Hugging Face Gradio/ZeroGPU scorer, Gemini, and LangSmith. Dockerfile is relevant to scorer/container deployment, while Render’s Python runtime keeps the main FastAPI image lightweight.
Main entry points: nodes.py Workflow nodes · server.py FastAPI server · graph.py LangGraph workflow · matcher.py Search and matching
Components 20
Main API
Lightweight FastAPI serving runtime.
- FastAPI server · Auth-gated routes serve the vanilla client and invoke workflows.
server.py - JWT authentication
agent/auth.py - User store · Persists profiles, saved jobs, and encrypted user LLM keys.
agent/userstore.py - Fernet crypto · Decrypts user credentials only for graph execution.
agent/crypto.py
Agent workflow
Checkpointed, interrupt-driven job application flow.
- LangGraph workflow · Pauses for job selection and follow-up application actions.
agent/graph.py - Workflow nodes · Runs parsing, scouting, matching, scoring, and generation actions.
agent/nodes.py - Session state · Carries résumé, selected job, results, and per-session credentials.
agent/state.py - Search and matching · Uses semantic ranking, with local skill-overlap fallback.
agent/matcher.py - Vector search · Queries Qdrant and Hugging Face embeddings.
agent/vectors.py - ATS scorer client · Keeps heavyweight scoring outside the API process.
agent/rq_tools.py - User LLM adapter
agent/llm_user.py - Gemini adapter · Provides résumé parsing and fallback chat.
agent/llm.py - Guardrails · Sanitizes input and redacts secrets.
agent/guardrails.py
Offline data pipeline
Builds production search data outside the serving image.
- Job ingestion · Loads job records into MongoDB.
data/build_mongo.py - Embedding build · Generates vectors locally and upserts Qdrant.
data/build_embeddings.py - Skill enrichment · Builds canonical skills with spaCy and Gensim.
data/build_canonical_skills.py
Managed services
External inference, storage, and observability boundaries.
- MongoDB Atlas · Source of truth for jobs, analytics, users, and saved data.
- Qdrant Cloud
- HF embedding endpoint
- ResumeHQ scorer · Separately deployable heavyweight ATS/HR scoring runtime.
scorer_service/app.py
Connections 20
- FastAPI server → JWT authentication: authenticates
- FastAPI server → User store: profiles and saved jobs
- User store → Fernet crypto: encrypts stored keys
- FastAPI server → LangGraph workflow: starts session
- LangGraph workflow → Workflow nodes: executes
- LangGraph workflow → Session state: checkpoints
- Workflow nodes → Search and matching: finds jobs
- Search and matching → Vector search: semantic ranking
- Vector search → Qdrant Cloud: queries vectors
- Vector search → HF embedding endpoint: creates query embeddings
- Search and matching → MongoDB Atlas: jobs, filters, analytics
- Workflow nodes → ATS scorer client: requests ATS score
- ATS scorer client → ResumeHQ scorer: remote scoring
- Workflow nodes → User LLM adapter: generates user-requested materials
- Workflow nodes → Gemini adapter: parsing and fallback chat
- Workflow nodes → Guardrails: sanitizes and redacts
- Job ingestion → MongoDB Atlas: loads jobs
- Skill enrichment → Job ingestion: enriches skills
- Embedding build → Qdrant Cloud: upserts vectors
- Embedding build → HF embedding endpoint: separate from serving