Admin Dashboard Now Shows Live Platform Stats
Admin Dashboard Now Shows Live Platform Stats
Released in v1.0.51
Overview
The admin dashboard (/dashboard/admin) includes four at-a-glance stat cards designed to give platform administrators an immediate summary of platform health. Prior to v1.0.51, all four cards were hardcoded to display 0 — meaning the data shown was never accurate. This release fixes that by connecting each card to a real-time database query executed server-side on every page load.
What Changed
Each stat card on the admin dashboard now runs a dedicated COUNT query against the database:
Total Organizations
Displays the total number of tenant organizations registered on the platform.
SELECT COUNT(*) FROM organizations;
Total Users
Displays the total number of user accounts across all organizations.
SELECT COUNT(*) FROM users;
Active Subscriptions
Displays the number of subscriptions currently in an active state.
SELECT COUNT(*) FROM subscriptions WHERE status = 'active';
Audit Events (Last 7 Days)
Displays the number of audit log entries recorded in the past 7 days, providing a rolling window of recent platform activity.
SELECT COUNT(*) FROM audit_log WHERE created_at > now() - INTERVAL '7 days';
Behaviour
- All four queries run as part of the server component render for
/dashboard/admin, so the data is always fresh on page load. - The Audit Events count is intentionally scoped to the last 7 days. It is not a lifetime total — it reflects recent activity volume.
- No caching layer is applied to these counts at this time; each visit to the admin dashboard triggers a fresh read from the database.
Who Is Affected
This fix applies to any user with the admin role who has access to /dashboard/admin. No configuration or migration is required — the queries run against existing tables (organizations, users, subscriptions, audit_log) that are already part of the platform schema.
Upgrading
No action is required. The fix is applied automatically as part of the v1.0.51 release. After upgrading, reload the admin dashboard to see accurate counts.