Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI-Powered Real-Time Mock Interview Coach

An end-to-end, multi-tier automated web platform designed to simulate realistic, adaptive technical interviews. The system captures live video and audio streams to perform real-time facial expression analysis, speech-to-text transcription, and natural language evaluation, providing detailed behavioral metrics and technical scoring breakdown graphs upon completion.


πŸ—οΈ Architectural Topology

The software ecosystem operates on a decoupled, three-tier architecture ensuring clean isolation of concerns:

              +-----------------------------------+
              |        Next.js Front-End          |  (Port 3000)
              |    React 19 / Tailwind CSS v4     |
              +-----------------+-----------------+
                                |
                REST / Audio    |   JSON Web Tokens
                Video Blobs     |   (Auth Handshake)
                                v
              +-----------------------------------+
              |       Node.js Express Server      |  (Port 5000)
              |     Authentication & Database     |
              +-----------------+-----------------+
                                |
                Internal REST   |   Upstream Payload
                Proxy Handlers  |   Forwarding
                                v
              +-----------------------------------+
              |          FastAPI Backend          |  (Port 8000)
              |   PyTorch / OpenCV ML Inference   |
              +-----------------------------------+
  1. Presentation Layer (/client) Built on Next.js 16 and React 19, managing high-frequency webcam visual loops (react-webcam) and recording audio tracks (react-media-recorder). Analytical trends are mapped with Recharts.

  2. Orchestration Layer (/server) A reliable Express gateway driving structural storage tasks via Mongoose, validating state transitions, issuing JWT profiles, and managing multipart data pipelines via multer.

  3. Machine Learning Layer (/backend) An asynchronous Python execution matrix fueled by FastAPI. It controls intensive CPU/GPU pipelines:

    • Text transcription (faster-whisper)
    • Text processing embeddings (sentence-transformers)
    • Visual computing (OpenCV)
    • Automated text feedback evaluation (language-tool-python)

πŸ“‚ Project Structure Directory Matrix

β”œβ”€β”€ backend/                       # Python Asynchronous ML Pipeline
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ knowledge_base/        # Curated technical prompt bases
β”‚   β”‚   β”œβ”€β”€ models/                # Pydantic schema validators
β”‚   β”‚   β”œβ”€β”€ modules/               # Core inferencing engines
β”‚   β”‚   β”‚   β”œβ”€β”€ adaptive/
β”‚   β”‚   β”‚   β”œβ”€β”€ evaluator/
β”‚   β”‚   β”‚   β”œβ”€β”€ face_analysis/
β”‚   β”‚   β”‚   β”œβ”€β”€ feedback/
β”‚   β”‚   β”‚   β”œβ”€β”€ question_gen/
β”‚   β”‚   β”‚   └── speech/
β”‚   β”‚   β”œβ”€β”€ routes/                # FastAPI routing paths
β”‚   β”‚   └── main.py                # Python startup hub
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ server/                        # Node.js Express Session Tier
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── index.js
β”‚   └── package.json
β”‚
└── client/                        # Next.js Presentation App
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ app/
    β”‚   β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ context/
    β”‚   β”œβ”€β”€ hooks/
    β”‚   └── utils/
    β”œβ”€β”€ tailwind.config.js
    └── package.json

⚑ Step-By-Step System Deployment

Prerequisites

Ensure your environment contains:

  • Node.js: v18.x or above
  • Python: v3.10.x or higher
  • MongoDB: Local or cloud Atlas instance

Step 1: Initialize the Machine Learning Layer (/backend)

Navigate to backend

cd backend

Create virtual environment

python -m venv venv
source venv/bin/activate

Windows:

venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Download SpaCy model

python -m spacy download en_core_web_sm

Start FastAPI server

uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload

Step 2: Initialize the Orchestration Gateway (/server)

Navigate to server

cd ../server

Install dependencies

npm install

Create .env

PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/interview_coach
JWT_SECRET=production_ready_cryptographic_randomized_hex_string
FASTAPI_URL=http://127.0.0.1:8000

Start server

npm run dev

Step 3: Initialize the Frontend Application (/client)

Navigate to client

cd ../client

Install dependencies

npm install

Create .env.local

NEXT_PUBLIC_API_URL=http://127.0.0.1:5000

Start frontend

npm run dev

Open:

http://localhost:3000

πŸ”’ Environment Variables

Express Gateway (/server/.env)

Variable Purpose Example
PORT Node server port 5000
MONGO_URI MongoDB connection string mongodb://127.0.0.1:27017/db
JWT_SECRET JWT signing key Secure random value
FASTAPI_URL ML backend endpoint http://127.0.0.1:8000

Next.js Client (/client/.env.local)

Variable Purpose Example
NEXT_PUBLIC_API_URL Express backend URL http://127.0.0.1:5000

πŸ“ˆ REST API Endpoint Registry

Authentication Routes

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Authenticate user

Session Control Routes

Method Endpoint Description
POST /api/session/start Start interview session
POST /api/questions/next Generate next question
POST /api/evaluate/answer Evaluate response
GET /api/report/:sessionId Fetch interview report

Python Backend Microservices

Method Endpoint Description
POST /face/analyze Facial expression analysis
POST /speech/transcribe Audio transcription
POST /resume/extract Resume parsing

πŸ› οΈ Troubleshooting

Camera / Microphone Access Issues

Ensure you are running on:

http://localhost

Modern browsers block media permissions on insecure origins.


MongoDB Connection Errors

Verify:

MongoDB Connected...

appears in the Node.js console logs.


PyTorch Performance Issues

The FastAPI backend automatically falls back to CPU inference if CUDA-enabled GPU drivers are unavailable.


πŸš€ Core Technologies

Frontend

  • Next.js 16
  • React 19
  • Tailwind CSS v4
  • Recharts
  • Axios

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • Multer

AI / ML

  • FastAPI
  • PyTorch
  • OpenCV
  • Faster-Whisper
  • Sentence Transformers
  • SpaCy

πŸ“œ License

This project is intended for educational, research, and interview-preparation purposes.


πŸ‘¨β€πŸ’» Author

Built as a scalable AI-assisted technical interview simulation platform using modern full-stack engineering and real-time machine learning inference pipelines.

About

An AI-powered technical interview platform that analyzes video, speech, and responses in real time to generate behavioral insights and performance scores.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages