A fun, gamified learning app for 10โ11 year olds โ spelling games, maths games, and a progress garden that grows as you learn. No scores, no timers, no pressure โ just encouragement and delight.
Built with love by a parent who wanted something better than flashcards. ๐
- ๐ Word Search โ find words hidden in a grid
- ๐ Memory Match โ classic card-matching with spelling words
- ๐ Word Scramble โ unscramble the letters
- โ๏ธ Missing Letters โ fill in the blanks
- ๐ค Word Builder โ hear a word, build it letter by letter
- ๐ฏ Spell Catcher โ catch the correct spelling as it flies by
- ๐ Word Volcano โ words erupt, match them before they vanish
- ๐ฉ Wordal โ Wordle-style guessing with your spelling words
- ๐ข Times Table Explorer โ interactive multiplication grid with explore, practice, and pattern modes
- ๐ซง Number Bubbles โ pop the right answer
- โฐ๏ธ Math Mountain โ climb to the top by solving problems
- ๐งฉ Puzzle Pieces โ reveal a picture by answering questions
- ๐ธ Number River โ hop across lily pads to the right answer
- ๐งญ Math Maze โ navigate through rooms by solving equations
- ๐ Number Cascade โ answers cascade down, catch the right one
- ๐ Spot Match โ find the matching icon between two cards (unlockable)
- ๐ป My Garden โ a garden that grows as you learn (flowers, trees, butterflies!)
- ๐ Achievements โ 10 unlockable badges (First Sprout, Word Wizard, Maths Maestro, and more)
- ๐ฎ Game unlock system โ fun games are unlocked by earning correct answers across all games
- โญ Streak tracking โ encourages daily practice
- ๐ฌ Feedback โ students can submit feedback from the app
- ๐ Admin area โ manage spellings, times tables, difficulties, settings, view progress, read feedback
# Clone and install
git clone <your-repo-url> spellbound
cd spellbound
npm install
# Build and run
npm run build
npm startThen open http://localhost:3000 in your browser. That's it!
On first launch, SpellBound automatically:
- Creates the SQLite database at
data/spellbound.db - Sets up all tables
- Seeds a default profile called "Learner"
- Sets the admin password to
spellbound123
No configuration needed โ it just works.
Navigate to the admin area via the sidebar or go to /admin.
- Default password:
spellbound123 - To change it: Log in โ Settings โ Update password
- Sessions last 24 hours and are stored in memory
From the admin dashboard you can:
- ๐ Manage spelling lists (create, edit, archive, activate)
- ๐ข Configure which times tables and difficulty levels are available
- ๐ View learning progress and statistics
- ๐ฌ Read student feedback
- โ๏ธ App settings (change password, reset progress)
โ ๏ธ Please change the default password on first use!
Fun games (like Spot Match) are unlocked by playing spelling and maths games. Every correct answer counts toward unlocking milestones. For example, Spot Match unlocks after 20 correct answers across any game.
This gives kids a motivating reason to practise โ the more they learn, the more games they unlock! The unlock status is visible on the Games hub page, where locked games show their requirements.
There are two ways to add spelling words:
- Log in to the admin area
- Go to Manage Spellings
- Create a new list with a name (e.g., "Week 12")
- Add words (with optional hints)
- Activate the list to make it available in games
- From the spelling hub, click "Add My Words"
- Or go directly to
/entry - Type a list name and add words (minimum 3)
- The list is automatically created and activated
| Technology | Purpose |
|---|---|
| Next.js 16 (App Router) | Full-stack React framework |
| TypeScript | Type safety |
| Tailwind CSS v4 | Utility-first styling |
| Framer Motion | Animations and transitions |
| Phosphor Icons | Beautiful duotone icon library |
| SQLite via better-sqlite3 | Local database |
| bcryptjs | Password hashing |
spellbound/
โโโ data/ # SQLite database (auto-created)
โโโ public/ # Static assets
โโโ src/
โ โโโ app/
โ โ โโโ page.tsx # Home page
โ โ โโโ layout.tsx # Root layout with sidebar
โ โ โโโ spelling/ # Spelling hub + 8 game pages
โ โ โโโ maths/ # Maths hub + 7 game pages
โ โ โโโ games/ # Fun games hub + Spot Match
โ โ โโโ progress/ # My Garden progress page
โ โ โโโ entry/ # Child word entry page
โ โ โโโ feedback/ # Student feedback page
โ โ โโโ dev/ # Dev tools + icon library
โ โ โโโ admin/ # Admin dashboard
โ โ โ โโโ spellings/ # Manage spelling lists
โ โ โ โโโ tables/ # Configure times tables
โ โ โ โโโ progress/ # View learning progress
โ โ โ โโโ feedback/ # Read student feedback
โ โ โ โโโ settings/ # App settings (password, reset)
โ โ โโโ api/ # API routes
โ โ โโโ achievements/
โ โ โโโ admin/ # login, logout
โ โ โโโ entry/
โ โ โโโ feedback/ # Student feedback
โ โ โโโ maths/tables/# Times table config
โ โ โโโ progress/
โ โ โโโ settings/
โ โ โโโ spellings/ # CRUD + activate
โ โ โโโ unlocks/ # Game unlock status
โ โโโ components/
โ โ โโโ ui/ # Reusable UI components
โ โ โโโ svg/ # Custom flower, bee & rainbow SVGs
โ โ โโโ layout/ # Sidebar navigation
โ โโโ lib/
โ โโโ db.ts # Database access layer
โ โโโ schema.sql # Database schema (7 tables)
โ โโโ achievements.ts # Achievement definitions
โ โโโ auth.ts # Admin authentication
โ โโโ maths-helpers.ts # Question generation + utilities
โ โโโ sounds.ts # Synthesised sound effects + speech
โ โโโ unlocks.ts # Fun game unlock definitions
โโโ Dockerfile # Multi-stage Docker build
โโโ docker-compose.yml # Container orchestration
โโโ deploy.sh # Home server deploy script
โโโ package.json
โโโ tsconfig.json
# Run in development mode (with hot reload)
npm run dev
# Run on a custom port
PORT=3456 npm run dev
# Lint the codebase
npm run lint
# Run tests (211 tests)
npm test
# Build for production
npm run build
# Start the production server
npm start- Location:
data/spellbound.db(relative to project root) - Auto-created on first run
- Uses WAL journal mode for performance
- Foreign keys are enabled
SpellBound works without any environment variables. Optional:
| Variable | Default | Description |
|---|---|---|
NODE_ENV |
development |
Set to production for secure cookies |
PORT |
3000 |
Server port (Next.js default) |
SpellBound is designed to run on a home server โ a Raspberry Pi, an old laptop, a NAS, or any machine on your local network.
# Build once
npm run build
# Run it
npm start
# Or with a custom port
PORT=8080 npm startFor auto-start on boot, use your OS's service manager (systemd, launchd, etc.) or a process manager like pm2:
npm install -g pm2
pm2 start npm --name spellbound -- start
pm2 save
pm2 startup๐ก Tip: Access from other devices on your network at
http://<server-ip>:3000
SpellBound includes a production-ready Docker setup for easy deployment.
# Build and run locally with Docker
docker compose up --build
# Or deploy on your home server
./deploy.shHow it works:
- Multi-stage Dockerfile produces a lean standalone Next.js image
- GitHub Actions CI pipeline (on push to
main) runs tests, builds the Docker image, and pushes to GitHub Container Registry (GHCR) deploy.shpulls the latest image and restarts the container- SQLite database is persisted via a Docker volume (
spellbound-data) - Puzzle images are bind-mounted from the host for easy updates
- API Reference โ Complete REST API documentation
- AGENTS.md โ Guide for AI coding agents working on this codebase
MIT โ do whatever you like with it. If it helps your kids learn, that makes me happy. ๐ป