-
-
61 / 51 / 4 verification slide
-
role permissions, support circle, studio handoff, and the 2-request AI ops board
-
teacher feedback, next question, guided-to-light scaffold decision
-
the six-step evidence trail
-
admin: four setup steps complete, metrics
-
the four coach questions with tryThis experiments and SEC citations
-
teacher: Rainwater Resilience Lab command view
-
the GPT-5.6 provenance card (model, prompt version, citations, cost)
-
landing page
-
system architecture slide
-
branded hero card
-
parent mobile view composed on a brand panel with the privacy message
Kanni | കണ്ണി
Inspiration
Here is a small moment that explains the whole project. A Class 8 student estimates how much rain a school roof can catch. She multiplies $160 \text{ m}^2 \times 100 \text{ mm} = 16{,}000$ litres, then "adds 80 percent efficiency" and writes 16,080 litres. A chatbot would hand her the correct 12,800 in two seconds. She would copy it, feel fine, and learn nothing about her own mistake.
That moment is where most school AI goes wrong. It answers first, so the learner becomes a passenger.
We started Kanni from the other end: the teacher. A better student chatbot helps one learner for one moment. A better planning tool helps one teacher prepare several routes through the same goal, anticipate the confusion before it happens, read how a student's thinking changed, and send one useful idea home to a family. So we built a product where AI does preparation and questioning, teachers make every decision, and the student has to do the actual thinking.
What it does
Kanni connects four people around one curriculum-grounded "learning studio."
- The administrator creates real accounts, maps each student to a responsible teacher and parent, and manages versioned curriculum packs. They see workflow status and AI costs, never private student work.
- The teacher picks a source the school is allowed to use, sets a goal and driving question, and gets a complete plan: success criteria, lesson sequence, misconception probes, differentiated routes, maker choices, and a family activity.
- The learner works through a fixed sequence: predict, build a first version, critique it, revise it, explain the change, reflect. Only after a real first attempt can they ask the thinking coach for help, and the coach replies with questions and small experiments, never the answer. In our saved flow, it asks things like "what units should appear after each multiplication?" and the student finds the 80 percent error herself. Her revision lands on 12,800 litres, with covered tanks, a first-flush path, and an overflow route she added on her own.
- The parent receives one teacher-reviewed home activity and one next question. The private draft, the AI text, and anything resembling a score or diagnosis never reach that page.
The teacher's review decision is not a label. It changes one concrete thing: how much support the next studio starts with (guided, light, or independent).
How we built it
Next.js 16, React 19, strict TypeScript, PostgreSQL 18, Prisma 7, and Zod, deployed with Docker. The domain is a versioned state machine: every transition checks school, role, relationship, expected status, and record version. Privacy is enforced in the database queries themselves. The parent and administrator selects simply never include the submission fields, so there is nothing to leak at the page layer.
The RAG path is deliberately small. Curriculum text is normalized, split into checksummed sections, and retrieved locally by relevance. GPT-5.6 Luna (through OpenRouter) handles two bounded requests per studio: one teacher plan drafted from up to six retrieved sections, and one set of thinking-coach questions built from the student's first attempt plus at most four sections. Every response must pass a strict Zod schema, and every citation must point at a section that was actually retrieved. One invented source ID and the entire draft is discarded. A second gate rejects answer-revealing language even when the structure is valid.
How we collaborated with Codex
The first version of this project was a static fractions lesson with four screens. It proved nothing. In one long Codex thread, we tore it out and rebuilt around the studio idea: new schemas, forward migrations, first-run school setup, role mapping, the plan editor, the evidence flow, the OpenRouter boundary, the evaluation set, and the test suites. Codex wrote fast; we spent our time on the decisions that shaped the product. Teachers are the lever. AI never completes student work. Production starts empty. Nothing calls a provider automatically.
The best Codex moment was a bug hunt. Our clean-install browser test kept failing: setup looked correct, but the database stayed empty. Codex traced it to Prisma's PostgreSQL adapter choking on the void returned by pg_advisory_xact_lock, which silently rolled back the whole setup transaction. The fix kept the lock but called it through the execution API. The same test has passed ever since.
Challenges we ran into
Making agency concrete was the hardest design problem. A slogan about critical thinking costs nothing. A data model has to pay for it. That is why the submission stores six separate pieces of evidence instead of one final answer.
Privacy across four roles was the second. A parent deserves context, not surveillance. We ended up writing separate relational select shapes per role and then asserting in browser tests that a unique sentence from the student's draft appears nowhere it shouldn't.
Content rights changed the retrieval design too. Being able to read a textbook online is not permission to copy it. Kanni accepts original, CC BY, public-domain, or written-permission text, and forces known SCERT hosts to link-only treatment.
What we learned
RAG is mostly not retrieval. It is rights, versions, checksums, allowlisted citations, failure behavior, and a human deciding what ships. We also learned that AI support needs a removal plan: Kanni records whether the student opened help and lets the teacher fade support studio by studio. And a clean-database test tells the truth in a way seeded demos never do. Our main browser test builds the entire school through the same screens a real school would use.
Today the project runs 61 unit tests, 51 deterministic evaluation cases, and a four-role browser flow, all without spending a single AI credit.
What's next
Before real school use: OIDC or SAML, MFA, password recovery, retention and deletion tools, and independent security and child-safety review. On the learning side: school-approved curriculum collections, embedding retrieval for larger packs, whole-class planning, and Malayalam copy reviewed by native speakers. Kanni currently supports one school per installation, Classes 6 to 9, and makes no claims about academic outcomes. It claims something smaller and testable: the student did the thinking, and everyone responsible can see it.
Built With
- axe-core
- bcrypt
- codex
- docker
- gpt-5.6
- next.js
- node.js
- openai
- openrouter
- playwright
- postgresql
- prisma
- rag
- react
- tailwindcss
- typescript
- vercel-ai-sdk
- vitest
- zod
Log in or sign up for Devpost to join the conversation.