Portal Sync Service
Component Detail
Service Layer
high complexity
backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Backend service that subscribes to inbound webhook payloads from the HLF Dynamics portal and updates local Supabase state accordingly. Handles membership updates, course enrollments, and other shared-state events originating from 'Min Side', ensuring the app reflects portal-side changes without requiring duplicate data entry.
portal-sync-service
Responsibilities
- Process inbound webhook events from the Dynamics portal
- Map portal data structures to local Supabase schema
- Enqueue and process sync jobs for membership and enrollment updates
- Enforce feature delineation by hiding or replacing portal-owned features in the app UI
- Publish sync results and error states for monitoring
Interfaces
processWebhookEvent(payload, eventType)
syncMembershipUpdate(portalMemberId, data)
syncCourseEnrollment(portalEnrollmentId, data)
getFeatureOwnershipConfig(orgId)
markFeatureAsPortalOwned(orgId, featureKey)
resolveDeepLinkForFeature(orgId, featureKey)
getLastSyncTimestamp(orgId)
retryFailedSync(syncJobId)
Related Data Entities (2)
Data entities managed by this component