Feature Toggles
Feature Detail
Description
Feature Toggles is the administrative surface through which Organization Admins enable or disable optional functional areas for their tenant. Each toggle maps to a canonical area ID from the platform taxonomy, and the enabled set is stored as tenant configuration enforced server-side on every API request. Mobile and admin clients read the enabled set at startup and render only the navigation and screens belonging to enabled modules. This area is always-on and cannot be disabled, as doing so would remove the only interface through which modules can be re-enabled.
Sources & reasoning
Lines 232-248 define the module-toggle architecture as the core mechanism for serving four divergent organizations from one codebase. The Feature Toggles page is the sole configuration surface for this system. Always-on status (line 241) and the circular-dependency constraint confirm no deferral is possible - this is MVP.
-
docs/source/likeperson.md · line 232-235Module = Area. The canonical areas defined in the area taxonomy (section 8) are the unit of toggling. Each area ID (e.g. expense-reimbursement, encrypted-assignments, certification-training) is a module that can be enabled or disabled per tenant.
-
docs/source/likeperson.md · line 241admin-organization is always-on because it hosts the Feature Toggles UI itself - disabling it would remove the only place toggles can be re-enabled (circular dependency).
-
docs/source/likeperson.md · line 237-238Backend is the source of truth. The API exposes the enabled module set for the current user's tenant as part of the session/bootstrap response. Every endpoint that belongs to a module checks the tenant's enabled set before executing
Analysis
The four participating organizations have materially divergent feature needs - encrypted assignments are critical for Blindeforbundet but irrelevant to others; expense reimbursement is mandatory for HLF and Blindeforbundet but not for Barnekreftforeningen. Rather than maintaining per-organization code forks, the toggle system allows a single codebase to serve all tenants with appropriate scope. This directly enables the multi-tenant business model, keeps maintenance overhead low, and allows new organizations to onboard by configuration rather than code changes, making the platform commercially scalable.
The module_toggles table stores one row per area per organization with an enabled boolean. The API bootstrap endpoint includes the full enabled module set; clients mount only enabled area modules at runtime without compile-time switching. Backend route handlers check the tenant's enabled set before executing module-scoped operations. The admin UI lists all toggleable areas with human-readable names, current state, and dependency warnings (enabling an area that requires another auto-enables the dependency with a visible notification). Always-on modules are displayed as locked and excluded from the toggle editor to prevent the circular-dependency failure mode described in §4.
Components (10)
Shared Components
These components are reused across multiple features
User Stories
No user stories have been generated for this feature yet.