π Site License & Subscription
π One-time payment (Lifetime)
The client pays once and owns the site forever β no recurring fees. The portal runs 100% on the client's own free Supabase + free hosting. HMG is only paid again if the client asks for services (maintenance, troubleshooting, training, new features).
π Subscription
For clients who cannot pay at once: a monthly / termly / annual plan. When the paid term ends, a grace period begins; if it lapses without renewal, every page of the portal shows a renewal screen until HMG extends the subscription. All data stays intact β nothing is deleted; access simply resumes on renewal.
ποΈ Activation key
When this site is key-locked, the subscription can only be changed with a signed HMG activation key (SC1.β¦). Paste the key you received and apply β the server verifies its signature, applies the new expiry/status, and each key works exactly once.
Β· Renew a term:
node tools/make-license-key.mjs --salt "β¦" --expires 2027-01-31Β· Suspend:
β¦ --expires 2026-01-01 --status suspendedΒ· Convert to ONE-TIME/lifetime ownership:
β¦ --model lifetime β one key, the lock never shows again, no database access needed.Β· Back to subscription later: issue a normal key with a new expiry.
π‘ HMG fleet monitoring β how to watch this school from outside
- Server verdict URL (no sign-in needed):
Returns the live subscription state (active / grace / expired, expiry date, days over). Add it to UptimeRobot with a keyword alert onexpiredand HMG gets an email the day any client lapses β no portal login, no database access. - Renew from anywhere: generate a key with the recipes above and send it on WhatsApp β the school pastes it here. No Supabase access needed on either side.
- βΈοΈ Pause-proof guarantee: an EXPIRED subscription never loses data. Three independent keep-alive layers continue while locked: the GitHub-Actions workflow (client-independent), the locked page itself (pings on every visit, once/day), and the Vercel keep-alive endpoint. The school's Supabase stays awake until they renew β whenever that is.
- π°οΈ Best practice β register this school in the HMG Fleet Console: HMG's standalone ops platform (its own private deployment) monitors every client from one screen: keep-alive pings, health checks, this subscription verdict, renewal-date reminders and an incident journal. Registration needs only this site's
config.jsURL + anon key β no portal access, no data visibility. The console's own cron layers (GitHub Actions / cron-job.org / UptimeRobot) then keep this school awake even if every layer above were disabled.
β How enforcement works
- Every page loads
assets/js/license.js, which reads the state from the HMG license registry (if configured) β thesite_licensetable β the build config. - 30 days before expiry: a gentle gold banner reminds everyone to renew.
- During grace: a red banner with a renewal link stays on top of every page.
- After expiry + grace (or suspension): a full renewal screen covers the portal. It re-appears even if removed, and cannot be dismissed.
- License rows written here carry a SHA-256 signature; a hand-edited database row fails verification and raises a tamper notice.
- With the optional HMG registry (a JSON on HMG-controlled hosting), the authoritative status lives outside the client's control β local edits cannot suspend or extend the term.
Honest note: any software hosted by the client can ultimately be modified by its owner; these layers make bypassing the subscription impractical for non-experts, keep the authoritative status with HMG, and keep everything transparent for both sides.