Spidercraft01/prepai-advanced-interview-platform
PrepAI โ AI Interview Coach
<img width="916" height="922" alt="image" src="https://github.com/user-attachments/assets/dd3647f9-66f2-4961-932e-031a4f63f0cd" />
Master technical interviews with confidence. Real-time AI feedback | Daily Coding Challenges | GitHub Integration | High-Quality Neural Voice
๐ About The Project
Problem Specialization Statement
PrepAI v2 specializes in adaptive AI-driven interview coaching because generic chatbots cannot track performance across a session, adapt difficulty in real-time, or produce a quantified score. PrepAI v2 closes this gap with a full agentic loop โ evaluate, decide, follow-up, adapt โ making it a purpose-built agent rather than a prompt-wrapped chatbot. As someone actively interviewing for AI/ML SDE roles, I built this to solve a problem I face personally, which is why every design decision reflects real user need.
PrepAI is a cutting-edge interview preparation platform designed to bridge the gap between candidate potential and interview performance.
What it does:
- Simulates Reality: Conducts voice-based technical interviews using advanced AI Personas
- Daily Quiz: AI-generated topic-based coding challenges with interactive execution
- Analyzes Identity: Parses your resume locally and scans your GitHub profile to tailor questions
- Provides Insights: Real-time, actionable feedback on your answer quality and communication style
Built with a developer-first mindset, featuring a high-contrast dark theme, monospaced typography, and a privacy-first local architecture.
Documentation
See the `docs/` folder: architecture, interview engine, scoring, prompts, domain packs, recommendations, quiz, testing, deployment, Hugging Face Spaces, environment, launch checklist, and growth/user-testing playbooks.
๐ Key Features
- ๐ค Open-Source AI: Powered by Groq (Llama 3.3) for intelligent, fast, and free AI interactions
- ๐ฃ๏ธ High-Quality Neural Voice: Uses Piper TTS (WASM) for local, privacy-first speech synthesis
- ๐ Privacy-First: Resume parsing and voice generation happen locally or via secure open-source APIs
- ๐งฉ Daily Quiz: Interactive coding challenges with browser-based execution and interview questions
- ๐ GitHub Integration: Analyzes your repositories directly in the sidebar
- ๐ Developer UI/UX: High-contrast dark theme with neon accents and terminal aesthetics
- ๐ Detailed Analytics: Visualizes your skill growth with Radar charts and session tracking
๐ ๏ธ Getting Started
Prerequisites
- Node.js (v18 or higher)
- Python (3.11 or higher)
- Docker + Docker Compose (recommended)
- Git
Environment Variables
Copy .env.example to .env and fill in your keys:
cp .env.example .envโ ๏ธ Security: Never commit.envwith real values. The Groq API key is loaded server-side only viapython-dotenv. The frontend bundle contains no API keys.
Option A: Docker (Recommended)
Unified production image (frontend + FastAPI + Redis behind nginx on port 7860 โ same layout as Hugging Face Spaces):
cp .env.example .env # add GROQ_API_KEY
docker compose up --buildOpen http://localhost:7860. Health: http://localhost:7860/health.
Split stack (API on 8000 + Redis, for local debugging):
docker compose --profile split up --build backend redisThen run the Vite frontend with VITE_API_URL=http://localhost:8000.
Option B: Manual Setup
Backend:
cd backend
python -m venv venv
# Windows: venv\Scripts\activate
# macOS/Linux: source venv/bin/activate
pip install -r requirements.txt
cp ../.env.example ../.env
# Edit ../.env with your API keys
uvicorn main:app --reload --port 8000Frontend (separate terminal):
# From project root
npm install
npm run devOpen http://localhost:5173 in your browser.
๐ Performance Metrics & Scoring Formula
PrepAI calculates a 1-to-10,000 integer score using a weighted five-axis formula:
Score = (accuracy ร 0.35 + depth ร 0.25 + adaptability ร 0.20 + speed ร 0.10 + confidence ร 0.10) / 100 ร 10,000The result is clamped to [1, 10000] and returned as an integer.
๐ Benchmark Comparison: PrepAI v2 vs. Generic AI Chatbot
Five identical tasks were run on both PrepAI v2 and a general-purpose AI assistant (such as Cursor's Claude), with outputs compared side by side to demonstrate where a specialized agent outperforms a general model.
Conclusion
Generic chatbots operate strictly as text-in/text-out systems. PrepAI v2 functions as a true agentic loop. By removing the decision-making from the LLM and anchoring it in deterministic Python logic, PrepAI v2 reliably scores, adapts, and tracks candidate performance in ways a prompt-wrapped chatbot cannot achieve.
๐ก Usage Examples
API Examples
Start a session:
curl -X POST http://localhost:8000/session/start \
-H "Content-Type: application/json" \
-d '{"role": "Senior Software Engineer", "session_id": "test-001"}'Evaluate an answer (with audio):
curl -X POST http://localhost:8000/session/evaluate \
-F "session_id=test-001" \
-F "question_text=Explain the difference between TCP and UDP" \
-F "latency_seconds=22.5" \
-F "filler_ratio=0.05" \
-F "audio_file=@recording.webm"Evaluate an answer (text only):
curl -X POST http://localhost:8000/session/evaluate \
-F "session_id=test-001" \
-F "question_text=Explain the difference between TCP and UDP" \
-F "text_answer=TCP is connection-oriented and guarantees delivery..."Workflow
- Start a session by providing your target role โ the agent generates the first question.
- Speak or type your answer โ the agent evaluates it and decides: advance (score โฅ 80), probe deeper (50โ79), or give a hint and retry (< 50).
- Receive your report โ after all questions, download a PDF with your 1-to-10,000 score, per-axis breakdowns, and recommended study areas.
๐ Project Structure
PrepAI/
โโโ backend/ # FastAPI backend (agent loop, evaluator, memory)
โ โโโ main.py # Routes + agent decision logic
โ โโโ models.py # Pydantic models for all request/response schemas
โ โโโ services/ # Evaluator, follow-up, planner, report, transcriber
โโโ components/ # React components (Sidebar, QuizLab, etc.)
โโโ pages/ # Main pages (Dashboard, Quiz, InterviewRoom, etc.)
โโโ hooks/ # Custom React hooks (useInterview, etc.)
โโโ services/ # Frontend API proxy services (groq, piper, github)
โโโ types.ts # TypeScript type definitions
โโโ index.css # Global styles (Developer theme)
โโโ .env.example # Environment variable template
โโโ docker-compose.yml๐ Security Notes
- No API keys in the frontend bundle. All LLM calls (Groq) route through the FastAPI backend. The
GROQ_API_KEYis loaded server-side viapython-dotenvand never exposed to the browser. - `.env` is gitignored. The repository ships
.env.examplewith placeholder values only. - Session data expires. Redis keys are set with a 1-hour TTL via
setex. - Audio is processed in-memory. Voice recordings are transcribed via the HuggingFace Whisper API without being written to persistent disk.
๐ค Contributing
Contributions are welcome! Please open an issue or submit a pull request.
๐ License
This project is licensed under the MIT License.
๐ Acknowledgments
- Groq for blazing-fast open-source LLM inference
- Piper TTS for high-quality local speech synthesis
- Vite + React for lightning-fast development experience
