
KHALIL — KIDS CODING
Code should feel like discovery.
An education platform teaching children aged 7–14 programming and AI through play: a custom DOM-based block engine with a step interpreter, validator and Python/JavaScript transpiler, a ten-world curriculum, gamification, parent and teacher journeys and an AI tutor that asks rather than answers.
Khalil is a pnpm + Turborepo monorepo: apps/web on Next.js 15 with dnd-kit, Framer Motion and Zustand; apps/api on NestJS 11 with Prisma, argon2, helmet and throttling; packages for the blocks engine, curriculum, gamification, economy and UI. The block engine is DOM rather than SVG — native RTL, better touch, free accessibility, 60 KB instead of 600 KB — and the same interpreter runs on client and server so a solution never passes locally and fails validation.
The curriculum is typed data guarded by 160 golden tests: every reference solution passes, every starter fails, every challenge has exactly four ordered hints, every string is bilingual, and the word for error never appears in a child-facing message. A child has no account — only a profile inside a parent's account — with zero user-to-user channels and an immutable reward ledger with no real-money purchases. The README flags an open defect list, chiefly that challenge solutions currently ship to the browser on the public /try page.
Overview
Ten worlds, a mascot with eight emotional states, and an engine that turns dragged blocks into real Python and JavaScript.

Architecture
Ten decisions
- 01DOM, not SVG, for the block editor
- 02One interpreter on client and server
- 03AI asks, never answers — the hint ladder is enforced by the service
- 04The platform works with no AI key at all
- 05A single event bus for all gamification
- 06An immutable ledger; balances recomputable from zero
- 07No real-money currency purchases — reward boxes stay out of loot-box regulation
- 08Only a nickname and age are ever collected about a child
- 09The coding stage is always LTR — a coordinate world is not text
Design
Royal blue, sky, purple, coral.
Baloo 2 for display, IBM Plex Sans Arabic for Arabic body, Inter for English, JetBrains Mono with ligatures disabled for code. Ten world colours, eight block-category colours, four rarity tiers — all from design/tokens.json.
- —#3D5AFE royal blue · #38BDF8 sky · #8B5CF6 purple
- —#FBBF24 yellow · #22C55E green · #FB7185 coral
- —Khalil Bot — 8 states
Open work
The repository's own audit lists 21 critical defects with a six-phase, twenty-week plan to reach zero — the first being that 42 challenge reference solutions ship to the child's browser and the CI gate meant to catch it passes falsely. The plan, not the marketing, is what is published here.