HomeDashboardService
Component Detail
Description
Backend service that assembles and delivers the personalised dashboard payload for a given user session. It resolves the user's role, queries relevant data sources for feed items and queue entries, and applies the organisation's module configuration to filter the response. Acts as the single data-aggregation point for both home screen variants.
home-dashboard-service
Sources & reasoning
The source explicitly defines role-specific home content as a named screen type and specifies Peer Mentor and Coordinator as the two mobile roles. The module registry pattern described at lines 307-308 requires a home surface that assembles dynamically at runtime. Blueprint marks this feature MVP; Fase 1 core mobile scope confirms role-aware navigation must ship at launch.
-
docs/source/likeperson.md · line 291Role-specific home content (peer mentor vs coordinator variants)
-
docs/source/likeperson.md · line 287Bottom nav with 5 tabs: Home, Contacts, Add (modal launcher for Activity and Event wizards), Work, Notifications
-
docs/source/likeperson.md · line 256On mobile, an Org Admin is surfaced as a Coordinator - they use the same mobile experience as coordinators without a separate UI path.
Responsibilities
- Resolve the authenticated user's role and organisation context from the session token
- Fetch and rank activity feed items for peer mentor payloads
- Fetch pending approval queue items for coordinator payloads
- Apply enabled module flags from ModuleRegistryService to filter widget data
- Return a structured dashboard payload with typed sections for the mobile client
Interfaces
getDashboardPayload(userId: string, role: UserRole): Promise<DashboardPayload>
getActivityFeed(userId: string, page: number): Promise<FeedItem[]>
getPendingApprovals(coordinatorId: string): Promise<ApprovalItem[]>
getUpcomingTasks(userId: string, limit: number): Promise<TaskItem[]>
Related Data Entities (4)
Data entities managed by this component