Event Query Service
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Backend service that retrieves events from storage and applies tenant scoping, module-enablement checks, and role-based filtering before returning results. Supports filtering by date range, location, and organization hierarchy for multi-org tenants.
event-query-service
Sources & reasoning
Event Listing is enumerated as one of three features under the event-management area in the canonical area taxonomy (section 8). MVP target because event-management is part of the mobile-app core needed for the operational flow, and listing is the prerequisite for sign-up which is itself MVP.
-
docs/source/likeperson.md · line 351event-management | Event Management | Event Creation, Event Listing, Event Sign-up
-
docs/source/likeperson.md · line 215Bottom nav with 5 tabs: Home, Contacts, Add (modal launcher for Activity and Event wizards), Work, Notifications
-
docs/source/likeperson.md · line 227Offline-first persistence (Drift + SQLCipher encrypted local DB, mutation outbox, sync queue with retry/backoff, ID mapping for offline-created entities, conflict resolver)
Responsibilities
- Query events filtered by tenant, enabled modules, and caller role
- Apply date range, location, and organization-hierarchy filters
- Enforce that events from other tenants are never returned
- Resolve parent/child organization relationships for hierarchy filtering
- Return paginated, sorted event summaries to the listing screen
Interfaces
listEvents(tenantId: string, roleContext: RoleContext, filters: EventFilters): Promise<EventSummary[]>
countEvents(tenantId: string, filters: EventFilters): Promise<number>