πŸ”‘ Site License & Subscription

βš™οΈ Settings Dashboard
Checking license…

πŸ’Ž 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.

Key recipes (HMG side Β· V9.9):
Β· 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

  1. 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 on expired and HMG gets an email the day any client lapses β€” no portal login, no database access.
  2. 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.
  3. ⏸️ 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.
  4. πŸ›°οΈ 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.js URL + 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

  1. Every page loads assets/js/license.js, which reads the state from the HMG license registry (if configured) β†’ the site_license table β†’ the build config.
  2. 30 days before expiry: a gentle gold banner reminds everyone to renew.
  3. During grace: a red banner with a renewal link stays on top of every page.
  4. After expiry + grace (or suspension): a full renewal screen covers the portal. It re-appears even if removed, and cannot be dismissed.
  5. License rows written here carry a SHA-256 signature; a hand-edited database row fails verification and raises a tamper notice.
  6. 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.