HomeDashboardService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Backend service that assembles role-scoped dashboard payloads for authenticated users. It queries activity, task, approval, and alert data and returns a structured response shaped to the requesting user's role. Acts as the single data-fetch boundary for both home screen components.
home-dashboard-service
Sources & reasoning
Line 293 names role-specific home content as a screen. Line 240 classifies home-navigation as always-on core, making this non-deferrable. Line 322 confirms MVP scope includes both Peer Mentor and Coordinator roles. Line 308 ties the home surface directly to the module registry, confirming MVP target release.
-
docs/source/likeperson.md · line 293Role-specific home content (peer mentor vs coordinator variants)
-
docs/source/likeperson.md · line 240**Mobile App:** `authentication-access-control`, `home-navigation`, `accessibility`, `help-support`, `profile-management`.
-
docs/source/likeperson.md · line 3222 mobilrolle-profiler: Peer Mentor, Coordinator (Organization Admins logger på som Coordinator i app-konteksten)
-
docs/source/likeperson.md · line 308Module registry - the app's navigation, home surfaces, and entry points are assembled at runtime from the enabled module set
Responsibilities
- Determine the requesting user's role and return a role-appropriate dashboard payload
- Aggregate activity summary data for Peer Mentor payloads
- Aggregate pending approvals, alerts, and team metrics for Coordinator payloads
- Enforce authorization so users only receive data within their permission scope
- Cache dashboard payloads with short TTL to reduce redundant database queries
Interfaces
getDashboardPayload(userId: string, role: UserRole): DashboardPayload
getPeerMentorSummary(userId: string): PeerMentorSummary
getCoordinatorOverview(coordinatorId: string): CoordinatorOverview