An enterprise-grade, state-of-the-art AI-powered Mock Interview system developed for the Steps AI National-Level Online Hackathon 2026. The platform automates resume analysis, carries out a context-aware conversational mock interview with real-time SSE streaming, deduplicates questions, conducts vague answer probing, tracks session statuses, and compiles multi-dimensional grading reports into modern, premium branded PDFs.
Develop an intelligent mock interview system that:
- Analyzes Resumes: Layout-aware text extraction for PDF and DOCX formats with programmatic skill-gap assessments.
- Adaptive Conversational AI: A rigid multi-turn interview loop with dynamic progression, vague answer probing, and real-time Server-Sent Events (SSE) token streaming.
- Question Deduplication: Ensures recruiter personas do not repeat previously asked topics inside a single active session.
- Rigid Performance Diagnostics: Automated transcript grading against specific competency frameworks using low-latency Groq LLM services in JSON Mode.
- Premium PDF Export: Automatically compiles visually appealing performance cards with circular metrics dials, radar tables, and targeted guidance recommendations.
Domains: Conversational AI, Resume Intelligence, Automated Performance Evaluation Systems, and Career Technologies.
- π Cosmic Frontend Client (Vercel): https://stepsai-smoky.vercel.app
- π§ FastAPI Backend Service (Render): https://stepsai-backend.onrender.com
- π©Ί API Live Health Probe: https://stepsai-backend.onrender.com/health
Our stack leverages a production-grade decoupled architecture. The Next.js cosmic user interface communicates directly with a multi-layered FastAPI REST framework, utilizing a persistent SQLite database and ultra-fast Groq API completions:
| Layer | Technology / Library | Role in Stack | Key Benefit |
|---|---|---|---|
| Frontend UI | Next.js 16 (React 19 App Router) |
Interactive SPA Client | Dynamic SSR, layout streaming, and type safety |
| Motion Physics | GSAP (GreenSock Platform) |
Micro-interactions | Pulsating audio visuals, fluid fades, and glowing card entries |
| Styling Engine | Tailwind CSS 4 + CSS Variables |
Glassmorphic Cosmic Design | Unified custom themes, dark-mode gradients, #0b0f19 backdrops |
| API Backend | FastAPI (Python 3.9+) |
Core Service Gateway | Extreme speed, automated OpenAPI schema, asynchronous event loops |
| Generative AI | Groq Cloud API |
LLM Inference Engine | Free-tier budget, under 500ms latency, strict JSON schema output |
| LLM Model | llama-3.3-70b-versatile |
Recruiter & Grader Core | 70-Billion param cognitive logic, technical/HR persona adaptivity |
| Database | SQLite (sqlite3) |
Session & Data Persistence | Zero-dependency disk-based tables, structured JSON schemas |
| Ingestion Parsing | PyMuPDF + python-docx |
File Raw Text Extractor | Ultra-fast document parsing across standard layouts |
| Report Compiler | FPDF2 |
Premium Branded PDF Engine | Layout grid systems, dynamic page counts, custom header banners |
| Security Layer | APIKeyHeader + X-API-Key |
API Request Gatekeeper | Optional strict path guarding with zero client disruptions |
| Traffic Control | Thread-safe Sliding Window | In-memory Rate Limiter | Per-endpoint, IP-based client throttling (10/min, 60/min) |
| Structured Logs | Loguru + Interceptors |
Multi-handler Logging | Daily rotating zip folders, uvicorn stderr redirection |
| Testing Suite | Pytest + HTTPX TestClient |
Automatic CI/CD Verification | Integrated database mocks, SSE streaming checks |
| Deployment | Docker & Docker Compose |
Container Orchestration | Instant multi-stage compilation and service startup |
Our services communicate via standard REST interfaces, using SSE streams for conversational loops, and SQLite for persistence:
graph TD
Client[Next.js Premium Frontend: port 3000] -->|Upload PDF/DOCX| API_Resume[POST /api/v1/resume/upload]
Client -->|Launch Mode Mock Session| API_Start[POST /api/v1/interview/start]
Client -->|Answer Question SSE Stream| API_Answer[POST /api/v1/interview/answer]
Client -->|Get Active Session Status| API_Status[GET /api/v1/interview/status/{session_id}]
Client -->|End and evaluate session| API_End[POST /api/v1/interview/end]
Client -->|Download PDF report| API_Report[GET /api/v1/report/{session_id}]
Client -->|Database Health Probe| API_Health[GET /health]
subgraph "FastAPI Backend: port 8000"
API_Health --> DB_Check{SQLite Query Select 1}
API_Resume --> Limit_Up[Depends: upload_limiter]
API_Start --> Limit_Int[Depends: interview_limiter]
API_Answer --> Limit_Int
API_Resume --> Auth_Check[Depends: get_api_key]
Parser[PyMuPDF & python-docx] --> DB[(SQLite DB: stepsai.db)]
Engine[Interview Engine] --> DB
Evaluator[Groq JSON Grader] --> DB
PDF_Comp[FPDF2 Report Compiler] --> DB
Parser --> LLM_Call[Groq API Client]
Engine --> LLM_Call
Evaluator --> LLM_Call
end
LLM_Call -->|Llama 3.3 70B JSON / Text| Groq_Cloud[Groq Cloud Inference Engine]
The backend registers 7 primary endpoints under the /api/v1 namespace, plus 2 base monitoring routes. Auth validation depends on REQUIRE_AUTH within settings:
| Endpoint | Method | Security | Parameters / Body | Description | Expected Output |
|---|---|---|---|---|---|
/ |
GET |
None | None | Root greeting and documentation router redirect | {"message": "...", "docs": "/docs"} |
/health |
GET |
None | None | Active database connectivity SELECT check | {"status": "healthy", "database": {"status": "healthy"}} |
/api/v1/health |
GET |
None | None | Lightweight service uptime diagnostic info | {"status": "healthy", "uptime_seconds": 12.3} |
/api/v1/resume/upload |
POST |
X-API-Key |
file (UploadFile), job_role (Query) |
Layout-aware text extraction & Groq JSON profiling | {"session_id": "uuid", "profile": {...}, "skill_gaps": [...]} |
/api/v1/resume/{session_id} |
GET |
X-API-Key |
session_id (Path) |
Retrieve resume profile. Enforces 24-hr session expiry | {"session_id": "uuid", "profile": {...}, "created_at": "..."} |
/api/v1/interview/start |
POST |
X-API-Key |
resume_session_id, mode, difficulty |
Launches a mock session, registers syllabus schema | {"interview_session_id": "uuid", "welcome_message": "..."} |
/api/v1/interview/answer |
POST |
X-API-Key |
interview_session_id, answer |
Submits candidate response. Streams back next question | SSE Stream chunk-by-chunk (text/event-stream) |
/api/v1/interview/status/{session_id} |
GET |
X-API-Key |
session_id (Path) |
Returns active duration, index, and completion state | {"session_id": "...", "elapsed_seconds": 142, "completed": false} |
/api/v1/interview/end |
POST |
X-API-Key |
interview_session_id |
Terminate session. Grades transcripts, caches FPDF | {"session_id": "uuid", "overall_score": 85, "report": {...}} |
/api/v1/report/{session_id} |
GET |
X-API-Key |
session_id (Path) |
Fetches the compiled custom-branded PDF binary | PDF document stream (application/pdf headers) |
stepsai/
βββ app/
β βββ api/
β β βββ v1/
β β β βββ health.py # Service health checks and uptime loggers
β β β βββ resume.py # Size-restricted multi-format uploads & expirations
β β β βββ interview.py # SSE session start, stream answers & status checks
β β β βββ evaluation.py # Session ending, Groq rubrics, PDF downloads
β β βββ router.py # Master endpoint namespace configuration
β βββ core/
β β βββ config.py # Unified Pydantic base settings manager
β β βββ db.py # Thread-safe SQLite initialization & connection pool
β β βββ logging.py # Loguru color console and rotating log routing
β β βββ rate_limiter.py # Thread-safe in-memory sliding-window IP limits
β β βββ security.py # Strict X-API-Key dependency validator
β β βββ taxonomy.py # Professional competency tables and gap analyzer
β βββ models/
β β βββ resume.py # Pydantic formats for uploaded candidate profiles
β β βββ interview.py # Schema models for starting and tracking sessions
β β βββ evaluation.py # Model structures for scorecards & grader results
β βββ services/
β β βββ resume_parser.py # PDF & Word text extractor engines
β β βββ interview_engine.py # Adaptive syllabus progression & question deduplication
β β βββ evaluation.py # Premium visual FPDF2 page grid report compiler
β β βββ llm.py # Asynchronous Groq streams client with JSON fallback
β βββ tests/
β β βββ test_resume.py # Upload format checks and ingestion assertions
β β βββ test_interview.py # Deduplication streams and status test suites
β β βββ test_evaluation.py # Grader JSON assertions and PDF cache signatures
β β βββ test_health.py # Base route diagnostics asserts
β β βββ test_main.py # Active SQLite connectivity health assertions
β βββ main.py # FastAPI initialization, lifespan & CORS
βββ frontend/
β βββ src/
β β βββ app/
β β βββ globals.css # Dark starfield gradients and Tailwind structures
β β βββ layout.tsx # Standard fonts and metadata setup
β β βββ page.tsx # Complex SPA glassmorphic React interactive client
β βββ tsconfig.json # Strict TypeScript compiler definitions
β βββ Dockerfile # Multi-stage optimized Node deployment container
βββ Dockerfile # Python Uvicorn production-stage build
βββ docker-compose.yml # Orchestrates Frontend, Backend & persistent volumes
βββ requirements.txt # Strict pip package configurations
βββ .env.example # Standardized environment configuration template
βββ README.md # System comprehensive manual (This file)
βββ ARCHITECTURE.md # Technical decision logs and data pipelines
Make sure you have Docker running locally, then spin up the environment with one command:
docker-compose up --build- Cosmic Frontend Client Dashboard: Access at
http://localhost:3000 - Interactive FastAPI Swagger Documents: Access at
http://localhost:8000/docs - Local Persistent Database File: Automatically created as
stepsai.dbin your root workspace.
- Initialize and activate virtual environment:
python3 -m venv venv source venv/bin/activate - Install exact requirements:
pip install --upgrade pip pip install -r requirements.txt
- Configure environment settings:
cp .env.example .env # Add your GROQ_API_KEY and set REQUIRE_AUTH=False for client testing - Boot FastAPI service:
uvicorn app.main:app --reload --port 8000
- Navigate to the frontend folder:
cd frontend - Install Node packages:
npm install
- Run Next.js dev server:
npm run dev
- Open in browser:
Navigate to
http://localhost:3000to interact with the platform.
We maintain a rigorous test suite of 13 unit tests verifying state, parsing logic, rate limiters, session expiry timers, database schemas, and streaming delimiters.
To run the test suite, ensure your virtual environment is active, then execute:
./venv/bin/pytest -v============================= test session starts ==============================
platform darwin -- Python 3.9.6, pytest-8.4.2, pluggy-1.6.0 -- /Users/apple/Desktop/stepsai/venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/apple/Desktop/stepsai
plugins: anyio-4.12.1
collecting ... collected 13 items
app/tests/test_evaluation.py::test_end_interview_session_not_found PASSED
app/tests/test_evaluation.py::test_evaluation_and_pdf_generation_flow PASSED
app/tests/test_evaluation.py::test_download_report_not_found PASSED
app/tests/test_health.py::test_health_check PASSED
app/tests/test_health.py::test_root_endpoint PASSED
app/tests/test_interview.py::test_start_interview_invalid_resume_session PASSED
app/tests/test_interview.py::test_interview_conversational_and_streaming_flow PASSED
app/tests/test_interview.py::test_interview_question_deduplication_flow PASSED
app/tests/test_interview.py::test_interview_session_status_endpoint PASSED
app/tests/test_main.py::test_database_health_probe PASSED
app/tests/test_resume.py::test_upload_resume_invalid_format PASSED
app/tests/test_resume.py::test_upload_resume_and_retrieval_flow PASSED
app/tests/test_resume.py::test_get_parsed_resume_not_found PASSED
======================== 13 passed, 5 warnings in 0.36s ========================
- API Access Gates: A validated
X-API-Keycan be required on all ingest and mock session endpoints by settingREQUIRE_AUTH=Truein.env. - Sliding-Window Throttling: Restricts heavy uploads to max
10/minand interactive answer submissions to max60/minper host IP. - Strict Size Enforcements: Rejects any file payload exceeding
5MBdirectly at the HTTP layer, mitigating server CPU bloat.