EventListService
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Handles fetching, filtering, and caching of event data for the listing screen. Applies organization-scoped queries and module-toggle rules before returning results. Manages offline-first caching so the last-fetched list remains accessible without connectivity.
event-list-service
Sources & reasoning
The mobile architecture section lists event wizard as a core screen and places events in the primary Add-tab navigation, implying a listing surface is equally core. The blueprint marks Event Listing MVP. Without a listing screen the event creation feature has no discovery path, making it a prerequisite for any event participation flow.
-
docs/source/likeperson.md ยท line 289Bottom nav with 5 tabs: Home, Contacts, Add (modal launcher for Activity and Event wizards), Work, Notifications
-
docs/source/likeperson.md ยท line 295-299Screens - Role-specific home content (peer mentor vs coordinator variants) - Contacts list with role-specific views - Contact detail, edit, and peer mentor profile screens - Activity wizard (multi-step: contact โ date โ time โ duration โ summary) - E
Responsibilities
- Fetch upcoming and past events scoped to the authenticated user's organization
- Apply module-toggle visibility filters before returning event sets
- Cache the most recent event list for offline access
- Expose search and filter logic for title, date range, and participation status
- Invalidate and refresh cache when connectivity is restored
Interfaces
getEvents(orgId: string, filter: EventFilter): Promise<Event[]>
searchEvents(query: string, orgId: string): Promise<Event[]>
getCachedEvents(orgId: string): Event[]
refreshCache(orgId: string): Promise<void>