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:
NEXT_PUBLIC_ACCOUNT_MODEviaapps/web/config/account-mode.config.ts- 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:
enableOrganizationsenablePersonalAccountallowUserToCreateOrganizationenablePersonalAccountBillingenableOrganizationsBillingshowAccountSwitcherenableAccountDeletionenableOrganizationDeletion
Read directly from env
These are the only direct env overrides in feature-flags.config.ts:
NEXT_PUBLIC_ENABLE_THEME_TOGGLE=trueNEXT_PUBLIC_ENABLE_VERSION_UPDATER=falseNEXT_PUBLIC_ENABLE_CUSTOM_ROLES=falseNEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING is read in account-mode.config.ts.
Where Flags Live
apps/web/config/account-mode.config.tsapps/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.