Service Layer medium complexity backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Orchestrates data synchronization between Meander and a registered external portal. Applies domain authority rules to determine which system is the source of truth for each data domain and resolves conflicts according to configured policy.

Feature: External Portal Integration

external-portal-sync-service

Sources & reasoning

Explicitly a Fase 2 / phase-column value of 2 in the priority matrix (line 156), confirmed in the Fase 2 action list (line 348-349). Fase 2 maps to v1.0 per the ordinal normalization rule. HLF constraint described in detail at line 115.

  • Koordinering med eget portalprosjekt: HLF redesigner «min side» på Dynamics-plattformen. Appen og portalen må ikke overlappe eller motarbeide hverandre.
  • Koordinering med HLFs eksterne portalprosjekt
  • Koordinering med ekstern portal | - | - | - | ✓ | ✓ | MUST (HLF) | 2

Responsibilities

  • Execute scheduled and on-demand sync jobs by coordinating reads and writes across both systems
  • Enforce domain authority configuration, skipping writes to domains owned by the external portal
  • Detect and log data conflicts, applying resolution strategy (last-write-wins, authority-wins, or manual review queue)
  • Emit sync lifecycle events for audit logging and status reporting back to the UI
  • Persist sync job results and per-record outcomes to the database for history and debugging

Interfaces

runSync(orgId: string, domains: string[]): Promise<SyncJobResult>
scheduleSyncJob(orgId: string, cronExpression: string): void
cancelScheduledJob(orgId: string): void
resolveConflict(conflictId: string, resolution: ConflictResolution): Promise<void>
getSyncStatus(orgId: string): SyncStatus

Related Data Entities (2)

Data entities managed by this component