← Independent Projects

Developer Tools / Interview Preparation

InterviewForge

Local-first interview preparation app for frontend engineers. AI-powered question generation, coding practice in sandboxed environments, system design with Mermaid diagrams, mock interviews, and cover letter generation that learns from your successful applications - all running locally with Ollama, no cloud required.

Context
Independent
Source Code
Public source

Engineering scope

Engineering Scope

Stack: React 19 · TypeScript · NestJS · TypeORM · SQLite · CodeMirror 6 · Ollama · Vite · Zod · Mermaid

Inspect the source ↗

A privacy-first interview prep platform running entirely locally with Ollama, sandboxed code execution, and a cover letter system that learns from your successful applications. No cloud, no API keys, no data leaves your machine — all questions, evaluations, and cover letters generated on your hardware.

The project demonstrates local AI integration patterns, secure code execution in browser sandboxes, and feedback-driven generation that improves from user outcomes.

01 / Local AI

Ollama integration without cloud dependencies

Most AI tools call OpenAI or Anthropic APIs. I wanted something that works offline and keeps data private. Ollama runs LLMs locally: you pull a model like Qwen or Llama, and it runs on your machine. No API keys, no billing, no data leaves your computer.

The integration wasn't straightforward. Ollama's API is simple (POST to /api/generate), but handling streaming responses, managing model selection, and dealing with slow inference on large models required careful state management. I built a model service that abstracts the Ollama client, handles connection health checks, and provides a clean interface for the rest of the app.

The tricky part: prompt engineering for different tasks. Question generation needs different prompts than code review. Cover letter generation needs yet another approach. I built a prompt template system where each task type has its own template with placeholders for context (topic, difficulty, user's answer, etc.). Templates are stored as markdown files so I can iterate on them without touching code.

02 / Code execution

Running user code safely in the browser

Interview prep means users write code and want to test it. Running arbitrary JavaScript in the browser is dangerous: it can access your cookies, make network requests, or crash the tab. I needed a way to execute code safely and capture the output.

Solution: browser Workers and sandboxed iframes. For simple JavaScript, I create a Web Worker, post the user's code to it, and let it run. Workers can't access the DOM or cookies, so they're isolated. I add a 3-second timeout: if the code takes longer, I terminate the worker and show a timeout error.

For DOM and React code, I need a real browser environment. I create a hidden iframe with a sandboxed document, inject the user's code, and run it. The iframe has no access to the parent window, so it can't escape the sandbox. After execution, I extract the results and clean up the iframe.

The hidden tests are the interesting part. When I generate a coding question, I also generate hidden test cases. These tests run in the same sandbox, but the user doesn't see the test code. This prevents cheating: you can't just hardcode the answer if you don't know what the tests check.

03 / Learning from success

Cover letters that improve based on your wins

Most cover letter generators are dumb: they take your resume and the job description, call an LLM, and spit out generic text. I wanted something smarter: a system that learns from your successful applications.

Here's how it works: when you apply for a job, you track whether you got an interview. If you did, that cover letter is marked as successful. The system stores the letter, the job description, and the outcome. Next time you apply for a similar role, the generator retrieves your successful letters as examples and uses them as context for the LLM.

The implementation: I built a feedback loop. Each application has a status (applied, interview, rejected). When you mark one as successful, it goes into a 'learned examples' pool. The prompt template for cover letter generation includes a section for 'successful examples from similar roles' where I inject 2-3 past letters that worked. The LLM sees what worked for you and generates something in a similar style.

The privacy angle: all of this data stays in your local SQLite database. No cloud, no tracking. Your successful cover letters are your data, not mine.

04 / Architecture

Why NestJS + React + SQLite

I chose NestJS for the backend because it's TypeScript-first, has good DI, and integrates well with TypeORM. The backend handles: Ollama communication, SQLite queries, PDF parsing, and serving the React frontend. It's a monolith, but it's a clean monolith: clear module boundaries, dependency injection everywhere.

React 19 for the frontend because it's what I know best, and Vite makes the dev experience fast. The frontend is mostly stateless: it calls the backend API, gets results, renders them. State management is simple: React Query for server state, local state for UI.

SQLite via better-sqlite3 because it's fast, reliable, and requires no setup. The database stores: topics, questions, user answers, application tracking, cover letters, and extracted CV text. All in one file (~/.interviewforge/db.sqlite). Backup is just copying the file.

The monorepo structure: pnpm workspaces with backend/, frontend/, and shared/ packages. Shared contains TypeScript interfaces and validation schemas (using Zod) that both frontend and backend use. This prevents type mismatches between API requests and responses.

System flow

Local AI interview prep flow

  1. 01

    Topic selection

    User selects topic and difficulty level from the frontend

  2. 02

    Question generation

    Backend uses Ollama with prompt template to generate contextual question

  3. 03

    Answer evaluation

    User submits answer, backend evaluates with rubric-based feedback

  4. 04

    Mastery tracking

    Spaced repetition algorithm updates review interval based on performance

Evidence & further reading

Technical references