Skip to main content
Vibestrap separates configuration into three layers, each with a clear purpose. Knowing which layer to touch will save you a lot of time.

The three layers

If you find yourself editing component source to change copy, stop — you should be editing messages/{en,zh}.json instead.

What siteConfig controls

The whole file is ~250 lines. Here are the load-bearing fields:
Every field has inline comments — read it once cover-to-cover, you’ll know what you can change without grep-ing the codebase.

What lives outside siteConfig

These have their own homes — by design.

Adding a new feature flag

  1. Add to siteConfig.features:
  2. Reference in code:
That’s it — no extra plumbing.

Adding an env var

  1. Add a Zod-validated entry in src/env.ts (server section if it’s secret; client section if it has the NEXT_PUBLIC_ prefix and is safe to ship to the browser).
  2. If it’s a public var, add it to experimental__runtimeEnv too (Next.js requires this).
  3. Document it in Env reference.
  4. Use import { env } from '@/env' to read it — never process.env.X directly.

Best-practice checklist

  • ✅ Brand changes happen in siteConfig and messages/. No component-source edits.
  • ✅ Secrets only in .env.local. The .env.example documents the shape; the real .env.local is gitignored.
  • ✅ When swapping a provider (Stripe → Creem), change siteConfig.payment.provider AND set the matching *_PRICE_* env vars. The rest of the app doesn’t care which provider is active.
  • ✅ Both messages/en.json and messages/zh.json always have the same keys. node scripts/check-i18n.mjs enforces this.