Skip to main content

Feature Flags Module

Lightweight, in-process feature toggles with optional user/group targeting and percentage rollouts. Evaluation runs inside your app. In the core package, flags are sourced from in-memory configuration or a local JSON file. An Azure App Configuration provider is planned as a separate package.

Maturity: Preview

Feature Flags is in preview. The Azure App Configuration provider is not available in the core package yet.

Key Capabilities

  • Boolean Toggles: Global on/off switches.
  • Percentage Rollouts: Gradual rollout (0-100%) that is sticky by user ID.
  • Targeting: Allow lists for specific Users and Groups.
  • Time-Based Activation: Schedule features to start or end at specific UTC times.
  • Multiple Providers: choose between In-Memory or JSON File in the core package.
  • Real-Time Refresh: Hot-reload support for JSON file changes.

Providers

The module supports three distinct providers for storing feature definitions:

ProviderDescriptionConfiguration
InMemory (Default)Flags are defined directly in appsettings.json. Best for development and simple static flags.Flags: { ... } in appsettings
JsonFileFlags are stored in a separate JSON file with hot-reload support.Provider: "JsonFile", JsonFilePath: "flags.json"
Azure App ConfigurationPlanned provider for centralized management in Azure.Requires a separate provider package (not published yet).

Packages

  • .NET: PrimusSaaS.FeatureFlags
  • Node.js: Coming soon