Skip to content

Feature flag system #894

@tjementum

Description

@tjementum

markdown## Feature flag system

A built-in feature flag system with four levels, defined in code and controlled from the back office.

  • Account flags are per tenant

    • Owners can opt their organization in to flags marked configurable (for example, beta features or custom branding) from the Account Settings page
    • Non-configurable flags are rolled out gradually by setting a rollout percentage in the back office
  • User flags are per user, typically for UI/UX experiments that do not produce tenant-level data

    • Users can opt in to configurable flags from the User Preferences page
    • A/B rollouts work the same way as account flags
  • Plan flags gate features behind subscription tiers (Basic, Standard, Premium)

    • For example, SSO is only available on Premium
    • The mapping is defined in code and recomputed when a tenant's plan changes
    • The back office shows which tenants currently have access
  • System flags are platform wide capabilities like Google OAuth or Stripe subscriptions

    • Toggled with environment variables, typically set via GitHub Variables
  • A/B testing uses a permanent rollout bucket (1 to 99) assigned to every user and account at creation

    • Each flag gets its own starting bucket
    • At 1% rollout, only the bucket matching the flag's start position receives the feature; at 99%, only one bucket is excluded
    • This avoids the common problem where the same low numbered users always get features first
  • Telemetry captures the full set of active flags on every event (requests, page views, custom events, exceptions, dependency calls), so the impact of any flag can be measured directly in Application Insights

  • The back office provides a list view of all flags, plus per user and per account detail pages showing exactly which flags are active for whom

Metadata

Metadata

Assignees

No one assigned

    Labels

    RoadmapThis is a big roadmap item

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions