Infrastructure medium complexity shared
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Static registry that declares all toggleable area IDs, their human-readable names, which product they belong to (mobile vs admin), their always-on status, and their dependency relationships. Both the admin UI and the Module Configuration Service read from this registry rather than hardcoding module lists, keeping the toggle surface in sync with the canonical area taxonomy.

Feature: Feature Toggles

module-registry-definition

Sources & reasoning

The source doc explicitly requires that always-on status and module dependencies be declared in a registry rather than inferred or hardcoded. This infrastructure component implements that registry as a shared artifact readable by both the Next.js backend and the admin frontend, preventing drift between the two.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Enumerate all area IDs as valid toggleable module identifiers
  • Declare always-on module sets per product so UI and service can enforce non-toggleable status
  • Declare dependency edges between modules so dependency resolution is data-driven not hardcoded
  • Serve as a single source of truth for module metadata across frontend and backend

Interfaces

getAllModules(): ModuleDefinition[]
getAlwaysOnModules(product: 'mobile' | 'admin'): string[]
getDependencies(moduleId: string): string[]
getModuleMetadata(moduleId: string): ModuleDefinition

Related Data Entities (1)

Data entities managed by this component