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

Description

Orchestrates contact data operations including fetch, update, and sync between Contact Store and remote backend. Enforces role-based access rules and offline write queueing.

Feature: Contacts

contact-service

Sources & reasoning

Blueprint explicitly merges contact-list-search and contact-detail-edit into a single Contacts feature. Marked MUST/Phase 1 in the matrix and listed in MVP mobile screens (lines 219-220), so target_release is MVP.

  • Basic search (contact og notater) | ✓ | ✓ | ✓ | ✓ | ✓ | MUST | 1
  • Contacts list with role-specific views Contact detail, edit, and peer mentor profile screens
  • Organization labels system - per-org terminology overrides fetched from backend and cached offline (currently: `contacts`, `my_contacts`, `peer_mentors`
  • contacts | Contacts | Contact List & Search, Contact Detail & Edit, Caregiver & Next-of-Kin

Responsibilities

  • Fetch contact list and details from store or remote
  • Persist edits via store with offline queue support
  • Apply role-based access filters to reads and writes
  • Trigger sync when connectivity is restored
  • Emit change events for UI refresh

Interfaces

getContacts(roleScope: RoleScope): Promise<Contact[]>
getContact(id: string): Promise<Contact>
updateContact(id: string, patch: Partial<Contact>): Promise<Contact>
syncPending(): Promise<SyncResult>

Related Data Entities (1)

Data entities managed by this component