FaqRepository
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
FaqRepository manages local persistence of FAQ entries and categories using the device's offline storage layer. It provides read and write operations that the service layer calls after a successful API sync. It is the single source of truth for FAQ data when the device is offline.
faq-repository
Sources & reasoning
FAQ is listed in the help-support area taxonomy. The blueprint marks it v1.0 rather than MVP, consistent with phasing self-service support tooling after core activity registration and auth are stable. Reduces coordinator support burden as the user base scales across organizations with varying digital literacy.
-
docs/source/likeperson.md · line 479| help-support | Help & Support | Contact Us, Privacy Policy, Accessibility Statement, FAQ |
Responsibilities
- Persist FAQ entries and categories to local storage after sync
- Retrieve all stored entries or filter by category or search term
- Upsert incoming data to avoid duplicates on repeated syncs
- Track the timestamp of the last successful sync for cache invalidation
Interfaces
getAll(): Promise<FaqEntry[]>
getByCategory(categoryId: string): Promise<FaqEntry[]>
upsertMany(entries: FaqEntry[]): Promise<void>
getLastSyncedAt(): Promise<Date | null>
setLastSyncedAt(date: Date): Promise<void>