Confessions of a solo engineer building Masterji for Indian Class 10 Boards: How I built multi-agent supervisors, Socratic state machines, and concurrency mutexes, only to realize my bot was talking to 15-year-olds like they were five.

1. The Core Idea: What is Masterji?

India's Class 10 Board Exams (CBSE, ICSE, and State Boards like Karnataka SSLC) are an emotional pressure cooker. For over 20 million students every year, this is their first national standardized exam. It dictates streaming (Science, Commerce, Arts), family prestige, and immense personal anxiety.

Yet, the after-school support system for most students is deeply flawed:

  • Offline Tuitions: 40 to 60 kids crammed into a coaching center where shy students are terrified to raise their hands and say, "Sir, I didn't understand Step 2."
  • EdTech Apps: High-friction platforms requiring app downloads, logins, and expensive annual subscriptions that often sit abandoned on a tablet.
  • ChatGPT / Photomath ("Answer Vending Machines"): When a student is stuck on a quadratic equation at 10:30 PM, they paste the problem into ChatGPT. The LLM immediately dumps the complete solution. The student copies it into their homework notebook, learns zero underlying mechanics, and blanks out during the exam.

The Masterji Thesis was simple:

Build a 24/7 personal tutor on WhatsApp — where students and parents already live — that refuses to spoon-feed answers. Instead, it guides the student step-by-step using the Socratic method, grounds every hint in official board marking schemes, and sends parents a daily digest of what their child actually practiced.

No app installs. No logins. Just send a photo of your notebook or text a doubt on WhatsApp, and Masterji helps you solve it yourself.

2. The Engineer’s Instinct: How I Approached the Problem

As a software engineer, when I looked at this problem, I didn't see pedagogy first; I saw distributed systems problems.

I asked myself:

  • How do I prevent the model from leaking answers?
  • How do I handle rapid WhatsApp burst messages without race conditions?
  • How do I parse messy voice notes in Hinglish or Kanglish?
  • How do I grade handwritten notebook pages with board exam marking rubrics?

So, I built an enterprise-grade backend.

flowchart TD User["Student on WhatsApp"] --> Ingress["Meta Cloud API Webhook"] Ingress --> Mutex["Per-Phone Webhook Mutex (queue.ts)"] Mutex --> Dedup["CSO-02 Idempotency & Replay Guard"] Dedup --> Router["Supervisor Router (supervisor/router.ts)"] subgraph State["Persistence & Grounding Layer"] L1["L1 In-Memory RAM Cache"] L2["L2 Supabase PostgreSQL (socratic_threads)"] RAG["Curriculum RAG & PYQ Bank (2022-2026)"] end Router <--> State Router --> ModeDecision{"Intent & Pedagogical Mode"} ModeDecision -->|Quadratic / Geometry / AP| MathsSir["Maths Sir Specialist"] ModeDecision -->|Circuits / Optics / Reactions| ScienceTeacher["Science Teacher Specialist"] ModeDecision -->|Motivation / Banter| GeneralMentor["General Mentor Specialist"] MathsSir --> Guardrails["Post-Flight Anti-Cheat Sanitizer"] ScienceTeacher --> Guardrails GeneralMentor --> Guardrails Guardrails --> Outbound["Meta WhatsApp Outbound Dispatcher"] Outbound --> User

Architectural Pillars Built:

  1. The Supervisor Router (router.ts): A centralized brain that classifies student intent, enforces enrolled subject isolation (Maths, Science, or Both), and dynamically selects the pedagogical mode.
  2. Tri-Modal Pedagogical State Machine:
    • LEARN: Explains underlying mechanics and demonstrates a parallel problem with different numbers (never the student's actual homework question).
    • PRACTICE: Asks step-1 coaching questions (e.g., "What are the coefficients a, b, and c?" or "Which formula links V, I, and R?").
    • EVALUATE: Step-marking rubric grading that awards board marks and flags sign slips.
  3. The 2-Strike Socratic Escape Hatch: If a student genuinely doesn't know the answer after two consecutive attempts, the system prevents an infinite interrogation loop. It drops back to LEARN mode, shows the principle on an analogous problem, and bridges back.
  4. Multimodal Ingestion Pipelines:
    • Voice Notes: Ingests WhatsApp OGG Opus audio, runs it through Groq Whisper, handles code-switched Hindi/Kannada slang, and routes it to the tutor.
    • Notebook Vision Grading: Uses Google Gemini Vision with an image-debouncing queue (caching multiple notebook pages before grading) to return step-by-step red-pen markings.
  5. Canonical Curriculum Overlays: Maintains distinct syllabus trees for CBSE (which dropped chapters like Periodic Classification and Constructions) versus State Boards like Karnataka SSLC (which kept them with dedicated mark weightages).

3. How Far We Got: The Engineering War Stories

On paper and in the terminal, the system was a marvel. Over several weeks of intense development, we conquered tricky real-world engineering bugs:

War Story 1: The WhatsApp Burst Race Condition

Teenagers do not send one neat, well-formed paragraph. They send five rapid fragments in two seconds:

"sir" "in question 4" "why is current same?" "in series" "tell me" 

Initially, Meta fired five concurrent webhook POST requests to our Fastify server. Because LLM inference takes 800ms–2s, request #2 would read state from Supabase before request #1 finished persisting it. The system suffered split-brain hallucinations: the bot would answer question #3, evaluate question #2 as a math answer, and wipe out the conversation thread.

We had to design an in-process per-phone serialization mutex:

// src/modules/whatsapp/queue.ts const phoneQueues = new Map<string, Promise<void>>(); export async function enqueuePhoneTask<T>(phone: string, task: () => Promise<T>): Promise<T> { const norm = phone.trim(); const prev = phoneQueues.get(norm) ?? Promise.resolve(); let taskResult!: T; const next = (async () => { await prev.catch(() => {}); taskResult = await task(); })(); const chained = next.then(() => {}, () => {}); phoneQueues.set(norm, chained); try { await next; return taskResult; } finally { if (phoneQueues.get(norm) === chained) { phoneQueues.delete(norm); } } } 

Every incoming webhook for that student joins an asynchronous FIFO chain. Message 2 waits cleanly for Message 1 to complete its DB write and dispatch before processing.

War Story 2: Socratic Counter-Doubts

In an early build, if Masterji asked:

"What is the formula relating Voltage, Current, and Resistance?"

And the student replied:

"Wait, why does resistance increase when length increases?"

The router classified the student's message as an answer attempt (ANSWERING), compared it against Ohm's Law formula (V = IR), marked it wrong, and consumed Strike 1!

Real students don't just answer questions; they ask questions back in the middle of answering. We had to refactor the active-thread supervisor to recognize CLARIFYING_DOUBT:

stateDiagram-v2 [*] --> SocraticThreadActive SocraticThreadActive --> EvaluatingAnswer: Student attempts answer ("V = IR") SocraticThreadActive --> ClarifyingDoubt: Student asks counter-doubt ("Why does wire length matter?") ClarifyingDoubt --> ExplainMechanism: Masterji answers physics intuition ExplainMechanism --> ReBridgeQuestion: "Now coming back: what formula connects V, I, and R?" ReBridgeQuestion --> SocraticThreadActive

War Story 3: The WhatsApp 10-Item Constraint

When implementing an interactive WhatsApp Chapter Picker so students could switch topics on the fly, Meta's Cloud API silently rejected payloads with HTTP 400 Bad Request.

Why? Meta strictly caps interactive list messages at 10 items across all sections. Class 10 Science has 13 chapters; Maths has 14 chapters. We had to build a prioritized slicing algorithm: show the top 10 most critical/board-frequent chapters in the interactive UI, while gracefully supporting fuzzy text search ("or type any chapter name like Circles, Heredity, or Light") for the rest.

4. The Reality Check: Where I Lost My Way

By all technical metrics, the system was robust.

  • Fastify server running on Render.
  • Supabase PostgreSQL persistence with L1 RAM caching.
  • Groq Llama 3.3 70B delivering lightning-fast Socratic turns.
  • Multimodal Whisper audio and Gemini Vision debounced pipelines.

And then today, I put the bot into the hands of 4 real pilot students and their parents.

Within five minutes of watching them interact, I felt a knot in my stomach.

I had fallen into the classic solo engineer trap: I engineered an enterprise backend, but I had completely lost touch with the actual human using it.

1. The "Babying" Problem: Talking Down to 15-Year-Olds

The most brutal feedback from our pilot students was unanimous:

"Bhaiya, why is it talking to me like I’m in 3rd standard?"

Because I had prompted the LLM with generic "friendly, encouraging tutor" instructions, the model was responding with patronizing fluff:

"Awesome effort, champ! 🌟 Let's go on a fun little journey to explore how magical electricity flows through wires! Are you ready, my friend?"

A 15-year-old Indian student in Class 10 is stressed about their pre-board marks. They are studying late into the night. They do not want to be called "champ", they do not want emojis on every line, and they do not want to be babied. They want to be treated like an intelligent young adult preparing for a serious exam.

They wanted concise, respectful, exam-sharp guidance:

  • "Good start. Notice that current remains constant in series, but voltage divides across resistors. Try calculating V₁ first."

2. Disconnecting from Real Student Shorthand

I had spent hours perfecting formal English prompts and edge cases, but real 10th graders communicate in rapid, terse adolescent shorthand:

  • "bhai ye batao"
  • "steps batao direct"
  • "smjh ni aya sir"

When the bot replied with three long paragraphs explaining textbook theory, the students skimmed past it or stopped reading altogether. WhatsApp is a high-velocity chat medium, not an NCERT PDF viewer. Responses need to be punchy, bite-sized, and conversational.

3. The Synthetic Eval Illusion

During development, it's dangerously easy to rely on automated eval suites. You write 50 synthetic test prompts in a test runner, mock the responses, assert regexes on anti-cheat guardrails, and celebrate when tests pass green.

Synthetic evals are a comforting illusion. They test whether your software meets your own preconceived expectations. They do not test whether a tired student at 11 PM finds the explanation intuitive, or whether a parent reading the daily WhatsApp report feels confident in their child's progress.

Real users break your assumptions in ways synthetic benchmarks never predict.

5. The Road to Mid-December: What We’re Doing Next

Building in public means owning your missteps. I over-indexed on backend plumbing and under-indexed on pedagogical tone and user psychology.

Here is what we are fixing right now as we head toward our target launch in mid-December 2026:

  1. Re-engineering the Pedagogical Voice: We are stripping out all condescending, infantilizing praise. Masterji's new persona is that of a calm, sharp, respectful senior mentor (like an elder sibling who scored 98% in Boards) — concise, clear, and focused on NCERT marking rubrics.
  2. Context-Rich Chapter Workspaces (Step 2 Roadmap): Allowing students to maintain separate, persistent study contexts per chapter (e.g. keeping Quadratic Equations progress distinct from Triangles), so switching topics feels like opening a separate notebook rather than resetting a conversation.
  3. Parent Transparency Engine: Polishing the automated 8:00 PM WhatsApp parent summary: showing which topics were practiced, where the student struggled, and how their conceptual clarity is trending — without invading the student's private chat space.

6. Looking for Pilot Student & Parent Duos

We currently have 4 active pilot users helping us stress-test Masterji and understand the real mindset of a Class 10 student.

We are actively looking for more pilot duos (Student + Parent) preparing for:

  • CBSE Class 10 (Maths & Science)
  • Karnataka SSLC (State Board Maths & Science)

If you are a 10th-standard student feeling overwhelmed by coaching classes, or a parent who wants visibility into your child’s daily practice without nagging them, we would love to have you test Masterji.

Your real-world feedback will directly shape how this product behaves before our mid-December release.

Key Takeaway for Solo Builders

You can write the cleanest async mutexes, design the most elegant multi-agent supervisor, and pass every unit test in your terminal. But until you put your creation in front of the 15-year-old whose problem you claim to solve, you haven't built anything yet.

Don't hide behind your architecture. Get humbled early.

Building in public. Comments, feedback, and architectural critiques are warmly welcome below.