Dashboard KPIs
Feature Detail
Description
The Dashboard KPIs feature provides coordinators and organization administrators with a real-time overview of key performance indicators on the admin portal home screen. It aggregates data across peer mentors, activities, expenses, and assignments to surface the most operationally relevant metrics at a glance. The feature is designed to support data-driven decision-making without requiring users to navigate into detailed report views for routine oversight tasks.
Analysis
Organization administrators and coordinators spend significant time compiling status updates from multiple sources. A consolidated KPI view eliminates this overhead by surfacing aggregate counts - active peer mentors, activities logged this month, pending expense approvals, unread assignments - in a single screen. This directly reduces the coordination cost per organization and improves response times for issues requiring attention. Strategically, a strong KPI dashboard increases perceived platform value during onboarding and renewal conversations, as administrators can immediately see organizational activity without running reports. It also supports Bufdir audit readiness by keeping key metrics continuously visible rather than requiring manual extraction.
KPI values are computed server-side via aggregation queries against the PostgreSQL database, scoped strictly to the authenticated user's organization (tenant isolation enforced at the query level). The Next.js admin portal fetches KPI data via a dedicated REST endpoint (`GET /api/v1/admin/kpis`) on page load with a short cache TTL (30-60 seconds) to balance freshness and database load. Each KPI card is independently queryable so partial failures degrade gracefully. The frontend renders cards using the design system's stat card components, with skeleton loaders during fetch. Role-based visibility rules determine which KPIs are shown - coordinators see team-level metrics, org admins see organization-wide metrics, global admins see cross-org system health indicators only. No real-time websocket connection is required for MVP; polling or manual refresh is acceptable.
Components (42)
Shared Components
These components are reused across multiple features
User Interface (9)
Service Layer (15)
Data Layer (8)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.