Application Configuration

Configure the app with env vars and TypeScript config files.

Configuration in this repo is split between env vars and TypeScript config files.

  • Use env vars for per-environment values and secrets.
  • Use config files for typed objects and code-backed settings.

This section covers the current setup used by apps/web.

Main Config Areas

AreaLocation
App settingsapps/web/config/app.config.ts
Auth settingsapps/web/config/auth.config.ts
Account modeapps/web/config/account-mode.config.ts
Feature flagsapps/web/config/feature-flags.config.ts
Billing configpackages/billing/config/src/config.ts
Navigationroute-specific files such as apps/web/app/[locale]/(internal)/_config/navigation.config.tsx

Example Env Vars

NEXT_PUBLIC_PRODUCT_NAME="Your SaaS"
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
NEXT_PUBLIC_ACCOUNT_MODE="hybrid"
DATABASE_URL="postgresql://..."
BETTER_AUTH_SECRET="your-secret"

Common Pitfalls

  • Restart the dev server after changing env vars.
  • Do not put secrets behind NEXT_PUBLIC_.
  • Do not assume every setting can change without restart or redeploy.

Next: App Configuration →