An educational web application for elementary mathematics practice featuring two modes: traditional practice and RPG-style gamified learning.
- Category-based math problem selection (28 categories)
- Addition, subtraction, multiplication, and division
- Progress tracking with localStorage
- Reward image system for motivation
- Bilingual support (English/Slovenian)
- Turn-based RPG combat powered by Pixi.js
- Solve math problems to attack enemies
- Multiple enemy types with unique sprites
- Health bars and battle animations
- TypeScript 5.9 (strict mode)
- Bun - Runtime, bundler, and package manager
- Pixi.js 8.15 - WebGL graphics for RPG mode
- Caddy - Local development server
bun install# Build and watch for changes
bun run dev
# Start local server (in a separate terminal)
bun run caddyThen open http://localhost:3000 in your browser.
bun run buildOutput goes to the dist/ directory.
cat-math/
├── src/ # Main Practice App
│ ├── index.html # Category selection page
│ ├── practice.html # Problem solving page
│ ├── *.ts # Problem generators and logic
│ ├── rewardImages/ # Reward images
│ └── rpg/ # RPG Battle App
│ ├── rpg.html # Battle page
│ ├── *.ts # Battle logic and actors
│ ├── enemies/ # Enemy classes
│ └── assets/ # Sprites and backgrounds
├── scripts/ # Build utilities
└── dist/ # Build output
| Command | Description |
|---|---|
bun run build |
Build entire application |
bun run build:rpg |
Build RPG app only |
bun run dev |
Development mode with watch |
bun run dev:rpg |
RPG development with watch |
bun run caddy |
Start local server on port 3000 |
bun run debug |
Launch Chrome with remote debugging |
AGPL-3.0-only
Damjan Košir