Skip to content

PranavMishra17/MockFlow-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MockFlow-AI

MockFlow-AI Banner

AI-Powered Mock Interview Platform β€” Voice, Behavioral, Technical & Coding Tracks

LIVE Python LiveKit OpenAI Deepgram License: SAOUL

Features β€’ Architecture β€’ Installation β€’ Usage


Overview

MockFlow-AI is a full-stack AI interview coach. It conducts realistic, voice-based mock interviews across four formats β€” from general intro calls to live coding challenges with a Monaco editor. Built on LiveKit's real-time infrastructure with a BYOK (Bring Your Own Keys) model.

Launch Video: Watch on YouTube Full Interview Demo: Watch on YouTube

Get your API keys to use the live site:

Configure them at mockflow-ai.onrender.com β†’ Settings.


Features

🎀 Real-Time Voice Pipeline

  • Speech-to-Text: Deepgram Nova-2 for accurate transcription
  • Language Model: OpenAI GPT-4o-mini β€” context-aware, adaptive responses
  • Text-to-Speech: OpenAI TTS with natural voice synthesis
  • Voice Activity Detection: Silero VAD for turn-taking

πŸ—‚ Four Interview Tracks

Track Stages Focus
Intro Call Welcome β†’ Self-intro β†’ Experience β†’ Company Fit β†’ Closing General background, motivation, culture fit
Behavioral Welcome β†’ Intro β†’ Questions (STAR) β†’ Closing Leadership frameworks (Amazon / Google / Meta / Generic), configurable follow-up depth
Technical Voice Welcome β†’ Intro β†’ Experience β†’ Concepts β†’ Closing Topic-based conceptual questions; resume-aware topic suggestions
Technical Coding Welcome β†’ Warm-up β†’ Problem 1 β†’ Problem 2 β†’ Closing Live Monaco editor, LLM-generated problems, 15-min timer, 3-attempt retry, real-time code evaluation

🧠 Intelligent Interview Behavior

  • FSM-driven stages: Explicit state transitions, fallback timers, skip controls
  • Resume + JD aware: Uploads parsed and injected into context
  • Adaptive follow-ups: Agent probes based on candidate answers
  • Speech analytics: Filler word count, WPM, per-turn pace β€” included in feedback

πŸ’» Technical Coding Track

  • Live Monaco code editor (Python, JavaScript, Java, C++, Go)
  • LLM-generated problems tailored to role + experience level + difficulty
  • Per-problem countdown timer with auto-submit
  • Up to 3 attempts per problem; real-time AI evaluation with verbal feedback
  • Copy/paste disabled for integrity

πŸ“Š Detailed Feedback System

  • Scored breakdown: communication, technical depth, relevance, confidence
  • Speech analytics section: filler words, pace (WPM)
  • Track-specific evaluation (coding: approach quality, edge cases, complexity)
  • Exportable feedback per session

πŸ”’ BYOK Architecture

  • Users supply their own OpenAI, Deepgram, and LiveKit keys
  • Keys encrypted at rest in Supabase; never logged
  • Per-session ephemeral worker β€” keys used only during the interview

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Web Browser                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚   Landing   β”‚β†’ β”‚  Form Page   β”‚β†’ β”‚Interview Roomβ”‚       β”‚
β”‚  β”‚    Page     β”‚  β”‚  (4 tracks)  β”‚  β”‚  (LiveKit)   β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                              β”‚ WebRTC
                                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Flask Web Server                         β”‚
β”‚  β€’ HTML templates, OAuth, token generation                  β”‚
β”‚  β€’ Per-session worker spawning (worker_manager.py)          β”‚
β”‚  β€’ /api/coding/submit, /api/feedback, /api/extract-topics   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                              β”‚
                                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   LiveKit Agent Worker                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚  Multi-Track β”‚β†’ β”‚Interview Agentβ”‚β†’ β”‚State Verifierβ”‚      β”‚
β”‚  β”‚     FSM      β”‚  β”‚  (Tools)      β”‚  β”‚  (Fallback)  β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                                              β”‚
β”‚  Voice Pipeline: STT (Deepgram) β†’ LLM (OpenAI) β†’ TTS       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components

File Purpose
app.py Flask server β€” OAuth, token generation, worker spawning, feedback endpoints
agent_worker.py LiveKit agent β€” FSM-driven tools, voice pipeline, coding evaluation
fsm.py Multi-track FSM β€” stage enums, time limits, transition logic for all 4 tracks
prompts.py Stage instructions, feedback prompts, CODE_EVALUATOR, speech analytics
tracks/ Per-track config (stage sequences, time limits, availability)
supabase_client.py Encrypted API key storage, interview persistence, coding submissions
speech_analytics.py Filler word detection, WPM calculation, per-turn pace
document_processor.py Resume parsing (PDF, DOCX, TXT) with cache
audio_cache.py Pre-generated welcome audio per track

Installation

Prerequisites

  • Python 3.9+ (< 3.14)
  • LiveKit Cloud or self-hosted instance
  • OpenAI and Deepgram API keys

Quick Start

git clone https://github.com/PranavMishra17/MockFlow-AI.git
cd MockFlow-AI
pip install -r requirements.txt

Create .env:

LIVEKIT_URL=wss://your-livekit-server.livekit.cloud
LIVEKIT_API_KEY=your_api_key
LIVEKIT_API_SECRET=your_api_secret
OPENAI_API_KEY=sk-your-openai-api-key
DEEPGRAM_API_KEY=your-deepgram-api-key
python app.py
# Visit http://localhost:5000

In BYOK mode, agent workers are spawned automatically per-session. No separate agent process needed.

Production

gunicorn app:app --workers 1 --timeout 120

Use --workers 1 β€” the app manages agent workers via subprocess spawning.


Usage

First-Time Setup

  1. Visit the site β†’ Sign in with Google OAuth
  2. Settings page β†’ Add your API keys:
    • LiveKit URL, API Key, API Secret
    • OpenAI API Key
    • Deepgram API Key
  3. Keys are encrypted and stored β€” never re-entered

Running an Interview

  1. Start Interview β†’ Select a track:
    • Intro Call: General background and fit
    • Behavioral: Choose framework + follow-up depth, optional custom questions
    • Technical Voice: Select topics (or auto-suggest from resume)
    • Technical Coding: Choose language, problem count, difficulty
  2. Optionally upload resume / paste job description
  3. Connect β†’ interview runs in real time
  4. After ending β†’ Generate Feedback for scored report

Tips

  • Use headphones to prevent echo
  • Speak naturally β€” the AI handles conversational pauses
  • For coding: type your solution, click Submit when ready (up to 3 attempts)

Troubleshooting

Issue Fix
"Connection failed" Verify all API keys in Settings; check LiveKit server is reachable
Agent doesn't respond Confirm API keys have credits; check server logs
Stage doesn't transition Wait for fallback timer (~2–5 min per stage); check LOG_LEVEL=DEBUG
Coding problem not showing Click "I'm Ready" button after agent greeting
# Enable debug logs
LOG_LEVEL=DEBUG python app.py

# Health check
curl http://localhost:5000/api/health

Database Migration

Supabase migrations are in supabase-backend/:

# Patch 1 β€” adds track, track_config columns to interviews table
patch1_migration.sql

# Patch 2 β€” adds coding_submissions table with RLS
patch2_migration.sql

Run these in the Supabase SQL editor before deploying.


Contributing

  1. Fork β†’ feature branch β†’ git checkout -b feature/your-feature
  2. Follow coding standards in .claude/rules.md
  3. Test thoroughly β€” especially FSM stage transitions
  4. Submit PR with clear description

License

SAOUL License β€” see LICENSE.


Acknowledgments


Connect

Pranav Mishra

Portfolio LinkedIn Resume YouTube Hugging Face

Built with best practices from industry-leading voice agent architectures

⬆ Back to Top

About

Voice-based mock interview platform featuring intelligent conversation management and time-aware stage transitions

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors