Skip to content

nammayatri/ai-interview-platform

 
 

Repository files navigation


InterviewAI

Typing SVG

Quick Start  ·  Features  ·  How It Works  ·  Architecture  ·  API Reference


How It Works — Animated

InterviewAI Flow


Features at a Glance

Voice Interview Engine

  • AI conducts natural voice conversations
  • Deepgram Nova-2 STT (real-time, Indian English)
  • Deepgram Aura TTS (primary) + Edge TTS (free fallback)
  • Domain-aware: Tech, HR, Sales, Ops, CX, PM, Design, Data, Finance
  • Level-calibrated: Intern to Director
  • Time-aware pacing (adapts to interview duration)
  • Custom question banks
  • Resume-based follow-ups

Proctoring & Integrity

  • Face detection (Chrome API + canvas fallback)
  • Eye tracking (gaze direction)
  • Window/app switch detection (3 methods: blur + visibility + focus poll)
  • Phone/device detection (bright object analysis)
  • Mandatory screen sharing + fullscreen enforcement
  • Periodic photo capture (every 60s)
  • Configurable strike system (default 10, server-side count)
  • Copy/paste blocking

Scoring & Analytics

  • Auto-scorecard when interview ends
  • 5 dimensions (Technical, Communication, Problem Solving, Domain, Culture)
  • Evidence-based (exact candidate quotes)
  • Level-calibrated scoring (Intern to Director)
  • STT-aware evaluation (ignores transcription errors)
  • Hire / No Hire recommendation
  • Proctoring report in assessment
  • Candidate comparison (radar chart)
  • DB-backed dedup (no double scoring)
  • Rescore capability

Platform

  • Multi-tenant auth (orgs, roles)
  • Professional dashboard with filters
  • Pagination with ellipsis
  • Question bank management
  • Coding interview mode (Monaco editor)
  • Email notifications
  • Interview recording
  • Resume on reload (state persists)
  • Mobile responsive
  • Docker ready

Quick Start

One-command setup

# Clone
git clone https://github.com/vijaygupta18/ai-interview-platform.git
cd ai-interview-platform

# Install
npm install

# Setup database
psql -U postgres -c "CREATE DATABASE ai_interview_platform;"
psql -U postgres -d ai_interview_platform -f migrations/001_schema.sql

# Configure (edit with your API keys)
cp .env.example .env.local

# Start
npm run dev

Open http://localhost:3000 and login with admin@interview.ai / admin123

Docker

docker build -t interview-ai .
docker run -p 3000:3000 --env-file .env.local interview-ai

Environment Variables

Variable Required Description
DATABASE_URL Yes PostgreSQL connection string
NEXTAUTH_SECRET Yes Random secret for JWT signing
NEXTAUTH_URL Yes App URL (http://localhost:3000)
AI_BASE_URL Yes OpenAI-compatible API base URL
AI_API_KEY Yes API key for AI model
AI_MODEL No Model name (default: gpt-4o)
DEEPGRAM_API_KEY Yes Deepgram API key for STT/TTS
TTS_PROVIDER No deepgram (default) or edge (free)
EDGE_TTS_VOICE No Voice ID (default: en-IN-NeerjaNeural)
EDGE_TTS_RATE No Speed (default: +10%)
SMTP_HOST No Email SMTP host
SMTP_PORT No Email SMTP port
SMTP_USER No Email username
SMTP_PASS No Email password

Supported AI Providers

Works with any OpenAI-compatible API:

Provider AI_BASE_URL AI_MODEL
OpenAI https://api.openai.com gpt-4o, gpt-4o-mini
Anthropic (via proxy) Your proxy URL claude-3-5-sonnet
Groq https://api.groq.com/openai llama-3.1-70b
Together AI https://api.together.xyz meta-llama/Llama-3-70b
Local (Ollama) http://localhost:11434 llama3
Any OpenAI-compatible Your endpoint Your model

Pages

Route Who Description
/ Interviewer Dashboard — interviews, filters, pagination, scoring
/new Interviewer Create interview — resume, questions, context
/questions Interviewer Question bank management
/compare Interviewer Side-by-side candidate comparison
/dashboard/[id] Interviewer Detail — transcript, scores, photos, proctoring
/review/[id] Interviewer Scorecard with score rings
/login Public Sign in
/register Public Create account + org
/interview/[id] Candidate Live interview room (dark theme)
/completed/[id] Candidate Thank you page

API Reference

Interview Lifecycle
Method Route Auth Description
POST /api/create-interview Session Create interview (FormData)
GET /api/interview/[id] Session/Token Get interview details
POST /api/interview/[id]/start Token Mark started
POST /api/interview/[id]/end Token End + auto-score
GET /api/interviews Session List all (org-scoped)
AI & Speech
Method Route Description
POST /api/ai-speak Combined AI response + TTS audio
POST /api/ai-response AI response text only
POST /api/tts Text-to-speech
GET /api/deepgram-token Temporary scoped STT token
Scoring & Proctoring
Method Route Description
POST /api/scorecard Generate/regenerate scorecard
GET /api/scoring-status/[id] Check generation status
POST /api/proctor-event Log event + photo
Content & Auth
Method Route Description
GET/POST /api/questions Question bank CRUD
GET/PUT/DELETE /api/questions/[id] Single question bank
POST /api/upload-recording Upload audio
GET /api/recording/[id] Stream recording
POST /api/auth/register Create account
GET /api/health Health check

Database

8 tables — full schema in migrations/001_schema.sql:

organizations ─────── users
       │                 │
       │                 │ (created_by)
       │                 │
       └──── interviews ─┤
              │          │
              │          ├── transcript_entries
              │          ├── proctoring_events (+ photos)
              │          └── interview_rounds
              │
              └── question_banks

webhooks (org-scoped event notifications)

TTS Voice Configuration

Provider Setting Voice Cost
Deepgram Aura TTS_PROVIDER=deepgram aura-angus-en (Indian male) $200 free credits
Edge TTS TTS_PROVIDER=edge en-IN-NeerjaNeural (Indian female) Free forever

Indian voices available with Edge TTS:

  • en-IN-NeerjaNeural — Professional female
  • en-IN-NeerjaExpressiveNeural — Animated female
  • en-IN-PrabhatNeural — Professional male
  • hi-IN-SwaraNeural — Hindi accent female

Security

Protection Implementation
SQL Injection Parameterized queries ($1, $2) everywhere
Auth NextAuth JWT + token validation on all endpoints
Password bcrypt (cost 12) + min 8 chars server-side
API Keys Temporary scoped tokens, no main key leak
File Upload 10MB limit + MIME type validation
Path Traversal UUID regex validation on file paths
XSS HTML-escaped email templates
Command Injection execFileSync with array args (no shell)
Rate Limiting Per-IP limits on critical endpoints
Scoring Dedup DB-backed atomic lock (survives restart)
Tenant Isolation Org-scoped queries on all data

License

MIT


Footer

About

AI-powered voice & video interview platform with real-time proctoring, scoring, and candidate management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.3%
  • JavaScript 2.0%
  • CSS 1.4%
  • Dockerfile 0.3%