Portal Sync Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Data persistence layer for storing portal integration configuration, sync operation history, retry queue entries, and conflict records. Stores encrypted API credentials using envelope encryption and maintains an immutable log of all synchronization attempts for auditing purposes.
portal-sync-store
Responsibilities
- Persist encrypted API credentials and connection configuration per organization
- Store synchronization operation history with timestamps, status, and error details
- Manage the retry queue for failed sync operations with scheduling metadata
- Track data conflicts between Meander and external portal records
Interfaces
saveCredentials(organizationId, encryptedCredentials)
getCredentials(organizationId)
saveSyncRecord(syncRecord)
getSyncHistory(organizationId, filters)
addToRetryQueue(syncId, nextRetryAt)
getRetryQueue(organizationId)
removeFromRetryQueue(syncId)
saveConflict(conflictRecord)
getUnresolvedConflicts(organizationId)
resolveConflict(conflictId, resolution)
saveSyncConfig(organizationId, config)
getSyncConfig(organizationId)