Event Repository Service
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Manages event data retrieval from the REST API with local caching for offline access. Fetches paginated events from GET /api/v1/events with query parameters for organization context, date range, and role-based filtering. Caches the most recent page locally via the local SQLite database for offline viewing.
event-repository-service
Responsibilities
- Fetch paginated events from REST API with org context and role-based filters
- Cache most recent event page in local SQLite for offline access
- Merge cached and remote data with conflict resolution
- Provide reactive event stream to UI layer
- Handle network errors with graceful fallback to cached data
Interfaces
getEvents(EventQuery query)
getNextPage()
refreshEvents()
getCachedEvents()
getEventById(String eventId)
clearCache()
isOffline()
Relationships
Related Data Entities (4)
Data entities managed by this component