Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
The route /api/lesson-state/:topic_id/:lesson_id used the old Axum 0.6
colon syntax which doesn't work in Axum 0.8. Changed to curly brace
syntax so the GET and DELETE endpoints actually match incoming requests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add lesson_state table and API endpoints (PUT/GET/DELETE /api/lesson-state)
to persist in-progress lesson state (current exercise index, hearts, correct
count). On lesson load, check for saved state and restore it. After each
exercise advance, save state to the server. On lesson completion, delete the
saved state. This prevents losing all progress on disconnect or page refresh.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Handle browser AudioContext suspension by resuming on use, pass ctx
parameter to playTone to avoid redundant calls, and wrap all play
functions in try/catch for graceful degradation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>