Skip to content

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

33 Commits

Folders and files

Repository files navigation

Interview Mirror πŸͺž

Node.js React LangGraph LLM Memory Tests License

"Know what you know. Know what breaks you."

Interview Mirror is an adaptive, metacognitive technical interview and skill profiling system. Traditional mock interviewers ask static question lists and rate candidates on superficial keywords. Interview Mirror does something fundamentally different:

  1. Calculates your Confidence Calibration Gap: Detects whether you are genuinely knowledgeable or dangerously overconfident.
  2. Predicts your Cognitive Breakpoint: Locates the exact architectural threshold where your reasoning degrades.
  3. Executes Adversarial Battle Drills: Puts you through high-pressure stress scenarios to force recovery and measure net resilience.
  4. Maintains Cross-Session Breethe Memory: Tracks your skill trajectory, flags stale technical knowledge, and personalizes every subsequent round.

πŸ— System Architecture

flowchart TD
    subgraph Client["Frontend Studio (React 19 + Vite + Three.js)"]
        UI["Cyberpunk Studio UI"]
        Radar["Dynamic SVG Skill Radar"]
        GraphVis["LangGraph 6-Node Live Visualizer"]
        Canvas["Three.js Living Network Canvas"]
    end

    subgraph Backend["Backend Engine (Express ESM + Node.js)"]
        Router["API Gateway / Router"]
        
        subgraph GraphEngine["LangGraph State Engine"]
            N1["1. Evaluate Node"] --> N2["2. Calibrate Node"]
            N2 --> N3["3. Belief State Engine"]
            N3 --> N4["4. Metacognitive Profiler"]
            N4 --> N5["5. Question Planner"]
            N5 --> N6["6. Persona Critique"]
        end
        
        subgraph Services["Core Micro-Services"]
            CalEngine["Calibration Engine"]
            BayesEngine["Dirichlet / Beta Belief Engine"]
            StyleEngine["Thinking Style Detector"]
            FrustAgent["Anti-Cheat Socratic Escalator"]
        end
    end

    subgraph Cloud["External AI & Cloud Memory"]
        Nvidia["NVIDIA NIM\n(meta/llama-3.3-70b-instruct)"]
        Breethe["Breethe Cloud Memory API\n(thebreeth.com)"]
        SQLite["SQLite Embedded Store\n(better-sqlite3)"]
    end

    UI -->|REST / JSON| Router
    Router --> GraphEngine
    GraphEngine --> Services
    Services --> Nvidia
    Services --> Breethe
    Services --> SQLite
    GraphVis -.->|Node Telemetry| GraphEngine
Loading

🌟 Key Capabilities

1. Metacognitive LangGraph Decision Pipeline

The core interview loop is managed by a stateful 6-node LangGraph:

  • Node 1 (Evaluate): Grades technical accuracy (0.0–1.0) and isolates missing architectural primitives.
  • Node 2 (Calibrate): Computes the mathematical delta ($\Delta = \text{Confidence} - \text{Demonstrated Depth}$).
  • Node 3 (Update Belief): Bayesian probability update across 8 technical domains.
  • Node 4 (Thinking Style Profiler): Classifies reasoning into First-Principles, Pattern Matcher, or Framework Applier.
  • Node 5 (Planner): Synthesizes curriculum modules, stale topics from memory, and past weaknesses.
  • Node 6 (Critique): Enforces interviewer voice and strictly validates question difficulty.

2. Three Distinct Interviewer Personas

  • Alex (System Design & Scalability): Socratic, warm, rigorous. Focuses on concurrency, data partitioning, and failure modes.
  • Priya (ML & RAG Architecture): Direct, precise, first-principles. Drills vector search latency, evaluation metrics, and model tradeoffs.
  • Marcus (Operational Resilience & MCP): Pragmatic, no-nonsense lead engineer. Focuses on edge cases, outages, and agent tools.

3. Adversarial Bottleneck Battle Mode

  • 5-turn pressure drill targeting identified failure modes.
  • Quantifies net recovery with a Before/After scorecard (e.g., $41% \rightarrow 57%, +16%$ recovery).

4. Anti-Cheat Socratic Practice Coach

  • Interactive algorithm & design challenges with progressive hints ($0 \rightarrow 3$).
  • Never leaks direct solutions; enforces structured reasoning and self-reflection.

5. Persistent Breethe Cloud Episodic Memory

  • Cross-session growth curves tracking readiness and calibration convergence.
  • Stale topic decay detection automatically prompts review of unpracticed domains.
  • Full semantic episode search via vector memory API.
  • Zero-PII privacy audit with SHA-256 session anonymization.

πŸ›  Tech Stack

Layer Technologies
Frontend React 19, Vite 8, Framer Motion, Three.js, Lucide Icons, Vanilla CSS Glassmorphism
Backend Node.js (ESM), Express, LangGraph (@langchain/langgraph), @langchain/core
Persistence SQLite (better-sqlite3), Local JSON Disk Fallback
LLM Inference NVIDIA NIM (meta/llama-3.3-70b-instruct), Gemini, OpenAI, Anthropic
Episodic Memory Breethe Cloud Memory REST API (https://api.thebreeth.com/v1)
Testing Node.js Native Test Runner (node --test), 42 Automated Integration Tests

πŸš€ Quickstart Guide

Prerequisites

  • Node.js: v18.0.0 or higher
  • npm: v9.0.0 or higher

1. Clone & Install Dependencies

git clone https://github.com/Creater-jod/interview-agent.git
cd interview-agent

# Install backend dependencies
npm install

# Install frontend dependencies
npm install --prefix client

2. Configure Environment Variables

Create .env in the project root (see .env.example for details):

PORT=5000
NODE_ENV=development
CORS_ORIGIN=*

# Primary LLM: NVIDIA NIM
LLM_PROVIDER=nvidia
LLM_MODEL=meta/llama-3.3-70b-instruct
NVIDIA_API_KEY=your_nvidia_nim_api_key_here

# Breethe Memory (optional, falls back automatically to local persistent JSON)
BREETHE_API_KEY=your_breethe_api_key_here
BREETHE_API_BASE=https://api.thebreeth.com/v1

For frontend customization, create client/.env:

VITE_API_URL=http://localhost:5000

3. Run Development Servers

# Terminal 1: Backend Intelligence Engine (:5000)
npm run dev

# Terminal 2: Frontend Studio (:5173)
npm run dev --prefix client

Open http://localhost:5173 in your browser.


πŸ§ͺ Automated Tests

The repository includes a comprehensive 42-test automated suite covering controllers, LangGraph pipelines, calibration mathematics, Breethe memory, and privacy audits:

npm test

Expected output:

# tests 42
# suites 0
# pass 42
# fail 0

🚒 Production Deployment

Backend (Render / Node.js Service)

A pre-configured render.yaml blueprint is included in the root directory:

  1. Connect your GitHub repository to Render.
  2. Create a new Web Service from the repo root.
  3. Configure environment variables (NVIDIA_API_KEY, BREETHE_API_KEY).
  4. Build command: npm install
  5. Start command: node src/index.js
  6. Health check path: /api/health

Frontend (Vercel)

A pre-configured vercel.json is included for zero-config SPA routing:

  1. Import the repository into Vercel.
  2. Set Root Directory to client (or use root with default build script).
  3. Add environment variable: VITE_API_URL=https://your-backend-service.onrender.com
  4. Deploy!

πŸ“‘ API Reference

Method Endpoint Description
GET /api/health Healthcheck & service status
POST /api/interview/start Initialize interview session with chosen persona & track
POST /api/interview/continue Submit response + confidence; runs 6-node LangGraph turn
POST /api/interview/complete Conclude session and generate Diagnostic Dossier
GET /api/interview/:id/messages Fetch complete transcript from SQLite store
GET /api/report/:sessionId Retrieve readiness, calibration delta, and breakpoint card
POST /api/battle/turn Execute pressure turn in Adversarial Battle drill
GET /api/memory Retrieve candidate growth trajectory, stale topics, and traits
GET /api/memory/status Check Breethe Cloud sync vs Local Disk fallback status
POST /api/memory/search Semantic vector search over candidate past episodes
POST /api/train/start Launch adaptive Socratic coaching session
POST /api/train/message Submit message or solution proposal to Socratic Coach
POST /api/train/hint Request progressive hint tier escalation (0–3)
POST /api/train/new-problem Request next adaptive challenge matched to profile
GET /api/train/profile Fetch persistent skill profile and radar data

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages