Skip to main content

Feature Flags App

The feature flags app enables runtime control of features without deploying code changes.

Overview

Feature flags allow:
  • Testing in production
  • Incremental rollouts
  • Quick fixes
  • Per-customer features
See Feature Flags for detailed patterns.

Checking Flags

Backend

if ctx.feature_flag_enabled(FeatureFlagNameEnum.MY_FEATURE):
    # New behavior
else:
    # Old behavior

Frontend

const isEnabled = useFeatureFlagActive(FeatureFlagNameEnum.MY_FEATURE);

Flag Scopes

ScopeDescription
EnvironmentAll requests in environment
CustomerSpecific customer
UserSpecific user

Models

ModelDescription
FeatureFlagThe flag itself
FeatureFlagOverrideOverride for user/customer

Lifecycle

1

Add flag

Add to enum, i18n, create migration.
2

Use flag

Check in code, roll out by scope.
3

Remove flag

After full rollout, remove code and migration.