Data Layer medium complexity backendmobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Persistence layer responsible for reading and writing terminology override records scoped to each tenant organization. Stores overrides as a key-value map in tenant configuration and provides lookup by organization ID. Also supplies a local cache layer consumed by mobile clients for offline availability.

Feature: Custom Terminology

terminology-repository

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

  • Store and retrieve the terminology override map keyed by organization ID
  • Provide upsert semantics so saving a partial map does not erase unrelated overrides
  • Delete individual term overrides to restore platform defaults
  • Serve cached terminology payloads to mobile clients for offline use

Interfaces

findByOrgId(orgId: string): Promise<TerminologyMap | null>
upsertOverrides(orgId: string, overrides: Partial<TerminologyMap>): Promise<void>
deleteTerm(orgId: string, termKey: string): Promise<void>
getCachedPayload(orgId: string): TerminologyMap | null

Related Data Entities (2)

Data entities managed by this component