Dashboard Service
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
4
Dependents
8
Entities
0
Integrations
Description
Business logic service responsible for resolving the authenticated user's role and assembling the role-appropriate dashboard data payload. Coordinates with the auth state BLoC to determine which home screen variant to render and fetches summary data for recent activity, pending tasks, and notifications counts.
dashboard-service
Responsibilities
- Resolve authenticated user role from JWT claims or /me endpoint response
- Fetch and aggregate dashboard summary data per role (recent activities, pending approvals, team stats)
- Emit role-resolved state to home screen BLoC for conditional widget tree rendering
- Handle dashboard refresh and cache invalidation on pull-to-refresh
Interfaces
getUserRole(String userId)
getDashboardData(String userId, UserRole role)
getPeerMentorDashboard(String userId)
getCoordinatorDashboard(String userId)
getOrgAdminDashboard(String organizationId)
refreshDashboard(String userId)
getNotificationCount(String userId)
Relationships
Dependents (4)
Components that depend on this component
Related Data Entities (8)
Data entities managed by this component