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

Description

Backend service responsible for orchestrating data synchronization between Meander and HLF's Min Side portal. Handles authentication against the external Dynamics-based system, applies configured field mappings during data transfer, and records sync outcomes for operational reporting. Supports both scheduled automatic sync and on-demand manual sync invocations.

Feature: External Portal Integration (HLF)

external-portal-sync-service

Sources & reasoning

Line 156 priority matrix assigns phase 2 to external portal coordination, mapping to v1.0. Line 115-116 identifies it as HLF-specific with explicit non-overlap requirements. Line 349 confirms its Fase 2 placement in the roadmap. MUST classification is HLF-scoped, not cross-org, so should_have at platform level.

  • docs/source/likeperson.md · line 115-116
    Koordinering med eget portalprosjekt: HLF redesigner «min side» på Dynamics-plattformen. Appen og portalen må ikke overlappe eller motarbeide hverandre.
  • docs/source/likeperson.md · line 349
    Koordinering med HLFs eksterne portalprosjekt
  • docs/source/likeperson.md · line 156
    Koordinering med ekstern portal | - | - | - | ✓ | ✓ | MUST (HLF) | 2

Responsibilities

  • Authenticate against HLF's Min Side portal using stored credentials
  • Execute bidirectional data sync according to configured field mappings
  • Detect and resolve data conflicts to prevent overlapping or contradictory records
  • Record sync run outcomes including timestamps, record counts, and error details
  • Expose manual sync trigger endpoint callable from the admin UI

Interfaces

runSync(configId: string): Promise<SyncResult>
triggerManualSync(configId: string): Promise<SyncResult>
authenticate(credentials: PortalCredentials): Promise<AuthToken>
applyFieldMappings(source: Record<string, unknown>, mappings: FieldMapping[]): Record<string, unknown>
getSyncHistory(configId: string, limit: number): SyncRun[]