Skip to content

Dashboard Stats API

Requires Authorization: Bearer <token> and ADMIN or MANAGER role.

Returns aggregated dashboard metrics derived from the users table.

{
"cards": {
"totalUsers": 12,
"adminCount": 2,
"managerCount": 3,
"memberCount": 7,
"recentSignups": 4,
"signupChangePct": 33.3
},
"usersByRole": [
{ "label": "Admin", "value": 2 },
{ "label": "Manager", "value": 3 },
{ "label": "Member", "value": 7 }
],
"userGrowth": [
{ "label": "Mar '26", "value": 2 },
{ "label": "Apr '26", "value": 5 }
],
"systemStatus": [
{
"id": "users",
"metric": "Registered users",
"value": "12",
"status": "active"
},
{
"id": "api",
"metric": "API health",
"value": "OK",
"status": "active"
}
]
}
FieldDescription
cards.recentSignupsUsers created in the last 7 days
cards.signupChangePctWeek-over-week signup change; null when prior week had zero signups
userGrowthMonthly signup counts for the last 6 months
systemStatusSummary rows for the dashboard status table

The frontend consumes this endpoint via typed Hono RPC:

const res = await apiClient.api.stats.$get();