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
| Area | Location |
|---|---|
| App settings | apps/web/config/app.config.ts |
| Auth settings | apps/web/config/auth.config.ts |
| Account mode | apps/web/config/account-mode.config.ts |
| Feature flags | apps/web/config/feature-flags.config.ts |
| Billing config | packages/billing/config/src/config.ts |
| Navigation | route-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 →