Service Layer medium complexity backend
0
Dependencies
0
Dependents
5
Entities
0
Integrations

Description

Backend service that aggregates operational metrics across activities, peer mentors, coordinator workload, pending approvals and reimbursement throughput for a given organization. Returns a single consolidated payload optimized for rendering the admin dashboard.

Feature: Dashboard KPIs

kpi-aggregation-service

Sources & reasoning

Listed as a canonical feature under admin-dashboard in §8 vocabulary and as a core Admin Web Portal capability in §Product 2. MVP target_release: admin dashboard is part of the MVP admin scope per §5 Fase 1 (brukeradministrasjon, organisasjonsinnstillinger, aktivitetsoversikt - the operational landing surface).

Responsibilities

  • Aggregate counts and trends across multiple data sources per organization
  • Enforce role-based access so only Org Admins and Global Admins receive data
  • Scope all queries to the caller's organization (with Global Admin override)
  • Compute period-over-period trend deltas for each KPI
  • Expose a single endpoint returning the full KPI payload for the dashboard

Interfaces

getDashboardKpis(orgId, period): KpiPayload
getKpiTrend(orgId, kpiId, period): TrendSeries