A comprehensive AI-driven platform for conducting mock interviews, technical assessments, and placement preparation with real-time proctoring, automated evaluation, and intelligent feedback.
- π About the Project
- β¨ Key Features
- π₯ Project Preview
- π οΈ Tech Stack
- ποΈ System Architecture
- π Folder Structure
- π How It Works
- βοΈ Installation & Setup
- π³ Docker Setup
- π Environment Variables
- π API Endpoints
- πΎ Database Schema
- πΈ Screenshots
- π Future Enhancements
- π Common Errors & Fixes
- π€ Contributing
- π License
- π€ Author & Contact
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:
- β 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
βοΈ 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
- 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
- π€ 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
- π³ 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
- π€ 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
- π 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
- π§© 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
- π 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
- π₯ 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
- π² 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
- π 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
- π 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
Screenshots placeholders - Replace with actual images
Modern landing page with role selection (HR/Candidate)
AI-powered interview interface with real-time proctoring
Monaco editor with multi-language support and test execution
Resume analysis with match percentage and recommendations
Comprehensive dashboard for managing candidates and roles
| 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 |
| 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 | Use Case |
|---|---|
| π MongoDB Atlas | Primary database (via Pymongo) |
| π² Pinecone | Vector store for RAG |
| πΎ Chroma DB | Local vector storage |
- LLM: Groq's
llama-3.1-8b-instant(primary), OpenRouter'sgpt-oss-120b - Embeddings:
openai/text-embedding-3-small(1536 dimensions) - Vision: OpenCV Haar Cascades for face/eye detection
- π³ Docker: Containerization for code execution
- π¦ Docker Compose: Multi-container setup (optional)
- βοΈ Platform-Ready: Deployable to Render, Railway, Heroku, AWS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β β
β ββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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) β
ββββββββββββββββββββββ
Detailed architecture is documented in backend/CHAT_ARCHITECTURE.md. Summary:
User Query β Validate Relevance β Restructure Query β
Retrieve Docs (Pinecone) β Generate Answer (LLM) β Return
π¦ 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
| 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 |
- π Landing β User visits platform, selects "Candidate" role
- π Login β Enters email and password (stored in MongoDB with bcrypt)
- π Role Selection β Chooses job role from available positions
- π₯ Face Setup β Uploads ID proof, completes face detection setup
- π Round 1: Aptitude β Answers general questions (20-30 MCQs)
- π 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
- π Round 3: HR β Behavioral questions and scenario-based queries
- π― Evaluation β LLM analyzes all answers and generates:
- Overall score out of 50
- Strengths and weaknesses
- Detailed justification
- π Results β Submitted to MongoDB, accessible to HR dashboard
- π Login β HR authenticates via
/hr/login - β Create Role β Adds new job role (e.g., "Frontend Developer")
- π€ Add Candidates β Associates students with the role
- π Monitor β Views real-time results from
/test-results/{roleId} - π Analyze β Reviews aggregated scores across all 3 rounds
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}
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
- 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
git clone https://github.com/Sanjayraj-k/Mock_Interview.git
cd Mock_Interview# 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# In the same backend directory
npm install
# Run Node.js server for code execution
node server.js
# Server will start on http://localhost:3000# Navigate to frontend
cd ../Client/Interview
# Install dependencies
npm install
# Run development server
npm run dev
# Frontend will start on http://localhost:5173- Frontend: http://localhost:5173
- Flask API: http://localhost:5000
- Node.js API: http://localhost:3000
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 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 psTest code execution:
curl -X POST http://localhost:3000/run \
-H "Content-Type: application/json" \
-d '{"code":"print(\"Hello, World!\")", "language":"python", "problemId":"gas-station"}'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 --buildThe 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
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| 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 |
- NEVER commit
.envto version control - The provided
.envcontains exposed keys (should be rotated immediately) - Add
.envto.gitignore(already included) - Use environment variable managers in production (AWS Secrets, Vercel Env, etc.)
| 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} |
| Method | Endpoint | Description | Body |
|---|---|---|---|
| POST | /roles |
Create job role | {title, department, description, hrEmail} |
| GET | /roles?hrEmail={email} |
Get roles by HR | - |
| Method | Endpoint | Description | Body |
|---|---|---|---|
| POST | /students |
Add student | {name, email, role, hrEmail} |
| GET | /students?hrEmail={email} |
Get students by HR | - |
| 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 | - |
| 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
}| 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": "..."
}
]
}| 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"
]
}
}| 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!"
}| 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
}
]
}| 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 | - |
| 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"
}| 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 |
{
"_id": ObjectId,
"email": "hr@company.com",
"password": "$2b$12$hashed_password", // bcrypt
"companyName": "Tech Corp",
"createdAt": ISODate("2024-01-15")
}{
"_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")
}{
"_id": ObjectId,
"title": "Full Stack Developer",
"department": "Engineering",
"description": "Build scalable web applications",
"hrEmail": "hr@company.com",
"createdAt": ISODate("2024-01-15")
}{
"_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")
}{
"_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")
}{
"_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")
}{
"_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")
}{
"_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")
}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:
projectsskillsexperienceeducationachievements
Clean, modern landing page with role-based navigation
Comprehensive view of roles, candidates, and aggregated test results
AI-powered interview with real-time proctoring indicators
Face detection box, eye tracking, and warning system
Monaco editor with syntax highlighting and test execution
Match percentage, skills analysis, and recommendations
Upload PDF/YouTube/Audio and generate custom quizzes
RAG-powered assistant answering portfolio questions
Filterable repository of interview questions
Discussion boards for domain-specific knowledge sharing
AI-generated company profiles from Wikipedia
- π₯ 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
- β‘ 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
Error:
pymongo.errors.ServerSelectionTimeoutError:
No servers are available for the requested read preference
Fix:
- Verify
MONGO_URIin.envis correct - Check network connectivity
- Whitelist your IP in MongoDB Atlas (Network Access)
- Ensure MongoDB service is running (if local)
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)
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
Error:
pinecone.exceptions.NotFoundException: Index 'portfolio-chatbot' not found
Fix:
- Create index in Pinecone dashboard
- Ensure index name matches
INDEX_NAMEin.env - Check API key has correct permissions
- Wait for index initialization (~1-2 minutes)
Error:
Access to fetch at 'http://localhost:5000/chat' from origin 'http://localhost:5173'
has been blocked by CORS policy
Fix:
- Ensure
flask-corsis installed:pip install flask-cors - Verify
CORS(app)is present inapp.py - Check frontend proxy settings in
vite.config.js - Allow specific origins in production
Error:
Error loading face-api.js models
Fix:
- Ensure models are in
public/Face_AI_Models/ - Download from: https://github.com/justadudewhohacks/face-api.js/tree/master/weights
- Check model file names match exactly (case-sensitive)
- Verify public path is correctly configured
Error:
Container execution timed out
Fix:
- Increase
WaitMsBeforeAsyncinrunInDocker()function - Optimize test code to run faster
- Check for infinite loops in user code
- Increase Docker container CPU/memory limits
Error:
ModuleNotFoundError: No module named 'langchain_groq'
Fix:
pip install langchain-groq langchain-pinecone
pip install -r requirements1.txt # Install all dependenciesWe welcome contributions from the community! Here's how you can help:
-
Fork the Repository
git clone https://github.com/Sanjayraj-k/Mock_Interview.git cd Mock_Interview -
Create a Branch
git checkout -b feature/amazing-feature
-
Make Changes
- Follow existing code style
- Add comments for complex logic
- Update documentation if needed
-
Test Your Changes
# Backend python -m pytest # (when tests are added) # Frontend npm run lint npm run build
-
Commit & Push
git add . git commit -m "Add amazing feature" git push origin feature/amazing-feature
-
Open Pull Request
- Go to GitHub repository
- Click "Compare & pull request"
- Describe your changes clearly
- Link related issues
β 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
.envfiles - Make breaking changes without discussion
- Submit untested code
- Ignore linting errors
- Frontend bugs/features: Work in
Client/Interview/src/ - Backend APIs: Update relevant Blueprint files in
backend/ - Documentation: Update
README.mdor create docs in/docs - AI/ML improvements: Modify prompt templates in individual modules
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.
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
If you find MockAI useful, please:
- β Star this repository
- π Report bugs via Issues
- π‘ Suggest features via Discussions
- π΄ Fork and contribute
- π’ Share with your network