Module Toggle Store
Component Detail
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.
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.
-
docs/source/likeperson.md · line 174-177Module = 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
-
docs/source/likeperson.md · line 180Admin 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