How jaysharma424/ai-job-board works
Purpose and Entry Points
Job Dekho is a full-stack AI recruitment platform for candidate job discovery/resume assistance and employer job publishing. The Next.js App Router UI starts at app/page.tsx with global layout in app/layout.tsx. The FastAPI API entry point is backend/main.py, which registers domain routers and exposes OpenAPI docs.
Frontend Workspaces
The frontend is a client-side dashboard application rather than a server-rendered content site. Candidate flows—job feed, filters, resume upload, applications, and interview tools—center on app/CandidateDashboard.tsx; recruiter publishing and pipeline views center on app/EmployerDashboard.tsx. Session-oriented AI coaching is surfaced by app/AICareerCoach.tsx. These components call the FastAPI backend via the configured public API base URL.
API and Domain Boundary
FastAPI separates responsibilities into routers, with schemas in backend/models.py and MongoDB wiring in backend/database.py.
• Authentication, OTP, and account recovery: backend/routers/auth.py
• Candidate profile, saved jobs, and applications: backend/routers/user.py
• Structured job discovery/filtering: backend/routers/jobs.py
• Employer onboarding, publishing, and ETL trigger: backend/routers/employer.py
• Resume and AI product APIs: backend/routers/resume.py, backend/routers/premium.py, backend/routers/chat.py
Job Ingestion and Asynchronous Enrichment
Employer publishing is deliberately decoupled from LLM processing. backend/routers/employer.py saves a raw job immediately with fallback/regex-derived fields and an unprocessed marker. A scheduler invokes the secured ETL endpoint; it batches unprocessed jobs, asks Gemini for schema-shaped enrichment (skills, category, experience, Markdown description), then updates the MongoDB document. This boundary keeps publish latency independent of external model latency and failures. backend/normalize_jobs.py supports normalization workflows.
Persistence and Search
MongoDB Atlas is the system of record for users, employers, raw and normalized jobs, applications, and saved items, accessed through backend/database.py. Structured, compound job search reads MongoDB via backend/routers/jobs.py; it does not depend on vector search. Qdrant Cloud is reserved for semantic resume-to-job retrieval. backend/vector_db.py loads local FastEmbed / MiniLM embeddings, initializes the vector collection, and supports idempotent vector upserts tied to job records.
Resume, Premium, and Chat Intelligence
Resume processing accepts PDFs, extracts text, embeds the candidate context, retrieves relevant Qdrant jobs, hydrates full documents from MongoDB, and uses Gemini to produce match scores, fit rationale, and skill gaps; the primary API implementation is backend/routers/resume.py. Gemini also powers ATS scoring, cover letters, and checkout-adjacent premium behavior in backend/routers/premium.py. Career conversations flow through backend/routers/chat.py; the UI supplies a user-provided Gemini key for that session rather than persisting it server-side.
External Services and Runtime
The frontend runs on Next.js 14/TypeScript; the backend is async Python/FastAPI served by Uvicorn. Production deploys as separate Render services, with container definitions in Dockerfile and backend/Dockerfile. External dependencies are MongoDB Atlas, Qdrant Cloud, Google Gemini, and Brevo’s HTTPS API for OTP email. The batch ETL scheduler is external and authenticates with a cron secret.
AI Quality Evaluation
AI behavior has an offline evaluation path separate from production traffic. Golden inputs in backend/etl_golden.csv, backend/resume_golden.csv, backend/chatbot_ragas_golden.csv, and backend/premium_golden.csv are run by backend/generate_predictions.py; backend/evaluate_system.py combines deterministic metrics with NVIDIA-hosted judge scoring. Outputs are persisted under backend/evaluation_results/, providing a regression signal for extraction, matching, chat grounding, and premium endpoint behavior.
Main entry points: main.py FastAPI application · database.py MongoDB Atlas · resume.py Resume intelligence API · employer.py Employer publishing API
Components 20
Next.js frontend
- App entry and layout
app/page.tsx - Candidate dashboard · Job discovery, applications, resume, and interview flows.
app/CandidateDashboard.tsx - Employer dashboard · Employer publishing and pipeline views.
app/EmployerDashboard.tsx - AI career coach · Supplies a session-only user Gemini key.
app/AICareerCoach.tsx
FastAPI backend
- FastAPI application · Registers domain routers and OpenAPI docs.
backend/main.py - Auth and OTP API
backend/routers/auth.py - Candidate API · Profiles, saved jobs, and applications.
backend/routers/user.py - Structured jobs API · MongoDB-backed compound filtering and discovery.
backend/routers/jobs.py - Employer publishing API · Writes raw jobs and exposes the secured ETL trigger.
backend/routers/employer.py - Resume intelligence API · PDF matching, retrieval, and fit analysis.
backend/routers/resume.py - Premium AI API · ATS scoring, cover letters, and premium behavior.
backend/routers/premium.py - Career chat API
backend/routers/chat.py
Data and AI services
- MongoDB Atlas · Stores accounts, jobs, applications, and saved items.
backend/database.py - Qdrant Cloud · Semantic resume-to-job retrieval index.
backend/vector_db.py - Google Gemini
- Brevo HTTPS API · Delivers OTP email.
Async operations and evaluation
- External ETL scheduler · Authenticates ETL requests with a cron secret.
- Job enrichment pipeline · Batches unprocessed jobs and writes Gemini-derived normalized fields.
backend/normalize_jobs.py - Offline AI evaluation · Runs golden cases and judge-assisted regression metrics.
backend/evaluate_system.py - Evaluation results
Connections 29
- App entry and layout → Candidate dashboard: renders
- App entry and layout → Employer dashboard: renders
- App entry and layout → AI career coach: renders
- Candidate dashboard → FastAPI application: API calls
- Employer dashboard → FastAPI application: API calls
- AI career coach → FastAPI application: session chat calls
- FastAPI application → Auth and OTP API: routes
- FastAPI application → Candidate API: routes
- FastAPI application → Structured jobs API: routes
- FastAPI application → Employer publishing API: routes
- FastAPI application → Resume intelligence API: routes
- FastAPI application → Premium AI API: routes
- FastAPI application → Career chat API: routes
- Auth and OTP API → MongoDB Atlas: accounts
- Auth and OTP API → Brevo HTTPS API: OTP email
- Candidate API → MongoDB Atlas: profiles and applications
- Structured jobs API → MongoDB Atlas: structured search
- Employer publishing API → MongoDB Atlas: raw job publish
- External ETL scheduler → Employer publishing API: secured ETL trigger
- Employer publishing API → Job enrichment pipeline: starts batch
- Job enrichment pipeline → MongoDB Atlas: reads raw and updates normalized jobs
- Job enrichment pipeline → Google Gemini: schema enrichment
- Resume intelligence API → Qdrant Cloud: semantic retrieval
- Resume intelligence API → MongoDB Atlas: hydrates job documents
- Resume intelligence API → Google Gemini: fit analysis
- Premium AI API → Google Gemini: generates AI outputs
- Career chat API → Google Gemini: uses session key
- Offline AI evaluation → Google Gemini: judge scoring
- Offline AI evaluation → Evaluation results: writes metrics