For grown-ups · by Nick Castro
How I built How AI Works for Kids
Kids already use AI every day. Almost none of them know how it works. I built this site so kids ages 6–10 can learn it the way I teach grown-ups: by teaching a tiny AI themselves, watching it guess, and catching it being wrong.
This page is for grown-ups. Kids can head to the lesson trail.
The problem
Kids talk to voice assistants, get videos picked for them, and see AI-made pictures, often before they can read well. Most explanations either call it magic or bury it in jargon. I wanted my sons to really get three things: AI learns from examples, it makes guesses, and those guesses can be wrong.
Who it’s for
- Kids ages 6–10. Short stories, hands-on games, and read-aloud everywhere, so pre-readers can play too.
- Parents. No setup and no sign-up, a question to ask after each lesson, and a parent guide.
- Teachers. No logins for shared devices, plus a free print-and-go Lesson 1 kit.
What’s live today
- 15lessons in 2 sections (7 + 8)
- 10question final quiz, with retakes and no fail screen
- 2printable certificates
- 1free teacher kit (8-page PDF for Lesson 1)
- 1companion picture book
- 27automated unit tests
The companion book is The Smart Soccer Ball Mystery: Machine Learning for Kids – Book 1, which I wrote with Nancy Castro. I don’t publish traffic numbers here.
How I used AI and other tools
Next.js, TypeScript, and Tailwind on Vercel
The site is a Next.js App Router app written in TypeScript, styled with Tailwind CSS v4 plus a small hand-written design system, and hosted on Vercel. Almost every page is static, so it loads fast on old school tablets.
A GitHub pull-request workflow
Every change lives on its own branch and pull request. Vercel builds a preview for each one, and I check it on my phone and laptop (often with my kids) before I merge anything.
AI coding assistants
I used AI coding assistants to write and refactor code, tests, and first drafts of copy. I set the goals and the kid-safe rules, review every change, and decide what ships. Kid quotes are never written by AI.
Tiny AI models that run in the page
The games run real, very small versions of real ideas, written in TypeScript: a nearest-neighbor sorter, a next-word counter, and a one-clue decision rule. No game calls an AI service, so kids never chat with a live AI.
Google Veo for the Lesson 8 video
The 13-second cartoon in Lesson 8 was made with Google Veo. It is labeled as AI-made right under the player, has captions, never autoplays, and is served from this site with no third-party player.
GA4 and Search Console
Google Analytics 4 counts anonymous visits and a lesson-complete event with no names or kid text. Search Console shows how parents and teachers find the site. Quiz answers and progress are never sent anywhere.
Automated checks on every release
GitHub Actions runs on every pull request: lint, 27 unit tests for the tiny models and lesson logic, a production build, and a crawl of the built site that fails on broken links, missing alt text, or leftover placeholder text. I also run browser scripts at phone and desktop sizes (tap targets of at least 48px, sideways scrolling, console errors, a next step on every badge screen) and Lighthouse before each merge.
How a change ships
The same loop for every change, from a one-word fix to a new lesson. Automated steps catch mistakes early; I make the call on anything a kid will see.
- Done by me:
Plan
I write the goal, the kid-safe rules, and what “done” means.
- Done by me:
Build on a branch
I build it with AI coding assistants, then read and edit every change.
- Done by me:
Open a pull request
Every change goes through a GitHub pull request. Nothing goes straight to the live site.
- Automated:
CI checks
GitHub Actions: lint, 27 unit tests, production build, and a broken-link crawl.
- Automated:
Preview deploy
Vercel builds a separate preview site for the pull request.
- Done by me:
Browser + Lighthouse
I run browser scripts at phone and desktop sizes, and Lighthouse on the key pages.
- Done by me:
Review
I try the preview on my phone and laptop, often with Nathan and Nolan.
- Done by me:
Merge and ship
When I approve, I merge to main and Vercel deploys the live site.
The CI workflow (.github/workflows/ci.yml) and the site crawler (scripts/check-site.mjs) are in the public GitHub repo.
Key decisions
Tested with my sons
Every lesson is tested with Nathan, 8, and Nolan, 11. Their real feedback led to read-aloud buttons on every story, question, and answer, so pre-readers can play alone, and to bigger tap targets for small fingers.
Kid-safe by design
No accounts, no kid data, no chat, and no ads. Progress is saved only in the browser. The link to my book lives on grown-up pages only, never inside a lesson.
Kid words first, jargon optional
Lessons use plain words like "guess" and "lopsided data". The real term shows up as an optional "grown-up name" chip in the fourteen-word Word Book, so kids learn the idea before the label.
Honest about AI
The site teaches that AI guesses and can be wrong, labels its own AI-made video, and treats AI products neutrally: every helper gets the same short, factual line.
“Pip is cool! I learned that AI works by guessing, and sometimes it's wrong.”
“It was fun. It felt like I was teaching the AI, and then I realized that's how AI actually learns.”
Quotes are word for word, shared with my sons’ okay. How we test with kids.
Quality checks
Lighthouse scores on mobile, measured on the live site on October 14, 2026. Each category is out of 100; performance is the middle score of 3 runs, since it varies a little each time. Scores change as the site changes, so treat these as a snapshot from that day.
| Page | Performance | Accessibility | Best practices | SEO |
|---|---|---|---|---|
| Home | 96 | 100 | 100 | 100 |
| A lesson (Lesson 4) | 92 | 100 | 100 | 100 |
| This page | 95 | 100 | 100 | 100 |
Want something like this?
I build AI-powered tools, workflows, and websites that make AI make sense to real people. See more of my work, or say hi.