EduQuest is a learning platform for elementary school students that provides various educational content through specialized "Quest" modules. Built with Hono for SSR on Cloudflare Workers, it features a shared domain logic managed in a monorepo with pnpm workspaces.
Hono |
TypeScript |
|
Vitest |
Playwright |
Codecov |
|
Cloudflare |
AWS |
Google Cloud |
|
Claude Code |
OpenAI |
|
Terraform |
tfsec |
Homebrew |
mise |
|
just |
GitHub |
Prettier |
pre-commit |
EditorConfig |
pnpm |
yamllint |
|
|
cspell |
textlint |
gitignore.io |
Biome |
- MathQuest (
/math): Arithmetic practice with grade-level presets and themed exercises. Users can select calculation types, toggle settings (sound effects, intermediate steps), and practice with a keypad UI. - KokugoQuest (
/kokugo): Japanese language learning organized by grade level (Coming Soon) - GameQuest (
/game): Brain-training mini games for pattern recognition, spatial reasoning, and memory (includes Sudoku and the Stellar Balance tile puzzle) - ClockQuest (
/clock): Time-reading practice with analog and digital clocks (Coming Soon)
The platform features an EduQuest hub page (/) where users can navigate to each Quest module. Question generation and grading are handled by @edu-quest/domain and are reused by the API layer (/apis/quiz).
The repository uses the following tools:
- Homebrew: Manages system-level development tools for macOS/Linux.
- mise: Manages versions of the execution environment, such as Node.js, pnpm, and Wrangler.
- just: A task runner for bundling setup and linting commands.
- pnpm: Manages the JavaScript/TypeScript workspace.
Important: Before running make bootstrap, you need to complete the following steps:
# Add Cloudflare credentials (required before make bootstrap)
cf-vault add edu-quest
cf-vault listSet up Cloudflare resources (D1, KV, Turnstile, etc.) for the development environment:
just tf -chdir=dev/bootstrap init -reconfigure
just tf -chdir=dev/bootstrap validate
just tf -chdir=dev/bootstrap plan
just tf -chdir=dev/bootstrap apply -auto-approve# 1. Install Homebrew (macOS/Linux)
make bootstrap
# 2. Set up dependent tools and npm packages together
# This also installs Playwright browsers automatically
just setupIf you already have Homebrew, run brew bundle install before just setup.
Note: The just setup command automatically installs:
- mise tools (Node.js, pnpm, etc.)
- pnpm (if not already installed)
- All npm dependencies
- Playwright browsers for E2E testing
# List all available just tasks
just help
# Run code quality checks (biome, cspell, vitest, etc.)
just lint
# Apply automatic formatting
just fix
# Clear the pre-commit cache
just clean
# Update runtimes and CLIs
just update-brew
just update
just update-hooks
# Check mise status
just status
# Run E2E tests with Playwright (headless)
just e2e
# Open Playwright test runner (UI mode)
just e2e-openThe project uses Vitest for unit testing:
# Run all unit tests
pnpm test
# Run unit tests in watch mode
pnpm test:watch
# Generate coverage report
pnpm test:coverageThe project uses Playwright for end-to-end testing to verify screen transitions and user flows.
# 1. Start the Cloudflare Workers dev server in a separate terminal
pnpm dev:edge
# This starts the server on http://localhost:8788
# 2. Run E2E tests in headless mode
just e2e
# OR open Playwright test runner (UI mode)
just e2e-open# Automatically start dev server and run E2E tests
just e2e-ciThis command will:
- Start the Cloudflare Workers dev server in the background
- Wait for the server to be ready (max 30 seconds)
- Run all E2E tests
- Automatically shut down the server when done
Important Notes:
- E2E tests MUST run against
@edu-quest/edge(Cloudflare Workers), NOT@edu-quest/web @edu-quest/webis a placeholder Node.js server without actual application routes- All application routes (/, /math, /math/start, /math/play, etc.) exist only in
@edu-quest/edge - The
just e2eandjust e2e-opencommands check if the server is running onhttp://localhost:8788 - Always use
pnpm dev:edgeto start the server for E2E testing
E2E Test Coverage:
- Navigation flows between pages (Home → MathQuest → Start → Play → Results)
- ClockQuest navigation
- Backward navigation (browser back button)
- Legacy URL redirects (
/start→/math/start,/play→/math/play)
E2E tests run automatically in GitHub Actions on:
- Push to
mainbranch - Pull request creation/updates
The CI workflow (.github/workflows/e2e.yml) performs the following:
- Installs
justcommand runner - Sets up mise (Node.js, pnpm, etc.)
- Installs pnpm dependencies
- Installs Playwright browsers
- Builds required packages (
@edu-quest/domain,@edu-quest/app) - Runs
just e2e-ci(automatic server management) - Uploads Playwright reports, traces, and media on failure
When E2E tests fail in CI:
- Go to the failed workflow run in GitHub Actions
- Scroll to the bottom of the page
- Download the
playwright-reportartifact (if available) - Download the
playwright-test-resultsartifact for traces and media - Review the HTML report, screenshots, and videos to diagnose the issue
Screenshot files are organized by test file and test name:
playwright-report/
└── index.html
playwright/test-results/
└── navigation.spec.ts-<hash>/
├── trace.zip
├── video.webm
└── screenshot.png
apps/edge: The Hono SSR app that runs on Cloudflare Workers. It contains the start/play screens inroutes/pagesand the question generation/grading API inroutes/apis/quiz.ts.apps/api/apps/web: A Node server and web front-end for local development. Used for validation without Workers.packages/domain: The logic for question generation and grading. It also defines multi-step problems for different grade levels (e.g., addition then subtraction).packages/app: Manages quiz progression (question order, correct answer count, etc.) using the domain logic.docs/: Design and operational documents.infra/: Terraform and D1 migrations.games/math-quiz: The old browser-based game (static HTML/JS).games/clock-quest: A prototype ClockQuest trainer with analog & digital clocks (static HTML/JS).
AGENTS.md: Overall design and module dependencies.docs/local-dev.md: Procedures for setting up a local validation environment.docs/edu-quest-architecture.md: Detailed architecture design.docs/math-quiz.md: Specifications for the old standalone mini-game.docs/parallel-development.md: Guide for parallel feature development using git worktree.