Ilm AI is a multi-tenant tutoring platform built around one rule: the tutor asks before it answers. A teacher describes a subject and topic once, and the platform generates a full module, lessons, a quiz and an interactive coding challenge, for a student to work through with an AI tutor that teaches by guided questioning rather than handing over the answer. It went from an empty repository to a 26-model multi-tenant platform in about 12 days, git-verified, and the only school running on it today is a demo school.
The problem
Two problems sit behind this build. First, turning a syllabus topic into a full teaching module used to be manual work: a teacher writing lessons, quizzes and a coding challenge by hand for every topic they wanted to cover, with no fast way to check the result against the actual curriculum. Second, the platform's earlier prototype stored every student's progress in the browser's local storage, so a cleared cache, a new device or a different browser wiped a student's history clean. There was no student identity, no persistent progress and no scoring, flagged as critical gaps in the platform's own planning notes. Ilm AI's build answers both: a teacher generates a full module from a topic, and every student's progress lives on the server against their own account, not their browser.
What we built
A Next.js platform on Prisma, with 26 database models across four domains: multi-tenant identity (school, user, account, session), learning content (module, lesson, challenge), a six-level curriculum hierarchy running from framework down to individual topic, and gamification (classrooms, teams, achievements, streaks). Curriculum is seeded natively rather than added later: the Western Australian ATAR syllabus and the Australian Curriculum version 9 sit in the schema from the start, across ten subject-area seed files totalling more than 16,000 lines. A teacher runs an AI interview describing what they want to teach, and the platform generates a system prompt, lessons, quizzes and an interactive coding challenge as structured, typed output, not free text, using Gemini through the Vercel AI SDK with schemas checking the shape of every result. Thirty-five API routes and 93 components sit behind six distinct AI-generation endpoints, seven gamification endpoints and a full curriculum browser. The whole shape came together in about 12 days from an empty repository, built across seven incremental schema migrations rather than one big design pass.
How it runs
A teacher runs the interview and the platform drafts a module: lessons, a quiz and a sandboxed coding challenge. Nothing reaches a student unapproved. The module sits in draft until a teacher submits it and an admin approves or rejects it, with a reason recorded either way. Once assigned to a classroom, a student moves through lesson, then quiz, then challenge, and can chat one to one with the tutor for open-ended help outside the structured path. The tutor's default mode is Socratic: it asks a guiding question before it gives an answer, matching the platform's own framing as a thinking tutor rather than an answer machine. Coding challenges run sandboxed in the browser and report back through a single completion contract, scored on a transparent formula, a base score, minus a hints penalty, minus an attempts penalty, times a streak multiplier, plus a time bonus, so nothing about the mark is hidden from the student.
Under the hood
Multi-tenancy sits in the schema, not bolted on afterwards. Every core model carries a school ID foreign key with cascading deletes, and a composite unique constraint on email and school ID means the same teacher's email can exist at two different schools without colliding. Subdomain-based middleware resolves the tenant on every request and validates it server-side before any query runs. Authorisation is centralised in one module, requireAuth, requireRole, canAccessModule, canManageClassroom, rather than scattered checks per route. Gamification is deliberately restrained: the design commits to reward-only mechanics, described in its own planning notes as never punishing, only rewarding less, streak freezes so a missed day doesn't erase progress, a private or opt-out mode for students who don't want to be on a leaderboard, and full transparency on how points are calculated. That is a people-first design choice as much as an engineering one.
What changed
Ilm AI moved from a client-only prototype that lost a student's progress on a cache clear to a server-backed, multi-tenant platform with real authorisation and a human approval gate on every generated module, in about 12 days of build time. What exists today is a demo school running the full loop end to end. No school is live on the platform yet, and that is stated here plainly rather than dressed up. The next step is a real school, not a bigger demo.
