How I Built offSchool, a Simulation-First SSC Science Site
How I built offSchool: SSC science lessons that start with a prediction and a simulation, a Claude Haiku mentor, and a Go and Next.js stack. What broke.
offSchool is a simulation-first learning site for Bangladeshi SSC students that I built at Shahriar Labs. A lesson starts with a real problem. The student predicts what will happen, runs a simulation until the pattern shows itself, and only then learns the name of the idea. It is live at offschool.site for SSC Physics, Chemistry, Biology, Higher Math and ICT, in Bangla and English.
An earlier version of this post described a study planner built around a knowledge graph and spaced repetition. That design never shipped. This post is about the one that did.
Why the simulation comes first
SSC science is usually taught as a definition to memorise and then problems to grind. A student can recite that current divides in a parallel circuit without ever having watched it happen. offSchool reverses the order, and every lesson runs the same loop:
- Problem. A concrete question from the chapter.
- Prediction. The student commits to an answer before touching anything.
- Experiment. A simulation with real controls: move a slider, add a resistor, change an angle, and watch the readouts.
- Reveal. The idea gets its name and its formula, tied to what the student just saw.
- Transfer. Textbook and board-style problems, then a return to the topic on a spaced schedule.
The loop is a state machine whose step order is data, so an explain-first order for younger classes needs no new code.
The architecture in one table
| Layer | What it does | Tech |
|---|---|---|
| Web | Lessons, simulations, practice, the mentor | Next.js static export on Cloudflare Pages |
| Simulations | Run a lesson's scene from a spec | A pure-TypeScript engine and a React player |
| API | Accounts, progress, practice, quotas, the MCP server | Go, PostgreSQL 16 with pgvector, Redis |
| Background jobs | Grading written answers, scheduled work | River, a job queue that lives in Postgres |
| AI | Mentor answers, written-work checks, grading | A private Python service calling Claude Haiku 5.5, with embeddings from OpenRouter |
| Hosting | Everything except the web app | AWS ECS Fargate in ap-south-1, RDS, ElastiCache |
The web app is static files. The API holds every account and every answer, and the AI service has no public address: only the API can reach it. Sign-in is with Google or with an email and password.
Simulations are data, not code
A simulation in offSchool is a SimSpec: a JSON file that names a primitive (a circuit lab, ray optics, logic gates, a Python program to trace line by line) and fills in everything a lesson needs around it. That means the problem, the parameters a student can move, the readouts, the prediction question, hints, the reveal, common misconceptions, transfer problems and checks.
The engine validates every spec in CI. The 252 published simulations come from 51 primitives, so a new lesson on an existing primitive is a content change that can be reviewed like any other file. The same player is bundled into the widget the MCP connector serves to Claude and ChatGPT.
The content was the slow part. The syllabus comes from the 2026 NCTB textbooks, and the first extraction of the chemistry book read two columns as one, so its topic titles were fragments in Bangla as well as English. The 2026 editions also moved topics between chapters, which retired some simulations. Retired content is kept and its ids are never reused, so a student's progress never points at the wrong thing.
The mentor
Students ask the mentor about anything in a chapter, in Bangla, English or Banglish. It runs on Claude Haiku 5.5 in two steps. First the model writes a plan: which teaching move to make (explain, simplify, repair a mistake, hint only, set practice, show a simulation, ask a clarifying question), an outline of the answer, which simulation teaches the same idea, and a few flags. Then it writes the answer from that plan.
Most fixes went into the plan, because a field the model must fill in is harder to ignore than a sentence in a prompt:
- No answers when asked. A student asked for practice questions without answers and got the answers anyway. Holding back the answers is now a field in the plan.
- Beyond the syllabus. Ask about matrices and the mentor should say that goes beyond SSC before it answers. As a prompt rule, it missed about one time in three. As a field in the plan, grounded in the chapter titles of all five books, it passes every case, including two controls that must not be flagged.
- Talking about the student instead of to them. Some early answers opened with "The student only wrote…", the model's reasoning leaking into the reply. A guard now catches that.
Each question also comes with a private note about the learner: their class, Bangla or English version, the months left before the exam, what they can already apply on the topic and the mistakes they made in practice. The mentor skips what they know and aims at the misconception.
An 83-case eval harness grades the mentor before a release ships.
Practice that explains the wrong answers
Practice started with 472 MCQs. By 8 November 2026 the bank held 2,041 problems, 1,804 of them MCQs, labelled easy, medium and hard, with numerical, short and creative questions alongside. Most MCQs now carry a reason for every wrong option, so a student who picks the distractor learns which misconception it was built on. Each new question was solved blind by two separate checkers, and both had to land on the same key before it shipped.
What broke
- The database password changed under a running API. RDS rotates the database password every seven days. The API read it once at startup, so after a rotation every new connection failed and Google sign-in returned an internal error for nearly seven hours. The health check didn't touch the database, so the load balancer saw nothing wrong. The automatic redeploy I had written listened for a CloudTrail event, in an account with no CloudTrail trail. Now the API reads the current password before each new connection and tries the pending one during a rotation, and any failed database login raises an alarm that emails me and redeploys. I proved it by forcing a rotation: 192 of 192 readiness checks passed through it.
- Every long answer stopped at 15 seconds. Mentor answers stream, and the longer ones simply ended mid-sentence. The cause was not the model: the service mesh between the API and the AI service applies a 15-second per-request timeout by default, and nothing had set it higher. Raising that one setting fixed it.
- 17,000 broken Bangla words. The NCTB curriculum PDFs are typed in a pre-Unicode Bijoy font, and the converter misread three codes and the syllables around every reph. I wrote up the four rules that fixed it in a Shahriar Labs note on Bijoy to Unicode.
- The eval tested questions; students hold conversations. The first real conversations found problems the eval had never asked about: a negation ("questions, but no answers"), a complaint about a weak answer, a follow-up that only made sense next to the question before it. The mentor fixes above came from reading those conversations, not from the eval.
Launch
offSchool opened to every student as a public beta in October 2026. On 6 November 2026 at 9 pm Dhaka time it launched publicly with a short Bangla launch film, and the homepage's countdown gave way to the site. It also works from inside Claude and ChatGPT: an OAuth MCP server lets the assistant teach from offSchool's notes, ask its questions one at a time and open a working simulation in the chat. The Shahriar Labs note on offSchool's MCP server explains how that is built.
What I'd do differently
Check the textbook edition before building on it. I extracted the syllabus from one set of books, built simulations against it, and then the 2026 editions moved topics. And put real students in front of the mentor sooner: a handful of real conversations taught me more than weeks of eval cases.
If you are preparing for SSC, try offSchool and tell me where it confused you. The offSchool case study covers the product side.
Questions & answers
Is offSchool live?
Yes. offSchool opened to every SSC student in Bangladesh as a public beta in October 2026 and launched publicly on 6 November 2026. Sign-in is with a Google account or an email and password.
Is offSchool free?
Every simulation, reading note and practice set is free. AI work (mentor answers, checking written work and grading written answers) runs on a monthly allowance, and the free plan includes 30 mentor questions a month. Paid tiers are on a waitlist until payments open.
Which subjects does offSchool cover?
SSC Physics, Chemistry, Biology, Higher Math and ICT, following the 2026 NCTB textbooks, in Bangla and English. HSC is not covered yet.
Which AI model does offSchool use?
Claude Haiku 5.5 through the Anthropic API for every AI task, with embeddings from OpenRouter for searching the reading notes.
