TalkingCardsRepository
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Manages fetching, caching, and local persistence of talking card data for a given organization. It synchronizes the card library from the backend API when connectivity is available and serves cached records when offline. Exposes a clean query interface consumed by the UI screens.
talking-cards-repository
Sources & reasoning
All five organizations endorsed Snakkekort in the priority matrix (✓ across the board) with classification NICE and Phase 3. Phase 3 maps to v1.1 by ordinal normalization (third phase = v1.1). The three source references confirm the feature is explicitly named in the roadmap sections for Fase 3, validating inclusion and the v1.1 target release.
-
docs/source/likeperson.md · line 159| Snakkekort | ✓ | ✓ | ✓ | ✓ | ✓ | NICE | 3 |
-
docs/source/likeperson.md · line 359- Snakkekort / Talking Cards Toolbox
-
docs/source/likeperson.md · line 423- Snakkekort / toolbox
Responsibilities
- Fetch the organization's card library from the backend API and persist locally
- Serve cards from the local cache when the device is offline
- Invalidate and refresh cached cards on successful sync
- Provide filtered query methods for card search and category lookup
- Handle sync errors gracefully without surfacing raw exceptions to UI
Interfaces
getCards(organizationId: string): Promise<TalkingCard[]>
getCardById(cardId: string): Promise<TalkingCard | null>
syncCards(organizationId: string): Promise<SyncResult>
searchCards(query: string, organizationId: string): Promise<TalkingCard[]>