Where kids ages 4โ16 don't just use AI โ they make with it. ๐จ๐ป๐ฎ
AI storytelling ยท coding ยท game design ยท phonics ยท escape rooms โ a gamified learning playground plus live class booking for parents.
| Homepage | Kids' Dashboard | Kid Login |
|---|---|---|
![]() |
![]() |
![]() |
| Story Builder | Talking Buddy | AI Art Studio |
![]() |
![]() |
![]() |
| AI Phonics | AI Escape Rooms | Brain Arcade |
![]() |
![]() |
![]() |
AI Kids Academy is a kids' AI education portal that combines a gamified learning playground with a class-booking platform for parents. Children log in to their own colourful dashboard to play AI-powered activities and earn points and badges; parents browse programs, book classes online, and track their kids' progress; admins manage the whole catalogue from a back-office.
| Area | What it does |
|---|---|
| ๐ญ Three roles | Learners (kids) log in with a username + password; Parents & Admins sign in with Google (or credentials). Each role lands on its own dashboard. |
| ๐งฉ AI activities | Seven play-at-home games in the kid playground: Story Builder (branching, AI-illustrated tales + "write your own"), AI Phonics (listen-and-match), Talking Buddy (voice/text AI chat), AI Art Studio (paint an idea, then jigsaw it), Code Puzzles, AI Escape Rooms and Brain Arcade card games โ each awarding points and badges. |
| ๐ Gamification | Every activity awards a score; kids collect badges and climb an opt-in leaderboard. |
| ๐จโ๐ฉโ๐ง Parent dashboard | Link multiple kids, see activities completed, total scores, badges, and recent activity per child. |
| ๐ Online booking | Parents book a class seat for a child in seconds. |
| ๐ณ PayNow payments | On confirmation, the system generates a dynamic Singapore PayNow QR (EMVCo SGQR) and emails it to the parent. |
| ๐ค Agentic auto-close | When a class hits its max students it auto-closes and an AI routine drafts the "class full" notifications for parents + admin. |
| ๐ ๏ธ Admin back-office | Manage programs, classes (open/close/edit/delete), bookings (confirm / mark-paid / cancel), and kidโparent links. |
| ๐ฌ WhatsApp | Floating click-to-chat button for instant parent enquiries. |
| Category | Technologies |
|---|---|
| Framework | Next.js 16 (App Router, Server Actions), React 19 |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 4 (bright kids theme + dark admin theme), Framer Motion, Fredoka / Nunito fonts |
| Database | PostgreSQL 16 + Drizzle ORM |
| Auth | Auth.js v5 (Credentials + Google OAuth), JWT sessions, role-based access |
| AI/LLM | Claude Agent SDK (CMS chatbot, admin AI Assist, agentic class-close) ยท Google Gemini for the kids-games text & chat ยท NVIDIA FLUX + Cloudflare Flux for kid-safe image generation |
| Payments | PayNow QR generation (EMVCo SGQR via qrcode) |
| Gmail OAuth (transactional booking emails) | |
| Security | bcrypt password hashing, AES-256-GCM encrypted credential store |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser (clients) โ
โ Public site ยท Kid playground ยท Parent dash ยท Admin CMS โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ Next.js App Router (RSC + Server Actions)
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โ Auth.js v5 (role guard: learner / parent / admin) โ
โ โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โ
โ โ Booking + โ AI activities โ Gamification โ Admin CRUD โ โ
โ โ PayNow QR โ (Claude SDK) โ scores/badge โ programs/... โ โ
โ โ + agentic โ โ leaderboard โ โ โ
โ โ auto-close โ โ โ โ โ
โ โโโโโโโโฌโโโโโโโโดโโโโโโโโฌโโโโโโโโโดโโโโโโโฌโโโโโโโโโดโโโโโโฌโโโโโโโโโโ โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โ โ โ โ
โโโโโโโโผโโโโโโโ โโโโโโโผโโโโโโโ โโโโโโโผโโโโโโโ โโโโโโโผโโโโโโโโ
โ PostgreSQL โ โ Claude โ โ Gmail โ โ PayNow QR โ
โ (Drizzle) โ โ Agent SDK โ โ OAuth โ โ (SGQR) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
ai-kids/
โโโ src/
โ โโโ app/
โ โ โโโ page.tsx # Bright public homepage
โ โ โโโ login/ # Kid + Parent/Admin login tabs
โ โ โโโ dashboard/ # Role dispatcher
โ โ โโโ programs/ # Catalog + program detail
โ โ โโโ book/[classId]/ # Booking flow
โ โ โโโ parent/ # Parent dashboard (kids, bookings, add child)
โ โ โโโ learn/ # Kid playground (activities, leaderboard)
โ โ โ โโโ storytelling/ # Story Builder + write-your-own
โ โ โ โโโ phonics/ # listen-and-match phonics games
โ โ โ โโโ buddy/ # Talking Buddy (AI voice/text chat)
โ โ โ โโโ art/ # AI Art Studio โ jigsaw
โ โ โ โโโ code-puzzles/ # robot path puzzles
โ โ โ โโโ escape-room/ # top-down escape rooms
โ โ โ โโโ cards/ # Brain Arcade card games
โ โ โ โโโ stories/ gallery/ # saved storybooks + artwork
โ โ โ โโโ leaderboard/ # opt-in scores
โ โ โโโ admin/ # Back-office (programs/classes/bookings/people)
โ โ โโโ api/learn/ # Activity APIs (storytelling, phonics, buddy, art, cards, story-image, score)
โ โโโ components/
โ โ โโโ public/ # SiteHeader, SiteFooter
โ โ โโโ portal/ # SignOutButton, shared portal UI
โ โ โโโ ui/ # WhatsAppButton, ...
โ โโโ db/schema.ts # Drizzle schema (programs, classes, bookings, โฆ)
โ โโโ lib/
โ โโโ auth.ts / portal-session.ts # Auth + role guards
โ โโโ paynow.ts # EMVCo SGQR QR generator
โ โโโ booking.ts # Confirm โ PayNow email โ agentic auto-close
โ โโโ ai.ts # Claude Agent SDK wrapper (with fallbacks)
โ โโโ activities.ts # Completions + badge awards
โ โโโ portal-queries.ts # Dashboard + leaderboard queries
โโโ scripts/seed-portal.ts # Seeds admin, demo parent + kids, programsโฆ
โโโ drizzle/ # SQL migrations
โโโ .env.example
- Node.js 22+
- PostgreSQL 16 (local or hosted, e.g. Neon/Supabase)
# 1. Clone
git clone https://github.com/alfredang/ai4kids.git
cd ai4kids
# 2. Install (claude-agent-sdk needs legacy peer resolution)
npm install --legacy-peer-deps
# 3. Configure environment
cp .env.example .env
# set DATABASE_URL, AUTH_SECRET (openssl rand -base64 32),
# GOOGLE_CLIENT_ID/SECRET, ADMIN_EMAIL/PASSWORD, PAYNOW_UEN, WHATSAPP_NUMBER
# 4. Create the schema (db:push is broken on local PG 18 โ generate + migrate instead)
createdb ai_kids
npm run db:generate # generate a migration from src/db/schema.ts
npm run db:migrate # apply it
# 5. Seed demo data (admin, parent, kids, programs, classes, activities)
npm run seed:portal
# 6. Run
npm run dev # http://localhost:3080| Role | Login |
|---|---|
| Admin | admin@โฆ / your ADMIN_PASSWORD โ at /admin/login |
| Parent | parent.demo@aikids.local / parent123 |
| Kids | maya-star / play123 ยท ethan-rocket / play123 |
The app works fully offline with graceful fallbacks. To go live, add credentials in Admin โ Settings โ Credentials (encrypted store):
anthropic_auth_token(ansk-ant-oat-โฆsubscription token) โ powers AI stories, phonics word-sets and the agentic class-close. Without it, deterministic fallback content is used.- Gmail OAuth (
gmail_user,gmail_client_id,gmail_client_secret,gmail_refresh_token) โ sends the PayNow booking emails. Without it, the QR still renders in the parent dashboard.
Built output: "standalone" โ deploy as a Docker container (Coolify / Railway / Fly.io) or to Vercel + Neon/Supabase Postgres.
docker build -t ai-kids .
docker run -p 3080:3080 --env-file .env ai-kidsSet DATABASE_URL, AUTH_SECRET, AUTH_URL, NEXT_PUBLIC_SITE_URL, and Google OAuth env vars in your hosting platform.
- Fork the repo
- Create a feature branch:
git checkout -b feature/amazing - Commit your changes:
git commit -m "feat: add amazing" - Push and open a Pull Request
Tertiary Infotech Academy Pte. Ltd.
- Backend foundation derived from the in-house ai-cms platform
- Built with Next.js, Drizzle ORM, Auth.js and the Anthropic Claude Agent SDK
โญ If this project sparked some curiosity, give it a star!








