From a5430736d9457cac84e6a6b9984d7ab7136a6aaf Mon Sep 17 00:00:00 2001 From: kevin-asprec Date: Mon, 16 Mar 2026 08:45:58 +0800 Subject: [PATCH] chore(phase-3): mark on-prem license validation complete Phase 3 work was done in TapTrack on-prem repo. Hub side (POST /api/licenses/validate) was already done in Phase 1. PAUL updates: - ROADMAP: Phase 3 marked complete - STATE: Phase 3 done, Phase 4 next - phases/03-onprem-license/README.md: updated with what was built --- .paul/ROADMAP.md | 6 +++--- .paul/STATE.md | 14 +++++++------- .paul/phases/03-onprem-license/README.md | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.paul/ROADMAP.md b/.paul/ROADMAP.md index bd15c43..931fa45 100644 --- a/.paul/ROADMAP.md +++ b/.paul/ROADMAP.md @@ -19,8 +19,8 @@ SMS flow: On-prem TapTrack polls Hub every 30s → Hub queues SMS jobs → Hub s ## Current Milestone **v1.0 — Foundation & Core Services** -Status: Phase 2 complete — Phase 3 next -Phases: 2 of 15 complete +Status: Phase 3 complete — Phase 4 next +Phases: 3 of 15 complete --- @@ -30,7 +30,7 @@ Phases: 2 of 15 complete |-------|------------------------------|-------|--------------|------------| | 1 | Project Setup & Infrastructure | 1 | ✅ Complete | 2026-03-15 | | 2 | School Registry + License Mgmt | 2 | ✅ Complete | 2026-03-15 | -| 3 | On-Prem License Validation | TBD | Not started | — | +| 3 | On-Prem License Validation | 1 | ✅ Complete | 2026-03-15 | | 4 | SMS Gateway (credits + queue) | TBD | Not started | — | | 5 | On-Prem SMS Polling Agent | TBD | Not started | — | | 6 | Super Admin Dashboard UI | TBD | Not started | — | diff --git a/.paul/STATE.md b/.paul/STATE.md index 6ab2f86..04dff00 100644 --- a/.paul/STATE.md +++ b/.paul/STATE.md @@ -3,10 +3,10 @@ ## Current Position Milestone: v1.0 — Foundation & Core Services -Phase: 2 of 15 (School Registry + License Management — complete) -Plan: Phase 2 complete — Phase 3 next -Status: **Phase 2 applied — ready to begin Phase 3** -Last activity: 2026-03-15 — Phase 2 complete (school create/edit modal, license editor, activate/suspend, subscription plan, SMS credit top-up, ledger) +Phase: 3 of 15 (On-Prem License Validation — complete) +Plan: Phase 3 complete — Phase 4 next +Status: **Phase 3 applied — ready to begin Phase 4** +Last activity: 2026-03-15 — Phase 3 complete (TapTrack on-prem: license validation task, startup check, hub router, frontend warning banner) ## Loop Position @@ -21,7 +21,7 @@ PLAN ──▶ APPLY ──▶ UNIFY - Phase 1 (Project Setup & Infrastructure): [██████████] 100% ✓ - Phase 2 (School Registry + License Mgmt): [██████████] 100% ✓ -- Phase 3 (On-Prem License Validation): [░░░░░░░░░░] 0% +- Phase 3 (On-Prem License Validation): [██████████] 100% ✓ - Phase 4 (SMS Gateway): [░░░░░░░░░░] 0% - Phase 5 (On-Prem SMS Polling Agent): [░░░░░░░░░░] 0% - Phase 6 (Super Admin Dashboard UI): [░░░░░░░░░░] 0% @@ -37,8 +37,8 @@ PLAN ──▶ APPLY ──▶ UNIFY ## Next Action -Run: `/paul:plan` for Phase 3 — On-Prem License Validation -Resume file: .paul/ROADMAP.md → Phase 3 +Run: `/paul:plan` for Phase 4 — SMS Gateway (credits + queue) +Resume file: .paul/ROADMAP.md → Phase 4 ## Repo diff --git a/.paul/phases/03-onprem-license/README.md b/.paul/phases/03-onprem-license/README.md index 2b9dc3d..a55d727 100644 --- a/.paul/phases/03-onprem-license/README.md +++ b/.paul/phases/03-onprem-license/README.md @@ -1,9 +1,22 @@ # Phase 03: On-Prem License Validation -**Status:** Not started +**Status:** ✅ Complete — 2026-03-15 ## Goal TapTrack validates license key against Hub on startup; returns feature flags and school config. -## Plans -- [ ] TBD — run /paul:plan when Phase 2 is complete +## Completed + +### 3-01: On-prem license validation + frontend warning banner +- config.py: hub_url + hub_license_key settings (blank = standalone mode) +- docker-compose.yml: HUB_URL + HUB_LICENSE_KEY env vars on all services +- backend/app/tasks/license.py: validate_license_now(), get_license_status(), + is_feature_enabled(); Celery task license.validate registered +- backend/app/worker.py: license task in includes + 6h beat schedule +- backend/app/main.py: asynccontextmanager lifespan + startup validation + hub router +- backend/app/routers/hub.py: GET /api/hub/license-status, POST /api/hub/license-refresh +- frontend api.ts: HubLicenseStatus interface, getHubLicenseStatus(), refreshHubLicense() +- AppLayout.vue: animated banner (red=expired/revoked/invalid, amber=expiring ≤30 days); + polls every 30min; dismiss + admin refresh button; no banner in standalone mode + +Hub side: POST /api/licenses/validate was complete from Phase 1 — no new work needed.