Dashboard Data Service
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
3
Dependents
6
Entities
0
Integrations
Description
Business logic layer that fetches and aggregates role-scoped dashboard data from the REST API endpoint /api/v1/dashboard. Uses Riverpod providers for response caching to avoid redundant network calls on tab switching.
dashboard-data-service
Responsibilities
- Fetch role-scoped dashboard payload from /api/v1/dashboard using JWT role claims as query parameters
- Cache API responses using Riverpod providers with configurable TTL to reduce redundant calls on tab switch
- Transform raw API response into typed PeerMentorDashboardData and CoordinatorDashboardData view models
- Handle error states and surface typed exceptions to the BLoC layer for user-facing messaging
Interfaces
fetchPeerMentorDashboard() → Future<PeerMentorDashboardData>
fetchCoordinatorDashboard() → Future<CoordinatorDashboardData>
invalidateCache() → void
refreshDashboard() → Future<void>
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (6)
Data entities managed by this component