My Mock Interview: Architecture & Performance Benchmark of an AI Tailored Interview Platform

Live web application screenshot and interface of My Mock Interview - AI Tailored Interview Platform

My Mock Interview: Architecture & Performance Benchmark of an AI Tailored Interview Platform

Key Takeaways

  • 7-Agent Sequential Pipeline: Orchestrates JD parsing, resume analysis, gap detection, spec building, question generation, answer evaluation, and final review asynchronously.
  • Hybrid SEO-First Frontend: Nginx serves a zero-JavaScript static landing page at / for instant crawlability and a React 19 SPA at /app/ for the interactive interview terminal.
  • WebMCP Integration: Exposes /api/v1/mcp/interviews endpoints allowing autonomous agents to initiate sessions and retrieve evaluations programmatically.
  • Resilient Model Inference: Automatic shuffled free-model failover via OpenRouter prevents session drops on credit exhaustion.
  • Production Object Storage: MinIO S3 handles resume PDFs, session snapshots, and evaluation dossiers with presigned URLs.
Live Project Access: https://interview.nevatal.id

Live web application screenshot and interface of My Mock Interview - AI Tailored Interview Platform
Live web application interface of My Mock Interview – AI Tailored Interview Platform (https://interview.nevatal.id)

The Engineering Challenge: Why My Mock Interview Was Architected

Traditional interview preparation relies on static question banks—LeetCode for technical roles, generic STAR prompts for behavioral rounds. These approaches fail to model the intersection between a specific Job Description (JD) and a candidate’s actual work history. A senior backend engineer applying for a distributed systems role faces different gaps than one targeting an ML platform team, yet both receive identical “system design” questions from generic platforms.

The core engineering challenge was building an automated, asynchronous multi-agent LLM pipeline that treats interview preparation as a compiler problem: ingest unstructured inputs (JD text + Resume PDF), perform semantic analysis (Gap Analysis), emit a formal contract (Interview Specification), execute a dynamic runtime (Turn-by-turn Interview), and produce a verified artifact (Executive Scorecard). This required solving non-trivial problems in prompt chaining, state persistence, streaming UX, and model inference reliability.

Core Architecture & Technical Stack Deep-Dive

System Topology & Container Deployment

The platform runs as a containerized micro-service stack orchestrated via Docker Compose. The topology separates concerns cleanly between the edge proxy, application logic, data persistence, object storage, and external inference.

                  ┌───────────────────────┐
                  │    User Web Browser   │
                  └───────────┬───────────┘
                              │
                              ▼ Port 3000 (HTTP)
                  ┌───────────────────────┐
                  │      Nginx Proxy      │
                  └─────┬───────────┬─────┘
           /api/v1/     │           │ Static HTML / SPA
                        ▼           ▼
        ┌───────────────────┐    ┌───────────────────────────────────┐
        │   FastAPI Backend │    │ • /      -> Static zero-JS Landing│
        │    Port 8000      │    │ • /app/  -> React 19 SPA Bundle   │
        └─────────┬─────────┘    └───────────────────────────────────┘
                  │
     ┌────────────┼────────────┐
     ▼            ▼            ▼
┌──────────┐ ┌──────────┐ ┌───────────────────┐
│PostgreSQL│ │  MinIO   │ │  OpenRouter API   │
│  (5432)  │ │(9000/9001│ │ (Cloud Inference)│
└──────────┘ └──────────┘ └───────────────────┘

Backend: FastAPI, SQLAlchemy 2.0 & AsyncPG

The API layer is built on FastAPI (Python 3.12) leveraging SQLAlchemy 2.0 with the asyncpg driver for fully non-blocking database I/O. This async foundation is critical for the preparation pipeline, where multiple LLM calls (often 10-30 seconds each) must not block the event loop. Key architectural decisions include:

  • Pydantic V2 Contracts: Every agent input/output is strictly typed (e.g., JDStructured, GapReport, InterviewSpec, Question, Evaluation), enabling compile-time validation of the pipeline data flow.
  • Repository Pattern: Data access is abstracted behind repositories (InterviewRepository, JobDescriptionRepository, ResumeRepository), facilitating unit testing with in-memory fakes.
  • Background Task Orchestration: The 7-agent preparation pipeline runs as a FastAPI BackgroundTask, updating the Interview.status field (PREPARING → READY → IN_PROGRESS → COMPLETED) for real-time UI polling.

Database Layer: PostgreSQL 16 Schema Design

PostgreSQL 16 stores relational state with a schema optimized for the interview lifecycle:

  • interviews: Core entity tracking mode (TECHNICAL/HR), status, current_question_index, and aggregate final_score.
  • job_descriptions & resumes: Store raw text, structured JSON output from parsers (jd_structured, resume_structured), and MinIO object keys for source PDFs.
  • questions & answers: Turn-level granularity with category (TECHNICAL_DEPTH, SYSTEM_DESIGN, BEHAVIORAL_STAR, GAP_PROBING), rubric scores (technical_depth, communication_clarity), and evaluator feedback JSON.
  • evaluation_dossiers: Final aggregated report with competency breakdowns, strengths, growth areas, and hiring recommendation (STRONG_HIRE / HIRE / NO_HIRE).

Object Storage: MinIO S3 for Artifacts

MinIO provides S3-compatible object storage for three artifact classes:

  1. Candidate Resumes: Original PDF uploads stored at resumes/{interview_id}/{filename}.
  2. Session Snapshots: Periodic JSON dumps of interview state (questions asked, answers given, partial scores) for crash recovery and audit.
  3. Evaluation Dossiers: Final executive scorecard PDFs generated server-side, stored at dossiers/{interview_id}/scorecard.pdf.

All objects are accessed via presigned URLs (TTL: 1 hour), ensuring the backend never serves large binaries directly and maintaining zero-trust network segmentation.

Inference Layer: OpenRouter Multi-Model Failover

The platform abstracts model inference behind an LLMClient interface backed by OpenRouter. This provides two critical production capabilities:

  • Model Diversity: Different agents use different models optimized for their task (e.g., a large-context model for JD parsing, a fast instruct model for turn-by-turn evaluation).
  • Automatic Shuffled Free-Model Failover: On credit exhaustion or rate limits, the client automatically shuffles through a configured list of free-tier models, retrying the request transparently. This prevents session drops during high-traffic periods without manual intervention.

Frontend: Hybrid Nginx + React 19 / Vite

The Nginx edge server implements a dual-serving strategy for optimal SEO and UX:

  • / (Root): Pre-rendered static HTML with inlined critical CSS, zero JavaScript. Achieves near-perfect Lighthouse scores (Performance 99+, SEO

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *