Service Layer high complexity backend
0
Dependencies
0
Dependents
5
Entities
0
Integrations

Description

Handles bidirectional synchronization between the app and the Cornerstone member management system via REST API with API key authentication. Runs as a scheduled Supabase Edge Function supporting both nightly full sync and event-driven delta sync via webhooks.

Feature: Member System Integration

cornerstone-sync-service

Responsibilities

  • Authenticate with Cornerstone REST API using API key
  • Execute nightly full membership sync
  • Process delta sync events via webhooks
  • Resolve conflicts using external system as source of truth for membership status
  • Write back personnummer from Vipps SSO to Cornerstone records

Interfaces

runFullSync(organizationId)
processDeltaSync(webhookPayload)
syncMemberRecord(memberId)
writeback PersonnummerToSource(memberId, personnummer)
getLastSyncTimestamp(organizationId)
handleConflict(localRecord, remoteRecord)
validateApiKey()
fetchMembershipStatus(memberId)