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

Description

Business logic layer that manages reading, writing, and distributing custom terminology overrides for each organization. It merges tenant overrides with platform defaults and exposes the resolved map through the session bootstrap response so all clients receive the correct vocabulary at startup. Handles cache invalidation when overrides change.

Feature: Custom Terminology

terminology-service

Sources & reasoning

Line 307 makes the labels system a stated mobile architecture requirement fetched at startup and cached offline. Line 244 positions it as one of the three tenant-behaviour mechanisms alongside module toggles. Phase 1 admin scope (line 327) explicitly includes 'terminologikonfigurasjon', confirming MVP classification.

  • docs/source/likeperson.md · line 307
    Organization labels system - per-org terminology overrides fetched from backend and cached offline (currently: contacts, my_contacts, peer_mentors; extensible to singular forms and role terms such as peer_mentor, coordinator, contact)
  • docs/source/likeperson.md · line 244
    terminology/labels system for display strings
  • docs/source/likeperson.md · line 327-328
    Organisasjonsinnstillinger og terminologikonfigurasjon

Responsibilities

  • Merge organization-specific overrides with platform-wide default labels into a resolved terminology map
  • Persist and retrieve terminology overrides via TerminologyRepository
  • Inject the resolved terminology map into session bootstrap responses
  • Invalidate and refresh cached terminology when an admin saves new overrides
  • Enforce access control so only admins of the relevant organization can modify terms

Interfaces

getResolvedMap(orgId: string): TerminologyMap
saveOverrides(orgId: string, overrides: Partial<TerminologyMap>): Promise<void>
resetTerm(orgId: string, termKey: string): Promise<void>
getBootstrapPayload(orgId: string): TerminologyBootstrapPayload

Related Data Entities (2)

Data entities managed by this component