Dashboard KPIs
Feature Detail
Description
The Dashboard KPIs feature provides organization administrators and global admins with a real-time overview of key performance indicators within the Admin Web Portal. It surfaces aggregated metrics - active peer mentors, activities logged, pending approvals, and reimbursement totals - in a scannable card layout optimized for quick situational awareness. The KPI cards are role-scoped: an Org Admin sees their own organization's data only, while a Global Admin with granted support access can view the tenant they are currently operating in. All figures are derived from the shared backend's activity, contact, and expense tables and are refreshed on page load with optional manual refresh. The dashboard is the default landing page after admin login and must render meaningful data from the moment the first peer mentor activity is logged, making it critical for demonstrating platform value during pilot rollout.
Sources & reasoning
Lines 325-327 explicitly list "Aktivitetsoversikt og grunnleggende statistikk" (activity overview and basic statistics) as Admin Web Portal MVP scope. Lines 189-197 confirm "organization-level dashboards and KPIs" as a core admin portal capability. Both place this feature in Fase 1 / MVP, normalizing to target_release "MVP".
-
docs/source/likeperson.md · line 325-327Admin Web Portal (MVP scope): Brukeradministrasjon (invitere, deaktivere, rolletildeling) Organisasjonsinnstillinger og terminologikonfigurasjon Aktivitetsoversikt og grunnleggende statistikk
-
docs/source/likeperson.md · line 189-197
Analysis
Coordinators and org admins currently rely on manual Excel aggregation to understand participation levels, leading to delayed decisions and missed follow-ups. A live KPI dashboard eliminates this lag and gives administrators the situational awareness needed to manage their organizations effectively. From a business perspective, the dashboard is the primary value proof point during pilot evaluation - decision-makers judge adoption success by numbers on a screen. Surfacing accurate, real-time activity counts and participation rates directly demonstrates ROI and accelerates organizational buy-in across all four partner organizations. The feature also reduces coordinator administrative burden: instead of querying team members individually, a single dashboard view answers daily operational questions about activity volumes, pending approvals, and engagement trends.
Implemented as a Next.js server-side rendered page within the Admin Web Portal, calling dedicated aggregation endpoints on the shared REST API. Each KPI card maps to a SQL COUNT or SUM query scoped by tenant ID, ensuring strict multi-tenant isolation. Queries must be indexed to keep dashboard load under 500ms even at scale. The KPI service layer on the backend aggregates from the activities, expenses, users, and contacts tables. Role-based scoping is enforced server-side: Org Admin queries filter by organization_id, Global Admin queries require an active support-access grant. No client-side filtering is used as a security boundary. The frontend uses Next.js dynamic data fetching with SWR or React Query for background revalidation. KpiCardWidget components receive typed props and render count + label + optional trend indicator. WCAG 2.2 AA compliance requires sufficient contrast ratios on all stat values and accessible labels on each card.
Components (8)
Shared Components
These components are reused across multiple features
User Stories
No user stories have been generated for this feature yet.