Skip to content
Moksh008Public

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   ░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   ░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▓▓█████▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓████▓▓▓▓▓▓▓▓█████▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░███▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░▒███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▓▓█▓▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▓▓▓▓▓█▓▓█▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░██▓▓▓▓█▓▓▓▓▓▓▓▓▒▒▒▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░▓█▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓█████████░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░▒████████████▓▓▓▓▒▓▓█████▓█▓▓██████████▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░▓█▓█████▓▒▒▓███▓▓█▓▓▓▓▓▓▓█▓███▓░   ░███▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░██▓██▒        ▓██▓█▓▓█▓▓█▓██▓░     ▒███▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░██▓██▓░        ░▓███▓█▓▓███░░      ▓███▓░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░██▓███░         ░░████████░       ░████▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░██▓▓███░░      ░░███▓▓█████░░   ░░███▓█▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░▓█▓▓▓████▒░   ░████▓▓▓▓█▓█████▒▒▓████▓█▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░▒██▓▓▓███████████▓▓▓▓▓▓▓██▓████████████░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░▒█▓▒▒▓▓███████▓▓▓▓███▓▓████▓▓▓█▓███▓██░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░▓█▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓███▓█▒░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░██▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓████████▓██▓▓█░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░██▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▓██▓▓▓▓██░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░██▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓███████▓██░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓██▓▓▓▓▓█▓█▓▓▓▓▓▓▓███████▓▓▓█▓░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓██▒░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████▓▓██▓▓▓▓▓▓▓▓▓▓█████░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░███▓▓▓▓███▓▓▓██▓▓▓▓███▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░░▓███▓▓▓▓███████████████▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░░▓████▓▓▓▓▓██████████████▓▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░░░░▓██▓██▓▓▓▓▓▓▓▓▓██████▓▓█▓▓▓████░░░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░░░▒███▓▓▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓██▓▓█▓███▒░░░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░░░░▓███▓▒▒▓▓▓██▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓███▓██▓▓███▒░░░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░░░▒███▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓██▓▓▓█▓▓▓██▓▓▓▓███▓░░░░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░░░░▓███▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓▓█▓▓▓███▓▓███▓▓▓▓▓████▒░░░░░░░░░░░░░░░░░         
     ░░░░░░░░░░░░▒████▓█▓▓▓▓▓▓███▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓█▓▓██▓▓▓▓▓███▒░░░░░░░░░░░░░░░         
     ░░░░░▒▒▓██████▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓█████████▓▓███████▓█▓▓████▓▓▓▓▓████▓▓▒░░░░░░░░░░         
     ░▓█████▓▓▓▓▓▓▓▓▓▓▓▓▓██████████████████████████████████████████▓▓▓▓▓▓▓███████▒░░░░░         
     ░██▓▓▓▓█▓▓▓▓███▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███▓▓▓▓▓██▓▓▓████░░░         
     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓██▓░         
     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓█▓▓▓▓█▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓█▓██▓▓▓▓▓▓▓▓▓▓██░         
     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓████▓▓█████▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓█░         
     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓██▓████▓█▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓████▓█░         
     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓█▓███████▓██▓▓█▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓███▓████▓▓░         
     ░▓▓▓▓▓▓▓▓▓▓████▓▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓███████▓▓░         
     ░▓▓▓▓▓▓▓▓▓▓▓██████▓▓▓▓▓████▓▓▓▓▓█▓▓▓▓▓▓▓▓▓█████████▓█▓▓▓▓▓▓▓▓█▓▓████▓▓▓▓████████▓░         
     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▓▒▓▓▒▒▒▒▓▓▓▒▒▓▒▓▓▓▓▓▓▒▒▒▓▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒░         

SmartHire AI - Intelligent Recruitment & Assessment Platform

A comprehensive, AI-driven recruitment platform featuring a dual-dashboard architecture: one for Recruiters to parse and rank candidates, and one for Individuals to take proctored, interactive AI interviews.

🚀 Use Cases & Core Features

For Recruiters

  • Job Description Management: Create and store multiple job descriptions.
  • Bulk Resume Upload: Drag-and-drop multiple PDF resumes for simultaneous analysis.
  • Candidate Leaderboard: Real-time ranking of candidates based on ATS score, technical fit, and behavioral integrity.
  • Detailed Drill-down: View matching/missing skills and the AI's qualitative assessment for each candidate.

For Individuals (Candidates)

  • AI Interview Suite: Participate in a dynamic, voice-enabled technical interview.
  • Proctored Assessments: Real-time camera monitoring using MediaPipe and YOLOv8 to detect multiple faces, absence of user, or suspicious behavior.
  • Interactive Coding Sandbox: A VS Code-like Monaco editor where candidates write Python/C++ code that is safely evaluated inside a strict Docker sandbox.
  • Assessment Dashboard: View historical interview performance, AI feedback, and overall scores.

🧠 The AI Engine (Multi-Agent System)

The backend utilizes a sophisticated multi-agent system powered locally by Ollama, ensuring privacy and zero API costs.

  1. Agent 1 (Interviewer): Uses qwen2.5-coder:7b to generate contextual, dynamic technical questions based on the user's resume and the Job Description.
  2. Agent 2 (Evaluator): Uses qwen2.5-coder:7b to evaluate the candidate's qualitative responses, communication skills, and behavioral fit.
  3. Agent 3 (Validator): Uses a HuggingFace CrossEncoder and ChromaDB to semantically match the candidate's extracted resume text against JD requirements.
  4. Agent 4 (Assessor): Uses gemma3:4b to generate custom Data Structures & Algorithms (DSA) questions for the coding sandbox.
  5. Agent 5 (Interview Evaluator): Uses qwen2.5-coder:7b to synthesize all interview data into a strictly formatted JSON report detailing strengths, weaknesses, and a final hire recommendation.

🛠 Tech Stack

  • Frontend: React + Vite + TypeScript + TailwindCSS + shadcn/ui
  • Backend: FastAPI (Python) + SQLite + ChromaDB
  • Local AI Inference: Ollama
  • Computer Vision / Proctoring: OpenCV, MediaPipe (Pose/Face), YOLOv8
  • Code Execution: Docker containers (isolated, 5-second timeout)
  • Cloud Hosting: Vercel (Frontend) + Ngrok (Backend Tunnel)

📂 Full Codebase Structure

📦 SmartHire
 ┣ 📂 Frontend/                     # React Frontend Application
 ┃ ┣ 📂 src/
 ┃ ┃ ┣ 📂 components/               # Reusable UI components (shadcn, navbar, etc.)
 ┃ ┃ ┣ 📂 config/                   # API configurations (api.ts -> VITE_API_BASE_URL)
 ┃ ┃ ┣ 📂 pages/
 ┃ ┃ ┃ ┣ 📂 Auth/                   # Firebase Login & Signup
 ┃ ┃ ┃ ┣ 📂 Dashboard/              # Shared Dashboard Layouts
 ┃ ┃ ┃ ┣ 📂 Individual/             # Candidate Profile & Mission Logs
 ┃ ┃ ┃ ┣ 📂 Interview/              # Multistep AI Assessment Suite (Camera, Code, Voice)
 ┃ ┃ ┃ ┣ 📂 Recruiter/              # Job Listings, Bulk Upload, Candidate Leaderboards
 ┃ ┃ ┃ ┗ 📂 Screening/              # Resume parsing UI
 ┃ ┃ ┣ 📜 App.tsx                   # React Router implementation
 ┃ ┃ ┗ 📜 main.tsx
 ┃ ┣ 📜 vercel.json                 # Vercel SPA Routing Configuration
 ┃ ┣ 📜 vite.config.ts
 ┃ ┗ 📜 package.json
 ┃
 ┣ 📂 pbl-test1/                    # Python FastAPI Backend
 ┃ ┣ 📂 data/                       # SQLite DB and ChromaDB vector stores
 ┃ ┣ 📂 monitoring_system/          # AI Proctoring & Computer Vision
 ┃ ┃ ┣ 📂 detection/                # YOLOv8 and MediaPipe landmarker logic
 ┃ ┃ ┣ 📂 logic/                    # Rules engine for detecting cheating
 ┃ ┃ ┗ 📜 app.py                    # Standalone monitoring test script
 ┃ ┣ 📜 fastapi_app.py              # Main FastAPI server and WebSocket routes
 ┃ ┣ 📜 agent_1_interviewer.py      # AI Agent 1 logic
 ┃ ┣ 📜 agent_2_evaluator.py        # AI Agent 2 logic
 ┃ ┣ 📜 agent_3_validator.py        # AI Agent 3 logic
 ┃ ┣ 📜 agent_4_assessor.py         # AI Agent 4 logic
 ┃ ┣ 📜 agent_5_interview_evaluator.py # AI Agent 5 logic
 ┃ ┣ 📜 code_executor.py            # Manages Docker containers for code execution
 ┃ ┣ 📜 Dockerfile.sandbox          # Docker image for secure code evaluation
 ┃ ┣ 📜 database.py                 # SQLAlchemy ORM definitions
 ┃ ┣ 📜 embedder.py                 # Text embedding generation for semantic search
 ┃ ┣ 📜 vector_store.py             # ChromaDB integration for ATS parsing
 ┃ ┗ 📜 requirements.txt            # Python dependencies

🚀 Startup & Installation Commands

1. Ollama AI Setup

Since the AI runs locally on your machine, you must install Ollama and download the required models before starting the backend:

# Pull the required reasoning and coding models
ollama pull qwen2.5-coder:7b
ollama pull gemma3:4b

2. Backend Setup

The backend requires a robust Python environment (Python 3.11+ recommended).

cd pbl-test1

# Create and activate a virtual environment
python -m venv venv
.\venv\Scripts\activate   # (Windows)
# source venv/bin/activate # (Mac/Linux)

# Install dependencies
pip install -r requirements.txt

# Initialize the SQLite database
python -c "from database import init_db; init_db()"

# Build the Docker Code Sandbox (Required for the Coding Interview step)
docker build -t code-sandbox:latest -f Dockerfile.sandbox .

# Start the FastAPI Server
python -m uvicorn fastapi_app:app --host 0.0.0.0 --port 8000 --reload

3. Frontend Setup

cd Frontend

# Install Node dependencies
npm install

# Start the Vite development server
npm run dev

Access the application at: http://localhost:5173


🌐 Production Deployment (Vercel + Ngrok)

Because the backend requires heavy GPU/CPU usage for local AI models, it cannot be deployed to standard serverless platforms like Vercel or Render Free.

The recommended deployment architecture is:

  1. Frontend: Hosted globally on Vercel.
  2. Backend: Hosted on your local machine, exposed to the internet via Ngrok.

Deployment Steps:

  1. Start your backend: uvicorn fastapi_app:app --reload
  2. Start an Ngrok tunnel on your local machine:
    ngrok http 8000
  3. Copy the secure Ngrok URL (e.g., https://xxxx-xxxx.ngrok-free.app).
  4. In your Vercel Dashboard, go to your Frontend project's Environment Variables.
  5. Add VITE_API_BASE_URL and set the value to your Ngrok URL + /api (e.g., https://xxxx-xxxx.ngrok-free.app/api).
  6. Click Redeploy in Vercel.

Your Vercel website is now live and securely routing API requests back to your local AI engine!


📝 License

MIT License

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages