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

Description

Local persistence layer for contact records and pending edits. Provides reactive read access and durable offline write queueing.

Feature: Contacts

contact-store

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

  • Persist contact records to local database
  • Queue pending edits while offline
  • Expose reactive queries for UI binding
  • Resolve conflicts on sync with remote
  • Purge stale cache entries

Interfaces

getAll(): Promise<Contact[]>
getById(id: string): Promise<Contact | null>
upsert(contact: Contact): Promise<void>
enqueueEdit(edit: ContactEdit): Promise<void>
drainQueue(): Promise<ContactEdit[]>

Related Data Entities (1)

Data entities managed by this component