Skip to content

Latest commit

 

History

132 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocSmith

AI-powered recruitment platform for resume screening, candidate matching, and hiring assistance.

Extracts structured data from resumes using OCR + LLMs, stores them with vector embeddings for semantic search, and matches candidates against job descriptions.


Features

Category Features
Document Processing PDF/image upload, Llama Scout OCR, batch processing, field extraction, verification workflow
Search & Matching Semantic search (Gemini embeddings), hybrid search (BM25 + vector), JD matching, natural language queries
AI Assistants Shortlist refinement (filter/reset/undo), hiring analysis & recommendations, profile chat
Platform Analytics dashboard, JWT auth, role-based access (recruiter/job_seeker), profile management

Tech Stack

Layer Technologies
Backend FastAPI, Python 3.10+, MongoDB Atlas, LangChain, LangGraph
AI/ML Groq (Llama Scout 17B OCR, Llama 3.3 70B LLM), Gemini (embeddings)
Frontend React 18, TypeScript, Vite 5, Tailwind CSS, shadcn/ui, TanStack Query
Auth PyJWT + bcrypt, role-based access
Search BM25 + cosine similarity hybrid ranking

Architecture

  Frontend (React + Vite)  <--- REST --->  Backend (FastAPI)

  - Dashboard                               Multi-Agent Pipeline
  - Search                                  Document -> OCR -> Extract ->
  - Upload                                  Embed -> Store
  - JD Matching
  - Chat                                    AI: Groq (Llama) + Gemini
                                            DB: MongoDB (Documents + Vectors)

Processing Pipeline:

Upload -> Classification -> OCR Extraction -> Field Extraction -> Embedding -> MongoDB

Prerequisites

Requirement Version
Python 3.10+
Node.js 18+
MongoDB 6.0+ (Atlas recommended)
Poppler Latest

API Keys

Service Purpose Link
Groq OCR + LLM console.groq.com
Google Gemini Embeddings aistudio.google.com

Quick Start

1. Clone

git clone <repository-url>
cd job-profile-screening

2. Backend

cd backend
python -m venv venv
venv\Scripts\activate          # Windows
source venv/bin/activate       # Linux/Mac
pip install -r requirements.txt
cp .env.example .env           # Edit with your API keys
uvicorn src.main:app --reload --port 8000

3. Frontend

cd frontend
npm install
npm run dev

4. Verify

Service URL
Frontend http://localhost:8080
Backend API http://localhost:8000
API Docs http://localhost:8000/docs
Health Check http://localhost:8000/health

Docker

# Build and run
docker-compose up --build

# Stop
docker-compose down

Deploy to Render

  1. Push code to GitHub
  2. Create Web Service on Render → connect repo → Root Directory: backend → Runtime: Docker
  3. Set environment variables in Render dashboard:
    GROQ_API_KEY=your_key
    GEMINI_API_KEY=your_key
    MONGO_DB_URI=mongodb+srv://...
    JWT_SECRET=your_secret
    

Environment Variables

Backend (backend/.env)

Variable Required Description
GROQ_API_KEY Yes Groq API key for Llama models
GEMINI_API_KEY Yes Google Gemini API key
MONGO_DB_URI Yes MongoDB connection string
JWT_SECRET Yes JWT signing secret (min 32 chars)
LOG_LEVEL No DEBUG, INFO, WARNING, ERROR (default: INFO)

Frontend (frontend/.env.local)

Variable Default Description
VITE_API_BASE http://localhost:8000 Backend API URL

API Overview

All endpoints prefixed with /api/v1. Full docs at /docs.

Auth

Method Endpoint Description
POST /auth/signup Register user
POST /auth/login Login, get JWT

Resumes

Method Endpoint Description
POST /resumes/upload Upload resume
POST /resumes/upload-batch Batch upload
GET /resumes/ List profiles (paginated)
GET /resumes/{id} Get profile
GET /resumes/search/hybrid Hybrid search
PATCH /resumes/{id}/fields Update fields (draft)
POST /resumes/{id}/verify Verify and index
DELETE /resumes/{id} Delete profile

Job Descriptions

Method Endpoint Description
POST /jd/upload Upload JD, get matches
GET /jd/ List JDs
GET /jd/{id}/matches Get matches
DELETE /jd/{id} Delete JD

Dashboard

Method Endpoint Description
GET /dashboard/summary Full analytics
GET /dashboard/skills Skills breakdown
GET /dashboard/experience Experience distribution
GET /dashboard/domains Domain stats

Chat

Method Endpoint Description
POST /chat/shortlist-assist Refine shortlist
POST /chat/hiring-assist Hiring recommendations
POST /chat/{profile_id} Chat with profile
POST /chat/clear Clear session

Database Setup (MongoDB Atlas)

  1. Create cluster at mongodb.com/cloud/atlas
  2. Create database: docsmith
  3. Create vector search index on resumes collection:
{
  "name": "vector_index",
  "type": "vectorSearch",
  "definition": {
    "fields": [{
      "type": "vector",
      "path": "embedding",
      "numDimensions": 768,
      "similarity": "cosine"
    }]
  }
}
  1. Create standard indexes:
db.resumes.createIndex({ "extracted_data.name": 1 })
db.resumes.createIndex({ "extracted_data.skills": 1 })
db.resumes.createIndex({ "extracted_data.total_experience_years": 1 })
db.resumes.createIndex({ "status": 1 })
db.resumes.createIndex({ "created_at": -1 })

Project Structure

job-profile-screening/
├── backend/
│   ├── src/
│   │   ├── main.py              # FastAPI entry point
│   │   ├── agents/              # 8 AI agents (orchestrator, OCR, extraction, chat)
│   │   ├── api/routers/         # 5 REST routers (auth, resumes, jd, dashboard, chat)
│   │   ├── core/                # Config, logging, JWT security
│   │   ├── database/            # MongoDB connection, models, user repo
│   │   ├── memory/              # Chat history, shortlist sessions
│   │   ├── schemas/             # Pydantic models
│   │   ├── services/            # Groq, Gemini, MongoDB, search services
│   │   ├── utils/               # Image converter, text cleaner, prompts
│   │   └── workflows/           # Document processing pipeline
│   ├── data/                    # Uploads, page images, resumes, JDs
│   ├── Dockerfile
│   ├── requirements.txt
│   └── .env.example
├── frontend/
│   └── src/
│       ├── pages/               # 12 route-level pages
│       ├── components/          # UI (shadcn), auth, layout, search, upload, chat
│       ├── hooks/               # Custom React hooks
│       ├── lib/                 # API client, utilities
│       └── types/               # TypeScript interfaces
├── docker-compose.yml
├── ARCHITECTURE.md
└── README.md

Usage

  1. Register at /auth as recruiter or job_seeker
  2. Upload resumes at /upload (single or batch, PDF/image)
  3. Review & verify extracted data on profile pages
  4. Search candidates at /search using natural language queries
  5. Upload JDs at /jd-search to auto-match candidates
  6. Use AI assistants for shortlist refinement and hiring analysis
  7. View analytics on the dashboard (skills, experience, domains)

Troubleshooting

Issue Solution
ModuleNotFoundError Activate venv, run pip install -r requirements.txt
MongoDB connection failed Check MONGO_DB_URI and network access
Groq API errors Verify API key and quota
PDF processing fails Install Poppler
CORS errors Backend allows http://localhost:8080 by default
Frontend blank page Check browser console, verify backend is running

Related Docs


License

Proprietary software. All rights reserved.

About

A simple multi-agent prototype that automates resume and document screening, creating clean candidate profiles to help recruiters find and evaluate talent quickly.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages