Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 MockAI - AI-Powered Mock Interview Platform

Python Flask React Node.js Docker LangChain License

A comprehensive AI-driven platform for conducting mock interviews, technical assessments, and placement preparation with real-time proctoring, automated evaluation, and intelligent feedback.


πŸ“– Table of Contents


🌟 About the Project

MockAI is a cutting-edge, production-ready platform designed to revolutionize the interview preparation and recruitment process. Built for students, job seekers, and HR professionals, it combines the power of AI/ML, LangChain, LangGraph, and real-time proctoring to deliver:

🎯 Problem It Solves

  • ❌ Traditional interview prep is expensive and time-consuming
  • ❌ Lack of personalized feedback for candidates
  • ❌ Manual resume screening is inefficient
  • ❌ No standardized technical assessment platform
  • ❌ Difficulty in tracking candidate performance

βœ… Solution Provided

βœ”οΈ AI-powered mock interviews with domain-specific questions
βœ”οΈ Automated resume analysis (ATS) with match scoring
βœ”οΈ Real-time face & gaze tracking proctoring
βœ”οΈ Code execution engine with Docker isolation
βœ”οΈ Smart quiz generation from PDFs, YouTube, and audio
βœ”οΈ Portfolio chatbot with RAG (Retrieval-Augmented Generation)
βœ”οΈ HR dashboard for managing roles and candidates

πŸŽ“ Target Users

  • Students & Job Seekers: Practice interviews, improve skills, get AI feedback
  • HR Teams: Conduct structured assessments, track results, manage candidates
  • Educators: Create placement papers, manage question banks

✨ Key Features

🎀 1. AI Mock Interviews (Core Feature)

  • πŸ€– LLM-Powered Question Generation: Dynamic interview questions using Groq's Llama models
  • πŸ“Ή Real-Time Proctoring:
    • Face detection using OpenCV Haar Cascades
    • Eye tracking and gaze direction analysis
    • Long blink detection (>1.5s triggers warning)
    • Alert system with audio notifications
    • Maximum 3 warnings before exam termination
  • 🎯 Multi-Round Assessment:
    • Round 1: Aptitude & General Questions
    • Round 2: Technical Interview (domain-specific)
    • Round 3: HR Round
  • πŸ“Š AI Evaluation: Automated scoring with detailed feedback (STRENGTHS, WEAKNESSES, FINAL MARK out of 50)
  • πŸ’Ύ Session Management: Conversation history with LangChain memory

πŸ’» 2. Code Execution Engine

  • 🐳 Docker-Isolated Execution: Runs user code in secure containers
  • 🌐 Multi-Language Support:
    • C, C++, Java, Python
    • Node.js / JavaScript
  • πŸ§ͺ Test Case Validation:
    • Automatic test case execution
    • Input/Output matching
    • Runtime error detection
  • πŸ“ LeetCode-Style Problems:
    • Gas Station (Hard)
    • Candy Distribution (Hard)
    • Longest Increasing Subsequence (Hard)
  • πŸ”’ Security: Non-root user execution, resource limits, timeout protection

πŸ“„ 3. ATS (Applicant Tracking System)

  • πŸ“€ Resume Upload: Supports PDF, DOC, DOCX, TXT formats
  • πŸ” AI-Powered Analysis:
    • Match percentage calculation
    • Skills gap identification
    • Relevant experience extraction
    • Keyword matching
  • πŸ’‘ Improvement Suggestions: Actionable feedback for resume enhancement
  • ⚑ Groq LLM Integration: Fast resume parsing and analysis

🧠 4. Smart Quiz Generator

  • πŸ“š Multi-Source Input:
    • PDF documents (text extraction with PyPDF2)
    • YouTube videos (transcript extraction)
    • Audio files (speech-to-text conversion)
  • πŸ€– LangGraph Workflow: 4-stage processing pipeline
    • Content retrieval
    • Preprocessing (remove filler words)
    • Question generation
    • MCQ formatting
  • 🎯 Customizable:
    • Difficulty levels (Easy, Medium, Hard)
    • Number of questions
    • Question types (MCQ, True/False, Short Answer)
  • πŸ—„οΈ Vector Store Integration: Uses HuggingFace embeddings + Chroma DB

πŸ’¬ 5. Portfolio Chatbot (RAG-Powered)

  • 🧩 4-Stage Agent System (LangGraph):
    • Stage 0: Query relevance validation
    • Stage 1: Query restructuring for clarity
    • Stage 2: Document retrieval from Pinecone
    • Stage 3: LLM answer generation
  • πŸ” Section-Aware Retrieval: Filters by projects, skills, experience, education, achievements
  • 🎯 Concise Responses: Trained to give exact answers without fluff
  • 🚫 Irrelevant Query Rejection: Politely declines off-topic questions
  • πŸ“Š Architecture Documentation: Full workflow in CHAT_ARCHITECTURE.md

🏒 6. Company Profile Scraper

  • πŸ”Ž Intelligent Search: Uses Groq LLM to resolve company names
  • 🌐 Wikipedia Integration: Extracts structured company data
  • πŸ“ AI Summarization: Generates concise profiles covering:
    • Vision & Mission
    • Founding information
    • Products & Services
    • Notable achievements
    • Financial highlights
    • Headquarters & employee count
  • ⚑ Real-Time Processing: Fast API responses with caching

πŸ—¨οΈ 7. Domain-Specific Forum

  • πŸ‘₯ User Management: Registration, profiles, domain selection
  • πŸ’¬ Discussion Boards: Create, like, reply to discussions
  • ❓ Interview Question Bank:
    • Filter by company, difficulty, round
    • Upload answer PDFs
    • View count tracking
  • πŸ“Ž File Attachments: Support for images, PDFs, documents
  • πŸ”” Connection System: Send/accept connection requests
  • πŸ“Š Analytics Dashboard: Domain-wise statistics

πŸ“‹ 8. Placement Paper Generator

  • 🎲 Question Bank Integration: Curated interview questions
  • 🏒 Company-Specific Papers: Generate based on company/domain
  • πŸ“„ Multiple Formats: Text and PDF questions
  • πŸ” Advanced Filtering: By category, difficulty, company
  • πŸ“ˆ Performance Tracking: View counts and popularity

πŸ‘” 9. HR Dashboard

  • πŸ“Š Role Management: Create and manage job roles
  • πŸ‘¨β€πŸ’Ό Candidate Management: Add students, assign to roles
  • πŸ“ˆ Results Tracking: View all test results by role and student
  • πŸ” Authentication: Secure login with bcrypt password hashing
  • 🎯 Multi-Round Results: Aggregated scores across 3 rounds

πŸŽ“ 10. Student Dashboard

  • πŸ“ Test Interface: Clean UI for taking assessments
  • πŸ“Š Progress Tracking: View past results and performance
  • 🎯 Practice Mode: Access question banks and practice quizzes
  • πŸ’Ό Portfolio Assistant: Chat with AI about developer portfolios
  • 🏒 Company Research: Scrape company profiles for interview prep

πŸŽ₯ Project Preview

Screenshots placeholders - Replace with actual images

Landing Page Modern landing page with role selection (HR/Candidate)

Interview Dashboard AI-powered interview interface with real-time proctoring

Code Editor Monaco editor with multi-language support and test execution

ATS Analysis Resume analysis with match percentage and recommendations

HR Dashboard Comprehensive dashboard for managing candidates and roles


πŸ› οΈ Tech Stack

Frontend

Technology Purpose
βš›οΈ React 19.1.0 Modern UI library
🎨 Tailwind CSS 3.4 Utility-first styling
🎭 Framer Motion 12.x Smooth animations
🧭 React Router 7.x Client-side routing
πŸ“ Monaco Editor Code editor (VS Code engine)
🎬 Lottie React Animation rendering
πŸ“Ή face-api.js Face detection library
πŸ“¦ Axios HTTP client
πŸ”” React Toastify Notifications
⚑ Vite 6.3 Build tool & dev server

Backend

Technology Purpose
🐍 Python 3.9+ Core language
🌢️ Flask 3.0 Web framework
🟒 Node.js 20.x JavaScript runtime
⚑ Express 5.1 Node.js framework
πŸ€– LangChain LLM orchestration
πŸ”„ LangGraph Agent workflow engine
🧠 Groq API Llama 3.1 LLM inference
πŸ” Pinecone Vector database
πŸ“Š HuggingFace Embeddings Text embeddings
🐳 Docker (Dockerode) Code execution isolation
πŸ“„ PyPDF2 / Mammoth Document parsing
πŸŽ₯ YouTube Transcript API Video transcript extraction

Database

Database Use Case
πŸƒ MongoDB Atlas Primary database (via Pymongo)
🌲 Pinecone Vector store for RAG
πŸ’Ύ Chroma DB Local vector storage

AI/ML Models

  • LLM: Groq's llama-3.1-8b-instant (primary), OpenRouter's gpt-oss-120b
  • Embeddings: openai/text-embedding-3-small (1536 dimensions)
  • Vision: OpenCV Haar Cascades for face/eye detection

DevOps & Deployment

  • 🐳 Docker: Containerization for code execution
  • πŸ“¦ Docker Compose: Multi-container setup (optional)
  • ☁️ Platform-Ready: Deployable to Render, Railway, Heroku, AWS

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         CLIENT LAYER                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚  β”‚   React UI   β”‚  β”‚  Monaco      β”‚  β”‚  Face API    β”‚          β”‚
β”‚  β”‚   (Vite)     │──│  Code Editor │──│  (Proctoring)β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ HTTP/REST API
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      BACKEND LAYER (API Gateway)                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ Flask App (app.py) - Main Entry Point                    β”‚   β”‚
β”‚  β”‚ β”œβ”€ CORS Middleware                                       β”‚   β”‚
β”‚  β”‚ β”œβ”€ Blueprint Registration                                β”‚   β”‚
β”‚  β”‚ └─ MongoDB Connection Pool                               β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                   β”‚                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Flask       β”‚  β”‚   Node.js        β”‚  β”‚  AI/ML Layer     β”‚
β”‚ Blueprints  β”‚  β”‚   Microservice   β”‚  β”‚                  β”‚
β”‚             β”‚  β”‚                  β”‚  β”‚                  β”‚
β”‚ β€’ interview β”‚  β”‚ β€’ Code Execution β”‚  β”‚ β€’ LangChain      β”‚
β”‚ β€’ quiz      β”‚  β”‚ β€’ Docker Manager β”‚  β”‚ β€’ LangGraph      β”‚
β”‚ β€’ ats       β”‚  β”‚ β€’ Judge0 API     β”‚  β”‚ β€’ Groq LLM       β”‚
β”‚ β€’ chat      β”‚  β”‚ β€’ Monaco Backend β”‚  β”‚ β€’ Pinecone RAG   β”‚
β”‚ β€’ portfolio β”‚  β”‚                  β”‚  β”‚ β€’ HuggingFace    β”‚
β”‚ β€’ question  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚ β€’ OpenCV Vision  β”‚
β”‚ β€’ company   β”‚                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β€’ domain    β”‚
β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚
β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    DATA PERSISTENCE LAYER                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚  MongoDB     β”‚  β”‚   Pinecone   β”‚  β”‚  File System β”‚         β”‚
β”‚  β”‚  Atlas       β”‚  β”‚  Vector DB   β”‚  β”‚  (Uploads)   β”‚         β”‚
β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚         β”‚
β”‚  β”‚ β€’ Users      β”‚  β”‚ β€’ Portfolio  β”‚  β”‚ β€’ Resumes    β”‚         β”‚
β”‚  β”‚ β€’ Students   β”‚  β”‚   Embeddings β”‚  β”‚ β€’ PDFs       β”‚         β”‚
β”‚  β”‚ β€’ Roles      β”‚  β”‚ β€’ Context    β”‚  β”‚ β€’ Audio      β”‚         β”‚
β”‚  β”‚ β€’ Results    β”‚  β”‚   Chunks     β”‚  β”‚ β€’ Images     β”‚         β”‚
β”‚  β”‚ β€’ Questions  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚  β”‚ β€’ Messages   β”‚                                              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Interview Processing Flow

User Starts Interview
      β”‚
      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Face Detection  │◄──── OpenCV Haar Cascade
β”‚ Initialization  β”‚      (Load models)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Question Gen    │◄──── Groq LLM (Llama 3.1)
β”‚ (Per Round)     β”‚      + Domain-specific prompts
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
    β”‚ For each β”‚
    β”‚ Question β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Real-time Monitoring:   β”‚
    β”‚ β€’ Face in frame?        │◄──── Process video frame
    β”‚ β€’ Eyes detected?        β”‚      every request
    β”‚ β€’ Gaze direction OK?    β”‚
    β”‚ β€’ Long blink check      β”‚
    β”‚ β€’ Warning counter       β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
    [User Answers]
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ LLM Evaluation     │◄──── Conversation history
β”‚ + Scoring          β”‚      + Answer content
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Store Results      │──────► MongoDB
β”‚ (Marks, Feedback)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

LangGraph Agent Architecture (Chat/Quiz)

Detailed architecture is documented in backend/CHAT_ARCHITECTURE.md. Summary:

User Query β†’ Validate Relevance β†’ Restructure Query β†’ 
Retrieve Docs (Pinecone) β†’ Generate Answer (LLM) β†’ Return

πŸ“ Folder Structure

πŸ“¦ mockai/
β”œβ”€β”€ πŸ“‚ Client/
β”‚   └── πŸ“‚ Interview/                  # React Frontend (Vite)
β”‚       β”œβ”€β”€ πŸ“‚ public/
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ Face_AI_Models/     # face-api.js model weights
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ audio/              # Notification sounds
β”‚       β”‚   └── vite.svg
β”‚       β”œβ”€β”€ πŸ“‚ src/
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ Auth/               # Landing & login pages
β”‚       β”‚   β”‚   β”œβ”€β”€ Landingpage.jsx
β”‚       β”‚   β”‚   β”œβ”€β”€ login.jsx          # Student login
β”‚       β”‚   β”‚   └── StudentLandingpage.jsx
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ Dashboard/          # HR & Teacher dashboards
β”‚       β”‚   β”‚   β”œβ”€β”€ Hr.jsx
β”‚       β”‚   β”‚   β”œβ”€β”€ StudentDashboard.jsx
β”‚       β”‚   β”‚   β”œβ”€β”€ TeacherDashboard.jsx
β”‚       β”‚   β”‚   β”œβ”€β”€ login.jsx          # HR login
β”‚       β”‚   β”‚   └── signup.jsx
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ pages/              # Main application pages
β”‚       β”‚   β”‚   β”œβ”€β”€ Interview.jsx      # Core interview interface
β”‚       β”‚   β”‚   β”œβ”€β”€ Coding.jsx         # Code execution page
β”‚       β”‚   β”‚   β”œβ”€β”€ Round1.jsx         # Aptitude test
β”‚       β”‚   β”‚   β”œβ”€β”€ Round2.jsx         # Technical round
β”‚       β”‚   β”‚   β”œβ”€β”€ Ats.jsx            # Resume analysis
β”‚       β”‚   β”‚   β”œβ”€β”€ PracticeQuiz.jsx   # Quiz interface
β”‚       β”‚   β”‚   β”œβ”€β”€ QuestionBank.jsx   # Question repository
β”‚       β”‚   β”‚   β”œβ”€β”€ QuestionForum.jsx  # Discussion forum
β”‚       β”‚   β”‚   β”œβ”€β”€ Domainforum.jsx    # Domain-specific forum
β”‚       β”‚   β”‚   β”œβ”€β”€ Assistant.jsx      # Portfolio chatbot
β”‚       β”‚   β”‚   β”œβ”€β”€ PlacementPaperGenerator.jsx
β”‚       β”‚   β”‚   β”œβ”€β”€ FaceDetection.jsx  # Proctoring setup
β”‚       β”‚   β”‚   β”œβ”€β”€ Protected.jsx      # Route protection
β”‚       β”‚   β”‚   └── UserSelect.jsx     # User type selection
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ student/            # Student-specific features
β”‚       β”‚   β”‚   β”œβ”€β”€ Upload.jsx
β”‚       β”‚   β”‚   └── CompanyFetch.jsx   # Company scraper UI
β”‚       β”‚   β”œβ”€β”€ πŸ“‚ context/
β”‚       β”‚   β”‚   └── AuthContext.jsx    # Global auth state
β”‚       β”‚   β”œβ”€β”€ App.jsx                # Main app component
β”‚       β”‚   β”œβ”€β”€ main.jsx               # React entry point
β”‚       β”‚   └── index.css              # Global styles
β”‚       β”œβ”€β”€ package.json               # Frontend dependencies
β”‚       β”œβ”€β”€ vite.config.js             # Vite configuration
β”‚       β”œβ”€β”€ tailwind.config.js         # Tailwind setup
β”‚       └── index.html                 # HTML entry
β”‚
β”œβ”€β”€ πŸ“‚ backend/                        # Python & Node.js Backend
β”‚   β”œβ”€β”€ πŸ“‚ audio/                      # Uploaded audio files
β”‚   β”œβ”€β”€ πŸ“‚ uploads/                    # Resume/document uploads
β”‚   β”œβ”€β”€ πŸ“‚ temp/                       # Temporary files for Docker
β”‚   β”œβ”€β”€ πŸ“‚ chroma_db/                  # Local vector store
β”‚   β”‚
β”‚   β”œβ”€β”€ 🐍 PYTHON MODULES (Flask)
β”‚   β”œβ”€β”€ app.py                         # Main Flask entry + HR routes
β”‚   β”œβ”€β”€ interview.py                   # Mock interview logic (Blueprint)
β”‚   β”œβ”€β”€ quiz.py                        # Quiz generation (Blueprint)
β”‚   β”œβ”€β”€ ats.py                         # Resume analysis (Blueprint)
β”‚   β”œβ”€β”€ chat.py                        # Portfolio chatbot RAG (Blueprint)
β”‚   β”œβ”€β”€ portfolio.py                   # Alternate chat implementation
β”‚   β”œβ”€β”€ coding.py                      # Code execution wrapper
β”‚   β”œβ”€β”€ questionbank.py                # Question CRUD (Blueprint)
β”‚   β”œβ”€β”€ companyscrap_bp.py             # Company scraper (Blueprint)
β”‚   β”œβ”€β”€ Domainforum.py                 # Forum system (Blueprint)
β”‚   β”œβ”€β”€ practicequiz_bp.py             # Practice quiz routes
β”‚   β”œβ”€β”€ Questionforum.py               # Forum integration
β”‚   β”œβ”€β”€ facetrack.py                   # Face detection logic
β”‚   β”œβ”€β”€ safety.py                      # Content moderation
β”‚   β”œβ”€β”€ linkedin.py                    # LinkedIn integrations
β”‚   β”œβ”€β”€ pdf.py                         # PDF processing
β”‚   β”œβ”€β”€ aiassistant.py                 # AI helper functions
β”‚   β”œβ”€β”€ web2.py                        # Additional web routes
β”‚   β”œβ”€β”€ template.py                    # Prompt templates
β”‚   β”œβ”€β”€ graph.py                       # LangGraph utilities
β”‚   β”‚
β”‚   β”œβ”€β”€ 🟒 NODE.JS MODULES (Express)
β”‚   β”œβ”€β”€ server.js                      # Code execution server (Docker)
β”‚   β”œβ”€β”€ index.js                       # Alternative entry point
β”‚   β”œβ”€β”€ company.js                     # Company data handler
β”‚   β”œβ”€β”€ node.js                        # Node utilities
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“„ CONFIGURATION FILES
β”‚   β”œβ”€β”€ .env                           # API keys & secrets
β”‚   β”œβ”€β”€ requirements.txt               # Minimal Python deps
β”‚   β”œβ”€β”€ requirements1.txt              # Full Python dependencies
β”‚   β”œβ”€β”€ package.json                   # Node.js dependencies
β”‚   β”œβ”€β”€ Dockerfile                     # Docker container config
β”‚   β”œβ”€β”€ .dockerignore
β”‚   β”œβ”€β”€ langgraph.json                 # LangGraph workflow config
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“š DOCUMENTATION
β”‚   β”œβ”€β”€ CHAT_ARCHITECTURE.md           # 4-stage agent system docs
β”‚   β”œβ”€β”€ langraph_workflow.png          # Visual workflow diagram
β”‚   β”‚
β”‚   └── πŸ§ͺ TEST/DATA FILES
β”‚       β”œβ”€β”€ test.py, test1.py
β”‚       β”œβ”€β”€ chatbot_qa_pairs.json      # Training data
β”‚       β”œβ”€β”€ chatbot_training_data.json
β”‚       └── scraper.log
β”‚
β”œβ”€β”€ πŸ“‚ linkedin/                       # LinkedIn integration module
β”œβ”€β”€ πŸ“„ .gitignore
β”œβ”€β”€ πŸ“„ langraph_workflow.png           # Root-level workflow diagram
└── πŸ“„ README.md                       # This file

Key Directories Explained

Directory Purpose
Client/Interview/ React frontend built with Vite + Tailwind
backend/ Python (Flask) + Node.js (Express) hybrid backend
backend/audio/ Uploaded audio files for quiz generation
backend/uploads/ Resumes, PDFs, and user uploads
backend/temp/ Temporary code files for Docker execution
backend/chroma_db/ Local vector database for embeddings
public/Face_AI_Models/ Pre-trained models for face detection

πŸ”„ How It Works

User Journey: Student Taking Mock Interview

  1. πŸš€ Landing β†’ User visits platform, selects "Candidate" role
  2. πŸ” Login β†’ Enters email and password (stored in MongoDB with bcrypt)
  3. πŸ“ Role Selection β†’ Chooses job role from available positions
  4. πŸŽ₯ Face Setup β†’ Uploads ID proof, completes face detection setup
  5. πŸ“Š Round 1: Aptitude β†’ Answers general questions (20-30 MCQs)
  6. πŸ” Round 2: Technical β†’ AI-generated domain-specific questions
    • Groq LLM generates questions based on role
    • User answers are stored with conversation history
    • OpenCV monitors face/eye in real-time
    • Warnings issued for suspicious behavior
  7. πŸ‘” Round 3: HR β†’ Behavioral questions and scenario-based queries
  8. 🎯 Evaluation β†’ LLM analyzes all answers and generates:
    • Overall score out of 50
    • Strengths and weaknesses
    • Detailed justification
  9. πŸ“ˆ Results β†’ Submitted to MongoDB, accessible to HR dashboard

User Journey: HR Creating Assessment

  1. πŸ” Login β†’ HR authenticates via /hr/login
  2. βž• Create Role β†’ Adds new job role (e.g., "Frontend Developer")
  3. πŸ‘€ Add Candidates β†’ Associates students with the role
  4. πŸ“Š Monitor β†’ Views real-time results from /test-results/{roleId}
  5. πŸ“ˆ Analyze β†’ Reviews aggregated scores across all 3 rounds

Code Execution Workflow

User writes code in Monaco Editor
        β”‚
        β–Ό
Frontend sends {code, language, testCases} to /run
        β”‚
        β–Ό
Backend (server.js) receives request
        β”‚
        β”œβ”€ Generates test harness (wraps user code)
        β”œβ”€ Writes to /temp/{uuid}/solution.{ext}
        β”‚
        β–Ό
Docker container spawned
        β”‚
        β”œβ”€ Mounts /temp volume
        β”œβ”€ Compiles (if C/C++/Java)
        β”œβ”€ Executes with stdin from test case
        β”œβ”€ Captures stdout, stderr, exit code
        β”‚
        β–Ό
Output parsed and validated
        β”‚
        β”œβ”€ Compare actual vs expected output
        β”œβ”€ Check runtime errors
        β”œβ”€ Calculate execution time
        β”‚
        β–Ό
Return results {passed, failed, error, output}

Quiz Generation Workflow (LangGraph)

User uploads PDF/YouTube URL/Audio
        β”‚
        β–Ό
Content Extraction
        β”‚
        β”œβ”€ PDF β†’ PyPDF2 text extraction
        β”œβ”€ YouTube β†’ Transcript API
        β”œβ”€ Audio β†’ Speech-to-text (Groq)
        β”‚
        β–Ό
Preprocessing (LLM-based)
        β”‚
        β”œβ”€ Remove filler words
        β”œβ”€ Condense content
        β”œβ”€ Extract key concepts
        β”‚
        β–Ό
Create Vector Store (Chroma DB)
        β”‚
        β”œβ”€ Chunk content (500 chars)
        β”œβ”€ Generate embeddings (HuggingFace)
        β”œβ”€ Store in Chroma
        β”‚
        β–Ό
LangGraph Agent: retrieve_content
        β”‚
        β”œβ”€ Query: "Generate {num} {difficulty} questions"
        β”œβ”€ Retrieve relevant chunks (k=50)
        β”‚
        β–Ό
LangGraph Agent: generate_questions
        β”‚
        β”œβ”€ Prompt: "Create MCQs with distractors"
        β”œβ”€ LLM outputs structured JSON
        β”œβ”€ Parse and validate
        β”‚
        β–Ό
Return quiz to frontend

βš™οΈ Installation & Setup

Prerequisites

  • Python: 3.9 or higher (Download)
  • Node.js: 20.x or higher (Download)
  • MongoDB: Atlas account or local instance (Setup Guide)
  • Docker: For code execution (optional but recommended) (Install)
  • Git: For cloning repository

1️⃣ Clone Repository

git clone https://github.com/Sanjayraj-k/Mock_Interview.git
cd Mock_Interview

2️⃣ Backend Setup (Python + Flask)

# Navigate to backend
cd backend

# Create virtual environment
python -m venv env

# Activate virtual environment
# On Windows:
env\Scripts\activate
# On macOS/Linux:
source env/bin/activate

# Install Python dependencies
pip install -r requirements.txt
pip install -r requirements1.txt

# Create .env file (see Environment Variables section)
# Add your API keys and MongoDB URI

# Run Flask backend
python app.py
# Server will start on http://localhost:5000

3️⃣ Backend Setup (Node.js + Express)

# In the same backend directory
npm install

# Run Node.js server for code execution
node server.js
# Server will start on http://localhost:3000

4️⃣ Frontend Setup (React + Vite)

# Navigate to frontend
cd ../Client/Interview

# Install dependencies
npm install

# Run development server
npm run dev
# Frontend will start on http://localhost:5173

5️⃣ Access Application

6️⃣ Initial Database Setup

The application will auto-initialize MongoDB collections on first run:

  • hrDashboard.users (HR accounts)
  • hrDashboard.students (Candidates)
  • hrDashboard.roles (Job positions)
  • hrDashboard.results (Test scores)
  • hrDashboard.questionbank (Interview questions)
  • hrDashboard.domainforum (Forum data)

🐳 Docker Setup

Option 1: Code Execution Only (Recommended)

Docker is used for secure code execution. If you've installed Docker Desktop, the backend will automatically use it.

Verify Docker is running:

docker --version
docker ps

Test code execution:

curl -X POST http://localhost:3000/run \
  -H "Content-Type: application/json" \
  -d '{"code":"print(\"Hello, World!\")", "language":"python", "problemId":"gas-station"}'

Option 2: Full Application with Docker Compose

Create docker-compose.yml:

version: '3.8'

services:
  backend-flask:
    build:
      context: ./backend
      dockerfile: Dockerfile
    ports:
      - "5000:5000"
    environment:
      - MONGO_URI=${MONGO_URI}
      - GROQ_API_KEY=${GROQ_API_KEY}
      - PINECONE_API_KEY=${PINECONE_API_KEY}
    volumes:
      - ./backend:/app
    command: python app.py

  backend-node:
    build:
      context: ./backend
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    volumes:
      - ./backend:/app
      - /var/run/docker.sock:/var/run/docker.sock  # For Docker-in-Docker
    command: node server.js

  frontend:
    build:
      context: ./Client/Interview
      dockerfile: Dockerfile
    ports:
      - "5173:5173"
    volumes:
      - ./Client/Interview:/app
    command: npm run dev

volumes:
  mongo-data:

Run with Docker Compose:

docker-compose up --build

Security Note

The provided Dockerfile in backend/ is configured for the Node.js code execution server with:

  • Multi-language support (C, C++, Java, Python)
  • Non-root user execution
  • Resource limits
  • Temp directory isolation

πŸ” Environment Variables

Create a .env file in the backend/ directory:

# ===== AI/ML API KEYS =====
GROQ_API_KEY=gsk_YOUR_GROQ_API_KEY_HERE
GEMINI_API_KEY=AIzaSy_YOUR_GEMINI_KEY_HERE
OPENROUTER_API_KEY=sk-or-v1-YOUR_OPENROUTER_KEY
HUGGINGFACEHUB_API_TOKEN=hf_YOUR_HUGGINGFACE_TOKEN
TAVILY_API_KEY=tvly-dev-YOUR_TAVILY_KEY

# ===== VECTOR DATABASE =====
PINECONE_API_KEY=pcsk_YOUR_PINECONE_API_KEY

# ===== DATABASE =====
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/
DB_NAME=hrDashboard

# ===== WHATSAPP INTEGRATION (Optional) =====
PHONENUMBERID=your_phone_number_id
ACCESS_TOKEN=your_whatsapp_access_token
VERIFY_TOKEN=myverytoken

# ===== DEPLOYMENT =====
PORT=5000

How to Get API Keys

Service URL Free Tier
Groq https://console.groq.com βœ… Free (60 req/min)
Pinecone https://www.pinecone.io βœ… 1 index free
MongoDB Atlas https://www.mongodb.com/cloud/atlas βœ… 512MB free
OpenRouter https://openrouter.ai ⚑ Pay-per-use
HuggingFace https://huggingface.co/settings/tokens βœ… Free
Google Gemini https://makersuite.google.com/app/apikey βœ… Free tier

⚠️ Security Warning

  • NEVER commit .env to version control
  • The provided .env contains exposed keys (should be rotated immediately)
  • Add .env to .gitignore (already included)
  • Use environment variable managers in production (AWS Secrets, Vercel Env, etc.)

🌐 API Endpoints

Authentication & User Management

HR Routes (app.py)

Method Endpoint Description Body
POST /hr/signup Register new HR user {email, password, companyName}
POST /hr/login HR authentication {email, password}
POST /candidate/login Student login {email, password}

Role Management

Method Endpoint Description Body
POST /roles Create job role {title, department, description, hrEmail}
GET /roles?hrEmail={email} Get roles by HR -

Student Management

Method Endpoint Description Body
POST /students Add student {name, email, role, hrEmail}
GET /students?hrEmail={email} Get students by HR -

Results

Method Endpoint Description Body
POST /submit-results Submit Round 1 results {studentId, roleId, score, percentage, ...}
POST /submit-round2-results Submit Round 2 {studentId, roleId, score, evaluation, ...}
POST /submit-round3-results Submit Round 3 Same as Round 2
GET /test-results/{roleId} Get all results for role -

Interview System (interview.py Blueprint)

Method Endpoint Description Body
POST /interview/start Start new interview {}
POST /interview/submit Submit answer {question_number, answer}
POST /interview/finish End interview & evaluate {}
POST /interview/process-frame Submit video frame for proctoring {image: base64}
POST /interview/end-exam Terminate exam {}
POST /interview/reset Reset session {}
GET /interview/health Health check -

Proctoring Response Example:

{
  "status": "ok",
  "warnings": 0,
  "message": "All good!",
  "face_detected": true,
  "eyes_detected": true,
  "looking_away": false
}

Quiz Generation (quiz.py Blueprint)

Method Endpoint Description Body
POST /quiz/generate Generate quiz from content {type: "pdf/youtube/audio", content: file/url, difficulty, num_questions}

Request Example:

{
  "type": "youtube",
  "content": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "difficulty": "medium",
  "num_questions": 10
}

Response Example:

{
  "questions": [
    {
      "question": "What is the main topic?",
      "options": ["A", "B", "C", "D"],
      "correct_answer": "A",
      "explanation": "..."
    }
  ]
}

ATS (Resume Analysis) (ats.py Blueprint)

Method Endpoint Description Body
POST /ats/analyze Analyze resume vs JD {resume: file, job_description: string}
GET /ats/health Health check -
GET /ats/test-groq Test Groq connection -

Response Example:

{
  "match_percentage": 78,
  "analysis": {
    "relevant_skills": ["Python", "React", "MongoDB"],
    "missing_skills": ["Docker", "Kubernetes"],
    "relevant_experience": "3 years in full-stack development",
    "suggestions": [
      "Add cloud deployment experience",
      "Highlight leadership skills"
    ]
  }
}

Portfolio Chatbot (chat.py Blueprint)

Method Endpoint Description Body
POST /chat Ask portfolio question {message: string}
GET / Health check -

Example Interaction:

# Request
POST /chat
{
  "message": "How many projects has Sanjay completed?"
}

# Response
{
  "response": "Sanjay K has completed 9 projects, including:\nβ€’ Event Management System (MERN Stack)\nβ€’ AI Mock Interview Platform\nβ€’ Museum Ticket Booking Chatbot"
}

Irrelevant Query:

# Request
{"message": "What is the capital of France?"}

# Response
{
  "response": "I'm here to help with questions about Sanjay K's portfolio. I can answer questions about his projects, skills, education, internships, achievements, and professional background. Please ask something related to his portfolio!"
}

Code Execution (server.js Node.js)

Method Endpoint Description Body
GET /problem/{problemId} Get problem details -
POST /run Run code with test cases {code, language, problemId}
POST /submit Submit final solution {code, language, problemId}
GET /health Health check -

Supported Languages:

  • c, cpp, java, python

Request Example:

{
  "code": "def can_complete_circuit(gas, cost):\n    return 0",
  "language": "python",
  "problemId": "gas-station"
}

Response Example:

{
  "testResults": [
    {
      "testId": 1,
      "passed": false,
      "input": "gas = [1,2,3,4,5], cost = [3,4,5,1,2]",
      "expected": "3",
      "actual": "0",
      "error": null
    }
  ]
}

Question Bank (questionbank.py Blueprint)

Method Endpoint Description Body
GET /questionbank/questions Get all questions -
GET /questionbank/question/{id} Get specific question -
POST /questionbank/question/text Create text question {title, category, company, difficulty, answer}
POST /questionbank/question/pdf Create PDF question {title, category, company, difficulty, file}
PUT /questionbank/question/{id} Update question {title, answer, ...}
DELETE /questionbank/question/{id} Delete question -
POST /questionbank/question/{id}/view Increment view count -

Company Scraper (companyscrap_bp.py Blueprint)

Method Endpoint Description Body
POST /company/profile Get company profile {company_name: string}
GET /company/health Health check -

Response Example:

{
  "company_name": "Google LLC",
  "vision": "To organize the world's information...",
  "mission": "...",
  "founded": "1998",
  "founders": "Larry Page, Sergey Brin",
  "products": ["Google Search", "YouTube", "Android", "Chrome"],
  "achievements": ["...", "..."],
  "financials": "Revenue: $282.8B (2023)",
  "headquarters": "Mountain View, California",
  "employees": "~190,000"
}

Domain Forum (Domainforum.py Blueprint)

Method Endpoint Description
POST /forum/user/register Register user
GET /forum/user/{user_id} Get user profile
POST /forum/discussion Create discussion
GET /forum/discussions/{domain} Get discussions by domain
POST /forum/discussion/{id}/like Like discussion
POST /forum/question Create interview question
GET /forum/questions/{domain} Get questions by domain
POST /forum/message Send direct message
GET /forum/search?q={query}&type={type} Search content

πŸ’Ύ Database Schema

MongoDB Collections

1. Users Collection (hrDashboard.users)

{
  "_id": ObjectId,
  "email": "hr@company.com",
  "password": "$2b$12$hashed_password",  // bcrypt
  "companyName": "Tech Corp",
  "createdAt": ISODate("2024-01-15")
}

2. Students Collection (hrDashboard.students)

{
  "_id": ObjectId,
  "name": "John Doe",
  "email": "john@example.com",
  "password": "$2b$12$hashed",
  "role": "Frontend Developer",
  "hrEmail": "hr@company.com",
  "createdAt": ISODate("2024-01-15")
}

3. Roles Collection (hrDashboard.roles)

{
  "_id": ObjectId,
  "title": "Full Stack Developer",
  "department": "Engineering",
  "description": "Build scalable web applications",
  "hrEmail": "hr@company.com",
  "createdAt": ISODate("2024-01-15")
}

4. Results Collection (hrDashboard.results)

{
  "_id": ObjectId,
  "studentId": ObjectId,
  "roleId": ObjectId,
  "studentName": "John Doe",
  "studentEmail": "john@example.com",
  "roleName": "Full Stack Developer",
  
  // Round 1: Aptitude
  "round1": {
    "score": 18,
    "totalQuestions": 20,
    "percentage": 90,
    "submittedAt": ISODate("2024-01-15T10:30:00Z")
  },
  
  // Round 2: Technical
  "round2": {
    "score": 42,
    "totalMarks": 50,
    "evaluation": "STRENGTHS: Strong problem-solving...",
    "submittedAt": ISODate("2024-01-15T11:00:00Z")
  },
  
  // Round 3: HR
  "round3": {
    "score": 45,
    "totalMarks": 50,
    "evaluation": "Excellent communication...",
    "submittedAt": ISODate("2024-01-15T11:30:00Z")
  },
  
  "createdAt": ISODate("2024-01-15"),
  "updatedAt": ISODate("2024-01-15")
}

5. Question Bank (hrDashboard.questionbank)

{
  "_id": ObjectId,
  "title": "Explain the difference between let and var",
  "category": "Technical",
  "company": "Google",
  "difficulty": "Medium",
  "type": "text",  // or "pdf"
  "answer": "let is block-scoped...",
  "pdfUrl": null,
  "pdfName": null,
  "views": 42,
  "createdAt": ISODate("2024-01-10"),
  "lastUpdated": ISODate("2024-01-10")
}

6. Domain Forum Users (hrDashboard.forumUsers)

{
  "_id": ObjectId,
  "name": "Alice Smith",
  "email": "alice@example.com",
  "password": "$2b$12$hashed",
  "bio": "Passionate about web development",
  "domain": "Web Developer",
  "skills": ["React", "Node.js", "MongoDB"],
  "location": "San Francisco, CA",
  "profilePicture": "profiles/alice_123.jpg",
  "createdAt": ISODate("2024-01-12")
}

7. Forum Discussions (hrDashboard.discussions)

{
  "_id": ObjectId,
  "userId": ObjectId,
  "userName": "Alice Smith",
  "domain": "Web Developer",
  "title": "Best practices for React Hooks",
  "content": "What are your top tips...",
  "attachments": ["uploads/diagram.png"],
  "likes": [ObjectId, ObjectId],  // Array of user IDs
  "likeCount": 2,
  "replyCount": 5,
  "createdAt": ISODate("2024-01-13"),
  "updatedAt": ISODate("2024-01-14")
}

8. Interview Questions (Forum) (hrDashboard.forumQuestions)

{
  "_id": ObjectId,
  "userId": ObjectId,
  "userName": "Bob Johnson",
  "domain": "Data Science",
  "company": "Amazon",
  "interviewRound": "Technical Round 2",
  "difficulty": "Hard",
  "question": "Explain the bias-variance tradeoff",
  "options": ["A", "B", "C", "D"],  // For MCQs
  "correctAnswer": "B",
  "answerPdfUrl": "uploads/answer_456.pdf",
  "likes": [ObjectId],
  "likeCount": 1,
  "views": 23,
  "createdAt": ISODate("2024-01-14")
}

Pinecone Vector Store

Index Name: portfolio-chatbot
Dimensions: 1536 (OpenAI text-embedding-3-small)
Metric: Cosine similarity

Document Structure:

{
  "id": "proj_001",
  "values": [0.123, -0.456, ...],  // 1536-dim embedding
  "metadata": {
    "section": "projects",
    "content": "Event Management System: Built with MERN stack...",
    "title": "Event Management System"
  }
}

Sections:

  • projects
  • skills
  • experience
  • education
  • achievements

πŸ“Έ Screenshots

Landing Page

Landing Page Clean, modern landing page with role-based navigation


HR Dashboard

HR Dashboard Comprehensive view of roles, candidates, and aggregated test results


Interview Interface

Interview Screen AI-powered interview with real-time proctoring indicators


Proctoring in Action

Proctoring Face detection box, eye tracking, and warning system


Code Editor

Code Editor Monaco editor with syntax highlighting and test execution


ATS Resume Analysis

ATS Result Match percentage, skills analysis, and recommendations


Quiz Generator

Quiz Generator Upload PDF/YouTube/Audio and generate custom quizzes


Portfolio Chatbot

Chatbot RAG-powered assistant answering portfolio questions


Question Bank

Question Bank Filterable repository of interview questions


Domain Forum

Forum Discussion boards for domain-specific knowledge sharing


Company Scraper

Company Profile AI-generated company profiles from Wikipedia


πŸš€ Future Enhancements

Planned Features

  • πŸŽ₯ Video Interview Recording: Save interview sessions for review
  • πŸ“Š Advanced Analytics Dashboard: Visual charts for performance trends
  • 🌍 Multi-Language Support: Internationalization (i18n)
  • πŸ“± Mobile App: React Native version for iOS/Android
  • πŸ”” Real-Time Notifications: WebSocket integration for instant alerts
  • πŸŽ“ Learning Paths: Personalized study plans based on weaknesses
  • 🀝 Peer Mock Interviews: Connect two candidates for practice
  • 🎯 Gamification: Badges, leaderboards, and achievements
  • πŸ“§ Email Reports: Automated result emails to candidates
  • πŸ”— LinkedIn Integration: Auto-import candidate profiles
  • πŸ—£οΈ Voice Assistant: Speech-to-text answer input
  • πŸ§ͺ A/B Testing: Experiment with different question formats
  • πŸ“š Content Library: Pre-built courses and interview prep materials
  • πŸ” SSO Integration: Google/GitHub OAuth login
  • πŸ’³ Payment Gateway: Subscription plans for premium features

Technical Improvements

  • ⚑ Redis Caching: Speed up API responses
  • πŸ§ͺ Unit Tests: Jest (frontend) + Pytest (backend)
  • πŸš€ CI/CD Pipeline: GitHub Actions for automated deployment
  • πŸ“Š Logging & Monitoring: Winston/Sentry integration
  • πŸ”’ Rate Limiting: Prevent API abuse
  • πŸ“– API Documentation: Swagger/OpenAPI spec
  • 🐳 Kubernetes Deployment: Scalable container orchestration
  • πŸ”„ GraphQL API: Alternative to REST for complex queries
  • 🧩 Microservices: Split into smaller, independent services

πŸ› Common Errors & Fixes

1. MongoDB Connection Error

Error:

pymongo.errors.ServerSelectionTimeoutError: 
No servers are available for the requested read preference

Fix:

  • Verify MONGO_URI in .env is correct
  • Check network connectivity
  • Whitelist your IP in MongoDB Atlas (Network Access)
  • Ensure MongoDB service is running (if local)

2. Groq API Rate Limit

Error:

groq.RateLimitError: Rate limit exceeded (60 requests/min)

Fix:

  • Implement exponential backoff retry logic
  • Cache LLM responses for repeated queries
  • Upgrade to paid tier for higher limits
  • Switch to alternative model (e.g., OpenRouter)

3. Docker Not Found

Error:

Error: connect ENOENT //./pipe/docker_engine

Fix:

  • Install Docker Desktop and start the engine
  • On Windows: Ensure WSL2 backend is enabled
  • Verify Docker is running: docker ps
  • Restart Docker service

4. Pinecone Index Not Found

Error:

pinecone.exceptions.NotFoundException: Index 'portfolio-chatbot' not found

Fix:

  • Create index in Pinecone dashboard
  • Ensure index name matches INDEX_NAME in .env
  • Check API key has correct permissions
  • Wait for index initialization (~1-2 minutes)

5. CORS Errors in Frontend

Error:

Access to fetch at 'http://localhost:5000/chat' from origin 'http://localhost:5173' 
has been blocked by CORS policy

Fix:

  • Ensure flask-cors is installed: pip install flask-cors
  • Verify CORS(app) is present in app.py
  • Check frontend proxy settings in vite.config.js
  • Allow specific origins in production

6. Face Detection Models Not Loading

Error:

Error loading face-api.js models

Fix:


7. Code Execution Timeout

Error:

Container execution timed out

Fix:

  • Increase WaitMsBeforeAsync in runInDocker() function
  • Optimize test code to run faster
  • Check for infinite loops in user code
  • Increase Docker container CPU/memory limits

8. Module Not Found Errors

Error:

ModuleNotFoundError: No module named 'langchain_groq'

Fix:

pip install langchain-groq langchain-pinecone
pip install -r requirements1.txt  # Install all dependencies

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

How to Contribute

  1. Fork the Repository

    git clone https://github.com/Sanjayraj-k/Mock_Interview.git
    cd Mock_Interview
  2. Create a Branch

    git checkout -b feature/amazing-feature
  3. Make Changes

    • Follow existing code style
    • Add comments for complex logic
    • Update documentation if needed
  4. Test Your Changes

    # Backend
    python -m pytest  # (when tests are added)
    
    # Frontend
    npm run lint
    npm run build
  5. Commit & Push

    git add .
    git commit -m "Add amazing feature"
    git push origin feature/amazing-feature
  6. Open Pull Request

    • Go to GitHub repository
    • Click "Compare & pull request"
    • Describe your changes clearly
    • Link related issues

Contribution Guidelines

βœ… Do:

  • Write clear, descriptive commit messages
  • Test thoroughly before submitting
  • Update README for new features
  • Follow existing code patterns
  • Ask questions if unclear

❌ Don't:

  • Commit API keys or .env files
  • Make breaking changes without discussion
  • Submit untested code
  • Ignore linting errors

Project Structure for Contributors

  • Frontend bugs/features: Work in Client/Interview/src/
  • Backend APIs: Update relevant Blueprint files in backend/
  • Documentation: Update README.md or create docs in /docs
  • AI/ML improvements: Modify prompt templates in individual modules

πŸ“„ License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2026 Sanjay K & Shimal 

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘¨β€πŸ’» Meet the Team

πŸš€ Sanjay K

GitHub LinkedIn


πŸ’‘ Shimal Akmal

GitHub LinkedIn


πŸ™ Acknowledgments

Special thanks to:

  • Groq for lightning-fast LLM inference
  • LangChain team for the amazing framework
  • Pinecone for vector database infrastructure
  • Face-API.js for browser-based face detection
  • Monaco Editor for the VS Code-like experience
  • OpenCV for computer vision capabilities
  • MongoDB for reliable data storage
  • Vite for blazing-fast development builds

⭐ Support the Project

If you find MockAI useful, please:

  • ⭐ Star this repository
  • πŸ› Report bugs via Issues
  • πŸ’‘ Suggest features via Discussions
  • 🍴 Fork and contribute
  • πŸ“’ Share with your network

Built by Sanjay & Shimal

GitHub followers GitHub stars

⬆ Back to Top

Releases

Packages

Contributors

Languages