Skip to content

SriramAtmakuri/InterviewAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InterviewAI

AI-powered technical interview simulator — practice coding interviews, behavioral sessions, and live collaborative mocks with real-time AI feedback, rubric scoring, and in-depth performance analytics. Fully local, no cloud AI subscriptions required.

InterviewAI Demo


Table of Contents

  1. Features
  2. Tech Stack
  3. Architecture
  4. Getting Started
  5. AI Setup
  6. Project Structure
  7. Key Workflows
  8. API Reference
  9. Security

Features

AI Mock Interviews

  • Streaming AI responses that feel like a real interviewer
  • Configurable: job title, company, type (behavioral / technical / system design / coding), difficulty (junior / mid / senior), duration
  • AI asks follow-up questions based on your answers
  • Rubric scoring — every answer graded across Communication, Technical Depth, Problem Solving, and Clarity with a 1–10 score per criterion
  • Adaptive questioning — RAG-based question selection prioritises topics you've historically scored low on
  • Fallback question pool when AI is unreachable (no silent failures)

Live Code Editor

  • Monaco Editor (VS Code engine) with syntax highlighting for 15+ languages
  • In-browser code execution via Piston API — Python, JavaScript, TypeScript, Java, C++, Go, Rust, and more
  • AI reviews your code solution and explains edge cases
  • Dedicated /code-problems page with curated LeetCode-style problems

Collaborative Interview Room

  • Share a 6-character room code to join a live session with another person
  • Real-time cursor sync, chat, and shared code editor over Socket.IO
  • Role-based: one person as interviewer, one as candidate
  • AI suggestion panel for interviewers (question hints based on context)

Resume Analyzer

  • Paste resume + job description → instant ATS compatibility score
  • Matched vs. missing skills breakdown
  • Tailored recommendations and predicted interview questions
  • One-click: start a mock interview using the generated questions

Analytics Dashboard

  • Session history with filtering by type, difficulty, and date
  • Score trends over time (bar chart, Y-axis 0–100)
  • Breakdown by interview type and difficulty distribution
  • Strongest and weakest topic identification

Gamification

  • XP system — earn points per session, per completed question, per streak day
  • Achievement badges — unlock for milestones (first interview, 7-day streak, perfect rubric score, etc.)
  • Daily streak tracking

Additional

  • Voice input — Web Speech API for speaking answers (speech-to-text in real time)
  • PDF report export — downloadable report per session (pdfkit, server-rendered)
  • PWA / Offline — installable app, service worker caches static assets
  • Question Bank — browse, filter, and fork community question templates
  • Dark / Light mode — system-preference aware

Tech Stack

Frontend

Layer Technology
Framework React 18 + TypeScript
Build Vite
UI Components shadcn/ui + Radix UI primitives
Styling Tailwind CSS
Code Editor Monaco Editor
Routing React Router v6
Charts Recharts
PWA vite-plugin-pwa + Workbox
Voice Web Speech API

Backend

Layer Technology
Runtime Node.js (ESM)
Framework Express.js
AI / LLM Local LLM engine (configurable model)
Database SQLite via better-sqlite3 (WAL mode)
Real-time Socket.IO
Auth JWT + bcrypt
Code Execution Piston API (sandboxed)
PDF Export pdfkit
Security Helmet, express-rate-limit, CORS

Architecture

┌────────────────────────────────────────────────────────────────┐
│                        Browser  (PWA)                          │
│                                                                │
│   ┌───────────────┐   ┌──────────────────┐   ┌─────────────┐  │
│   │  React + UI   │   │  Monaco Editor   │   │ Web Speech  │  │
│   │  (shadcn/ui)  │   │  (code editing)  │   │  API (STT)  │  │
│   └──────┬────────┘   └────────┬─────────┘   └──────┬──────┘  │
└──────────┼─────────────────────┼────────────────────┼─────────┘
           │ REST / SSE stream   │ code run            │ transcript
           ▼                     ▼                     │
┌──────────────────────────────────────────────────────▼─────────┐
│                     Express.js  API  Server                    │
│                                                                │
│   ┌─────────────┐  ┌──────────────┐  ┌──────────────────────┐  │
│   │  /api/ai    │  │  /api/code   │  │  /api/resume         │  │
│   │  streaming  │  │  execution   │  │  /api/interviews      │  │
│   │  responses  │  │  (Piston)    │  │  /api/reports        │  │
│   └──────┬──────┘  └──────┬───────┘  └──────────┬───────────┘  │
│          │                │                      │              │
│   ┌──────▼──────┐  ┌──────▼───────┐  ┌──────────▼───────────┐  │
│   │  Local LLM  │  │  Piston API  │  │  SQLite (WAL mode)   │  │
│   │   Engine    │  │  (external)  │  │  sessions · users    │  │
│   │ (local      │  │              │  │  questions · reports │  │
│   │  inference) │  └──────────────┘  └──────────────────────┘  │
│   └─────────────┘                                              │
│                                                                │
│   ┌────────────────────────────────────────────────────────┐   │
│   │          Socket.IO  —  Collaborative Interviews        │   │
│   │   room creation · cursor sync · shared code editor    │   │
│   └────────────────────────────────────────────────────────┘   │
└────────────────────────────────────────────────────────────────┘

Data Flow — Interview Session

User opens setup page
        │
        ▼
POST /api/ai/generate-question
        │
        ▼
AI engine streams question tokens → SSE → browser renders word-by-word
        │
        ▼
User types / speaks answer
        │
        ▼
POST /api/ai/interview  (answer + context)
        │
        ├──▶ AI engine: generate follow-up + rubric JSON
        │
        └──▶ SQLite: save message + rubric scores
                │
                ▼
        Rubric panel updates live (Communication / Technical / etc.)
                │
                ▼
        Session end → POST /api/reports → pdfkit → PDF download

Database Schema

users
  id · email · passwordHash · xp · streak · lastActive

sessions
  id · userId · config(JSON) · messages(JSON) · scores(JSON)
  totalScore · duration · completedAt

question_bank
  id · title · content · type · difficulty · tags
  authorId · forkCount · usageCount

question_embeddings
  questionId · embedding(BLOB) · model

Getting Started

Prerequisites

  • Node.js 18+
  • A local LLM engine installed and running (see AI Setup)

Install & Run

# 1. Clone
git clone https://github.com/SriramAtmakuri/InterviewAI
cd InterviewAI

# 2. Install frontend
npm install

# 3. Install backend
cd backend && npm install && cd ..

# 4. Pull your preferred AI model (see AI Setup below)

# 5. Start backend
cd backend && npm run dev &

# 6. Start frontend
npm run dev

AI Setup

InterviewAI runs AI inference locally — no API keys, no usage fees, no data sent to external services. Configure your preferred local LLM engine in backend/.env:

AI_BASE_URL=http://your-ai-engine:port
AI_MODEL=your-preferred-model

The backend health endpoint (/health) reports AI connection status and lists available models on startup.


Project Structure

InterviewAI/
├── src/                          # Frontend (React)
│   ├── pages/
│   │   ├── Landing.tsx           # Marketing / hero page
│   │   ├── Auth.tsx              # Login / register
│   │   ├── Dashboard.tsx         # Home after login
│   │   ├── InterviewSetup.tsx    # Configure interview
│   │   ├── InterviewSession.tsx  # Active interview + rubric
│   │   ├── CodeProblems.tsx      # LeetCode-style problems
│   │   ├── History.tsx           # Past sessions
│   │   ├── Analytics.tsx         # Charts + metrics
│   │   ├── ResumeAnalyzer.tsx    # ATS + skill gap
│   │   ├── CollabInterview.tsx   # Live collaborative room
│   │   └── QuestionBank.tsx      # Community templates
│   ├── components/
│   │   ├── CodeEditor.tsx        # Monaco wrapper
│   │   ├── GamificationPanel.tsx # XP + badges
│   │   ├── InterviewHints.tsx    # AI hint system
│   │   └── AIStatusBadge.tsx     # AI engine health indicator
│   └── config/
│       └── ollama.ts             # AI backend URL config
│
├── backend/
│   ├── src/
│   │   ├── index.js              # Express server + Socket.IO init
│   │   ├── config/
│   │   │   ├── database.js       # SQLite setup + migrations
│   │   │   └── ollama.js         # AI client + health check
│   │   ├── routes/               # Express route definitions
│   │   ├── controllers/          # Request handlers
│   │   ├── services/
│   │   │   └── ollamaService.js  # AI prompting + RAG logic
│   │   ├── middleware/
│   │   │   ├── auth.js           # JWT verify
│   │   │   └── rateLimiter.js    # Per-route rate limits
│   │   └── wsHandlers.js         # Socket.IO collab logic
│   └── .env                      # Environment config
│
└── demo-recording/
    └── interviewai.gif           # Feature walkthrough

Key Workflows

Starting a Mock Interview

  1. Dashboard → Start Mock Interview
  2. Set job title, type (behavioral / technical / system design), difficulty, duration
  3. Optionally add custom questions or import from Resume Analyzer
  4. Session starts → AI streams first question
  5. Answer via text or voice → AI follows up → rubric updates per response
  6. End session → view detailed scoring → download PDF report

Collaborative Interview

  1. One person creates a room → shares the 6-character code
  2. Interviewer and candidate join → both see the shared code editor
  3. Interviewer receives AI question suggestions in a side panel
  4. Session log saved to both participants' history

Resume → Interview Pipeline

  1. Resume Analyzer → paste resume + job description
  2. View ATS score, matched/missing skills, recommendations
  3. Click Practice These Now → launches interview pre-loaded with predicted questions

API Reference

Auth

Method Endpoint Description
POST /api/auth/register Create account
POST /api/auth/login Get JWT token
POST /api/auth/refresh Rotate refresh token
POST /api/auth/logout Revoke refresh token
GET /api/auth/me Current user profile

AI / Interviews

Method Endpoint Description
POST /api/ai/interview Send answer, stream AI response
POST /api/ai/generate-question Get opening question for config
POST /api/ai/analyze-resume ATS score + skill gap
POST /api/ai/validate-code AI code review

Sessions & Reports

Method Endpoint Description
POST /api/interviews Save completed session
GET /api/interviews List user sessions
GET /api/interviews/:id Session detail + rubric
GET /api/reports/:id Download PDF report

Code Execution

Method Endpoint Description
POST /api/code/execute Run code (Piston sandbox)
GET /api/code/languages List supported languages

Question Bank

Method Endpoint Description
GET /api/templates Browse community questions
POST /api/templates Publish a question template
POST /api/templates/:id/fork Fork to your bank

Security

  • JWT authentication — short-lived access tokens + rotating refresh tokens, signed with a 256-bit secret
  • bcrypt password hashing — cost factor 10
  • Rate limiting — per-route limits (30 AI req/min, 10 code exec/min, 100 general/min)
  • Helmet.js — secure HTTP headers (CSP, HSTS, X-Frame-Options, etc.)
  • CORS — restricted to configured frontend origin
  • Input validation — all API boundaries validated before processing
  • Code sandboxing — code execution runs in Piston's isolated containers, never on the host
  • Local AI — all inference runs on-device; no prompts or responses leave your machine

About

AI interview prep platform with role-based question generation, code execution, voice interaction, and analytics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors