This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.
What I Built
I built The Offline Interrogator for my friend Avinash, who lives in India and often travels by train.
Avinash wants to feel more confident in interviews, especially when choosing words and explaining his thinking. Practicing with someone else can feel intimidating, and unreliable internet during train journeys makes online tools less dependable.
This app gives him a private place to practice on his own schedule. He chooses DSA, Behavioral, or System Design, sets a difficulty and duration, and answers one question at a time. The interviewer gives hints, scores his answers, adjusts difficulty, and creates a report showing what to practice next.
After downloading the model and installing dependencies, the text-based interview can run without internet. Cloning the repository alone is not enough—the initial setup requires connectivity.
Demo
The demo shows question generation, spoken questions, answer scoring, the timer pausing during model processing, and the final report. It also shows MongoDB Atlas persistence and Sentry traces.
Code
akshatshahh
/
offline-interrogator
A local-first mock interviewer made for Avinash. Gemma 3 + Ollama + Mastra, with Atlas, ElevenLabs and Sentry.
The Offline Interrogator
A local-first AI mock interviewer built for Avinash, a friend preparing for FAANG interviews. Hacktoberfest 2026 Weekend Challenge: Build for a Friend.
Pick DSA, Behavioral, or System Design. Get one question at a time, explain your answer, ask for a hint, and receive a strict report card. Difficulty rises after strong answers and falls when fundamentals need work. Topic history makes weak spots visible across sessions.
Open-source AI at the core
Gemma 3 4B open weights → local Ollama → ollama-ai-provider → Mastra tools. All question generation, answer scoring, and hint generation use this path. There are no OpenAI, Anthropic, or Gemini API calls in the app's reasoning code. Gemma is open-weight under Google's Gemma terms; Ollama and Mastra are open-source. This distinction matters: Gemma weights are available, but their license is not an OSI software license.
server/llm.ts is the sole inference entry point. server/tools.ts registers…
How I Built It
Gemma 3 4B, served locally through Ollama, performs all interview reasoning. The app accesses it through ollama-ai-provider. No OpenAI, Anthropic, or Gemini API generates questions or scores answers.
Mastra provides five registered tools: generate a question, score an answer, provide a hint, retrieve weak spots, and finish a session. The Express API controls the interview sequence and invokes Mastra's tool execution layer.
Scores are validated against a strict JSON schema. The rubric covers correctness, approach, complexity analysis, edge cases, and communication.
The frontend uses React, Vite, and TypeScript. The timer pauses while the model scores an answer, generates a question, or prepares a hint, so processing time does not consume Avinash's answering time.
Supporting services have specific roles:
- MongoDB Atlas: stores sessions, answers, scores, reports, and 24 starter questions. Stored history supports weak-spot analysis.
- ElevenLabs: converts generated questions into speech, with playback controls when browsers block autoplay.
- Sentry: records tool and inference spans with model, latency, and prompt/completion token counts.
Missing optional credentials do not prevent an interview. Storage falls back to memory, voice falls back to text, and console telemetry remains available.
Why Does Open Innovation Matter?
Avinash can practice without depending on a cloud LLM connection for every answer.
Once the weights and dependencies are downloaded, Gemma runs on his laptop. We can inspect the implementation, change the interviewer prompts, and control the reasoning model ourselves.
Local reasoning does not make every feature offline: Atlas, ElevenLabs, and Sentry require internet when enabled, and browser microphone recognition may use an online service. For offline train journeys, Avinash can use typed answers with the optional cloud services disabled.
Gemma is an open-weight model under Google's Gemma terms; Ollama and Mastra are open-source software.
Prize Categories
I’m entering:
- Best Use of Gemma: Gemma 3 generates questions, hints, and answer scores.
- Best Use of Mastra: the interviewer executes five registered Mastra tools.
- Best Use of MongoDB Atlas: persisted interview history supports reports and weak-spot analysis.
- Best Use of ElevenLabs: generated interview questions become spoken audio.
- Best Use of Sentry Agent Tracing: tool and inference spans expose latency and token usage.
During development, an expired-session test exposed a monitoring issue: an expected 409 response was reported as an incident. I fixed this by excluding expected client errors from incident reporting and disabling Sentry telemetry during tests.
The repository includes verification notes, and all six automated tests pass.
The goal is to give Avinash a place to practice, make mistakes, and become more comfortable explaining his answers—on his own schedule.
Top comments (0)