chuma-beep/mathua

Learning Resources

An adaptive math practice engine that gates progress on prerequisites and enforces both accuracy and speed to mastery.

352
34
Go
MIT
6 months old

Mathua is worth a look if you want a self-hosted, mastery-gated practice engine rather than another problem generator. It is a single Go binary with a React front end; the interesting part is the scheduler and concept graph, not a polished consumer learning app.

The problem

A learner wants to practice math and genuinely know what they are ready to learn next. A typical workflow means picking a topic by feel, answering a set of static exercises, then moving on whether or not the earlier skill was actually solid. Mathua replaces that choice: you practice, answers are graded against per-concept thresholds, and the scheduler decides what appears next from a 1,250-concept directed acyclic graph. The result is a session where the system, not your guess, decides when fractions with different denominators qualify you for mixed-number addition.

What's different

Two design decisions carry the project. First, the concept graph is a hard gate: a concept is not surfaced until its prerequisites are mastered. Mastery means a streak of correct answers plus an average response time under a per-concept limit, so a slow but correct answer counts as weak. Second, progress decays. Mastered concepts move to a DECAYING state after 14 days without review, and the scheduler treats them as urgent; reviews are scheduled with SM-2 intervals scaled by measured per-topic learning speed and woven into ordinary sessions.

The trade-off is that this design constrains the learner as much as it helps. You cannot skip ahead even when you already know the material, unless the diagnostic places your frontier forward, and the speed threshold can frustrate someone whose accuracy is fine but tempo is slow. The scheduler's weights (recency, mastery, weakness, review balance, subdomain interleaving) are described concretely in the README, which makes the behavior auditable, but they are fixed defaults rather than something the documentation presents as tunable per learner.

Who should try it

This fits a self-hosting tinkerer who wants to run a persistent math practice service for themselves or a small group, and who values prerequisite enforcement over a curated, hand-written curriculum. It suits someone comfortable building Go and running a database, who wants to see how an adaptive scheduler is put together or to extend content. It is a poor fit if you want an app to install and use in five minutes, if a learner needs flexible pacing without speed gates, or if you expect a full-school curriculum: the content table lists concepts across 21 domains, but the README does not show the exercise formats or how quality is handled.

Requirements and limitations

You build it from source with Go 1.26+ and need the front end; the binary serves on port 8080. SQLite is the zero-config default for local or single-user use, while Postgres via pgx/v5 supports multiple users. Configuration lives in .env (JWT secret, allowed CORS origins), and the first role promotion must be run on the machine holding the database with ./bin/mathua admin promote; further contributors are added from /admin/contributors. See the project instructions for the exact commands.

The ongoing cost is content and operations, not installation: you own the database, the user model and the honesty of the 1,250 concept shards. The README describes the scheduler and graph in detail but does not document the authoring workflow for exercises or how to validate them, so anyone extending the content has to read the code. Whether the 21 domains are covered at the same depth is also not shown; presence in a table is not evidence of exercise quality.

HotRepo's take

HotRepo first recorded the project on 2026-10-24, when it sat at 352 stars with +40 that day and one appearance on the daily trending board. One recorded board date is not a series; persistence and trajectory cannot be judged from it, and the repository, created 2026-04-28, was still young. The concrete thing to check before adopting is the linked architecture documentation in the project and whether the grading and content model fit how you intend to teach or learn.

Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.