Service Layer medium complexity Shared Component mobile
1
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Riverpod provider exposing a reactive combined state of the full contact list and the current search query, with the filtered view derived reactively from the underlying Drift stream. Applies role-based scoping at the provider level so peer mentors see only their assigned contacts while coordinators see all contacts across their local chapter.

Feature: Contact List & Search

contacts-service

Responsibilities

  • Subscribe to the Drift contacts stream and rebuild derived state on any local data change
  • Apply role-based scoping so peer mentors see own contacts and coordinators see chapter-wide contacts
  • Derive a filtered contact list from the full list and search query using case-insensitive substring matching on name fields
  • Trigger a backend sync via Sync Queue Service when connectivity is available
  • Expose offset-based or cursor-based paging support for large coordinator contact sets

Interfaces

watchContacts(userId: String, role: UserRole) → Stream<List<Contact>>
searchContacts(query: String, contacts: List<Contact>) → List<Contact>
refreshContacts() → Future<void>
getContactById(contactId: String) → Future<Contact?>
getPagedContacts(chapterId: String, offset: int, limit: int) → Future<List<Contact>>

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component