Feature Flags Configuration

Control feature availability with account mode defaults and a small set of env overrides.

Feature flags in this repo come from two places:

  1. NEXT_PUBLIC_ACCOUNT_MODE via apps/web/config/account-mode.config.ts
  2. A small set of explicit env overrides in apps/web/config/feature-flags.config.ts

This page is part of the Configuration documentation.

Current Flag Sources

Derived from account mode

These are computed automatically:

  • enableOrganizations
  • enablePersonalAccount
  • allowUserToCreateOrganization
  • enablePersonalAccountBilling
  • enableOrganizationsBilling
  • showAccountSwitcher
  • enableAccountDeletion
  • enableOrganizationDeletion

Read directly from env

These are the only direct env overrides in feature-flags.config.ts:

NEXT_PUBLIC_ENABLE_THEME_TOGGLE=true
NEXT_PUBLIC_ENABLE_VERSION_UPDATER=false
NEXT_PUBLIC_ENABLE_CUSTOM_ROLES=false

NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING is read in account-mode.config.ts.

Where Flags Live

  • apps/web/config/account-mode.config.ts
  • apps/web/config/feature-flags.config.ts

Using Flags in Code

import { featuresFlag } from '~/config/feature-flags.config';
if (featuresFlag.enableOrganizations) {
// org UI
}

Common Pitfalls

  • Do not assume every documented flag has an env override.
  • Changing env-backed flags still requires restarting the dev server or redeploying.
  • Account mode already drives most high-level behavior; prefer it over ad hoc toggles.

Next: Navigation Configuration →