Cards Content Service
Component Detail
Service Layer
low complexity
mobile
1
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Retrieves, filters, and shuffles talking card content from the local store. Handles optional background refresh from a versioned JSON endpoint or lightweight CMS when connectivity is available, falling back to bundled content otherwise.
cards-content-service
Responsibilities
- Retrieve card content from local store with category and topic filtering
- Provide shuffle and random selection logic for card decks
- Check for updated card content from backend endpoint and sync to local store
- Manage card content versioning to avoid unnecessary downloads
Interfaces
getCards(filter?: CardFilter): List<TalkingCard>
getCategories(): List<String>
getCardsByCategory(category: String): List<TalkingCard>
shuffleCards(cards: List<TalkingCard>): List<TalkingCard>
getRandomCard(): TalkingCard
syncContent(): Future<SyncResult>
getContentVersion(): String