OrganizationLabelsService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Business logic layer that manages retrieval and persistence of per-organization label overrides. Merges org-specific overrides with platform defaults and serves the resolved label map to both the admin portal and mobile clients. Handles cache invalidation so clients receive updated terminology after edits.
organization-labels-service
Sources & reasoning
Directly described in the Mobile App Architecture section (line 305-307) as a built-in capability, and grouped with organization settings in the MVP admin scope (line 325). Multiple organizations explicitly use different terminology for the same concepts, making this a launch-critical capability rather than a deferred enhancement.
-
docs/source/likeperson.md · line 305-307Organization 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
-
docs/source/likeperson.md · line 325Organisasjonsinnstillinger og terminologikonfigurasjon
Responsibilities
- Merge platform-default labels with org-specific overrides into a resolved label map
- Persist new or updated label overrides via OrganizationLabelsRepository
- Invalidate or update the client-facing label cache when overrides change
- Validate label keys against the allowed terminology key registry before saving
- Expose a versioned label endpoint so mobile clients can detect and sync changes
Interfaces
getResolvedLabels(orgId: string): Promise<LabelMap>
setLabelOverride(orgId: string, key: string, value: string): Promise<void>
resetLabelOverride(orgId: string, key: string): Promise<void>
getLabelVersion(orgId: string): Promise<string>