Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Persistence layer storing per-organization module enablement state and the static module dependency declarations. Provides transactional reads and writes used by the Module Registry Service.

Feature: Feature Toggles

module-toggle-store

Sources & reasoning

§170-186 describes module toggles as the platform's core multi-tenancy mechanism; §180 explicitly names admin-organization as the host for the Feature Toggles UI. Must be MVP because the always-on admin areas need this surface from day one to differentiate tenants.

  • Module = 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
  • Admin Web Portal: `admin-dashboard`, `admin-user-management`, `admin-organization`, `admin-security`. `admin-organization` is always-on because it hosts the Feature Toggles UI itself

Responsibilities

  • Persist enabled/disabled state for each module per organization
  • Store module dependency declarations for graph resolution
  • Provide transactional updates for cascade-enable operations
  • Return current toggle state efficiently for navigation resolution
  • Track audit metadata for toggle changes (who, when)

Interfaces

getToggleState(orgId, moduleId): ToggleRecord
setToggleState(orgId, moduleId, enabled, actorId): void
getDependencies(moduleId): ModuleId[]
bulkUpdateToggles(orgId, changes): void