For engineers and recruiters

How KidLearn is built

The stack and the alternatives it beat, the architecture, how AI content is kept behind a human, and how it is tested and shipped. Every claim links to the document it comes from.

01

The stack

One choice per layer. Each tab says what was picked, why, what it costs, and what it beat.

Next.js 16 with the App Router, React 19 and Tailwind CSS v4.

Why
Phones and tablets come first, so pages are built mobile-first. Design tokens live in CSS variables, which lets the kid theme and the parent theme share one set of components and swap at runtime without a line of theme logic in JavaScript.
What it costs
Every route is rendered on demand, because the root layout reads the language cookie on the server. That trades static caching for a Bangla visitor never seeing a flash of English.
What else was considered
A plain Vite single-page app (no server rendering, so a slow phone sees a blank screen longer) and Remix (fewer people know it, and Vercel hosts Next.js with no configuration).

Read the full document (opens in a new tab)

02

Architecture

The shape of the system: how the code is organised, how a request travels, and the rules that keep content and rewards honest.

One pnpm workspace built with Turborepo: two apps and six packages.

Workspace dependency diagram: apps/web imports packages/ui, i18n and types; apps/server imports db and types; the planned apps/mobile will import i18n, tokens and types; ui imports tokens; i18n and db import types.appsapps/webNext.jsapps/mobileplanned · Expoapps/serverExpresspackagesuiweb onlyi18nen · bn stringsdbPrismatokensdesign valuestypesZod schemas and API contractsconfigshared tsconfig basesimportsplanned
What imports what. The packages also share tsconfig bases from packages/config.
Why
Types, strings, design tokens and the database client are shared, so a change to an API contract breaks the web app's type-check in the same pull request. Dependencies point one way: apps import packages, never the reverse.
What it costs
One lockfile and one CI job for everything, so a slow test anywhere slows every pull request. packages/ui is web-only by decision, because its Radix primitives need a browser DOM.
What else was considered
Separate repositories for web and API (contracts would drift between releases) and Nx (more features than two apps need).

Read the full document (opens in a new tab)

03

AI content

AI drafts lessons, stories, quizzes, narration and pictures. It reaches a child only after a person approves it.

Two doors in, one gate out.

Why
AI content enters through Gemini, run by KidLearn, or through an admin's own assistant over MCP. Both doors share the same prompts, the same Zod schemas and the same save path, and both end in the same review queue. Every generation keeps an audit trail: inputs, prompts, raw attempts, token use, who asked and who approved.
What it costs
Two code paths to keep consistent. Sharing the rule book, the schemas and the persistence keeps the difference to who writes the JSON.
What else was considered
Gemini only (admins with their own subscription would be limited to a small daily budget) and MCP only (admins without an AI subscription could not generate anything).

Read the full document (opens in a new tab)

04

Safety by design

No social features
No chat, no messages and no public profiles. Nobody can contact a child.
No way out of the child's screens
The child's screens contain no external links, and a test fails if one appears, even inside a lesson title written in the CMS.
Consent before profiles
The server refuses to create a child profile or record progress until a parent has given consent.
No family data in AI prompts
Prompts carry curriculum text and the admin's request, nothing else. A test asserts that no MCP tool can read child, parent, progress or account data.
Full deletion
Deleting an account erases everything about the family in one database transaction. There is no soft delete and no grace period.
05

Quality and shipping

How a change is checked before it merges, and how it reaches production.

Biome for lint and formatting, TypeScript in strict mode everywhere.

Why
One fast tool lints, formats and sorts imports across the whole repository, so there is no ESLint and Prettier configuration to keep in step. tsc type-checks every package with no implicit any.
What it costs
Biome has fewer rules and plugins than ESLint, and it does not catch Tailwind class issues; the editor's Tailwind extension does.
What else was considered
ESLint with Prettier (two tools, two configurations, and several times slower on a monorepo).

Read the full document (opens in a new tab)

06

Read further