/admin/system). The page is an operations snapshot of this app’s runtime: whether the API process is up, how large MongoDB is, whether Redis is healthy, and which environment variables are set (values are never shown).
What it reports
Overall status:
- Healthy — API and MongoDB are up; required env vars are set; Redis is up if configured; unique index is present
- Degraded — Mongo is up but Redis is configured and down, a required env var is missing, or the unique plan index is missing
- Down — API or MongoDB health check failed
The health API never returns connection strings, Redis passwords, or OAuth secrets. Treat
/api/admin/health as Super Admin only.Routes
Flush caches
Deletes app cache keys only:qb:published:*(question bank)year:*(school-year settings)public:overview:*(public homepage snapshot)
FLUSHALL, and it does not drop step locks (form:{id}:step:{key}) or save rate-limit keys (rl:*).
Writes AuditLog action settings_changed.
Retry Redis
Clears the 60-second “Redis unreachable” backoff so the next request triesREDIS_URL again. Use this after Redis comes back without waiting for the timer.
Related admin tools
Useful later (not built)
These belong in Atlas, Vercel, or a later Super Admin tool — not on the current System page:- Atlas backup / snapshot status
- Vercel deployment and function duration
- Browse and release a stuck step lock after a crash
- Duplicate-plan detector if the unique index was missing
- Slow request / 5xx log beyond optional Sentry (
SENTRY_DSN)