Statistics Service
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
2
Dependents
8
Entities
0
Integrations
Description
Business logic layer that fetches and transforms aggregated activity data for the authenticated peer mentor. Calls the Statistics Repository and applies client-side date range filtering and grouping logic before exposing data to the UI via Riverpod providers.
statistics-service
Responsibilities
- Aggregate activity counts by type, contact, and time period
- Apply date range filters to fetched statistics data
- Expose Riverpod AsyncNotifier providers for reactive UI updates
- Map API response DTOs to UI-ready view models
- Handle error and loading states for the UI layer
Interfaces
getPersonalStats(userId, dateRange)
getActivityBreakdownByType(userId, dateRange)
getActivityBreakdownByContact(userId, dateRange)
getContributionSummary(userId)
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (8)
Data entities managed by this component