Highlights • In Production
Gratia Sapientia: A Formation Engine with Real Math
TL;DR: A personal-formation PWA that gamifies daily practice and classical study with two mathematically grounded systems — an exponential "grace decay" with an 18-hour half-life, and a linear mastery-leveling curve across the seven liberal arts — plus a four-house chromatic system that colors Latin text by grammatical role.
Gratia Sapientia turns daily discipline into legible feedback. Rather than streaks-and-badges, the mechanics are real formulas, calibrated and implemented in code.
- Grace decay. A vitality score decays exponentially with an 18-hour
half-life —
G(t) = G₀ · e^(−ln(2)/18 · Δt)— computed lazily on read, so no background jobs are required. Activities earn grace asduration × weight(Confession 2.0/min, Mental Prayer 1.0/min, Rosary 0.5/min, …), capped at 100. Roughly an hour a day of high-weight practice holds the score at full. - Mastery leveling. Each of the seven liberal arts has ten levels on a
linear XP curve (
6,000 × level), where one logged minute is one XP — a transparent 1,000-hours-to-mastery standard per subject. - Grammatical illumination. A live reader colors Latin prayers and scripture by grammatical role across four chromatic “houses” — gold for the noun cases, red for verbs, blue for modifiers, grey for particles — so syntax is visible before it’s formally studied.
- Private and installable. Built on Next.js 16 with Auth.js v5 over a self-hosted PostgreSQL database, shipped as an offline-capable PWA with no third-party analytics.
The interesting part isn’t the theme — it’s that the scoring is principled. Every number a user sees traces back to a documented, duration-based formula.