Configuration
Where TurboJet knobs live — env, feature flags, i18n, payments, mail, and storage.
TurboJet is configured per package and via the root .env. There are no apps/marketing/config.ts or apps/saas/config.ts files — behavior is owned by @repo/env, @repo/shared/features, and the feature packages.
Config surfaces
| Area | Where |
|---|---|
| Environment variables | Root .env + Zod schemas in @repo/env — see Environment |
| Feature flags / payment provider | packages/shared/src/features.ts |
| Internationalization | packages/i18n — locales en / id |
| Payments / storefront | @repo/payments + Mayar (or other provider) env — Payments |
Resend env; SMTP helpers exist but are commented out in sendEmail — Mail | |
| Storage | S3_* — Storage |
| Auth package | Trusted origins and social provider env — Authentication |
Feature flags and payment provider
export const features: Features = {
onboardingFlow: true,
paymentsProvider: PaymentProvider.Mayar,
apiDocs: process.env.NODE_ENV !== "production",
sentry: process.env.NEXT_PUBLIC_ENABLE_SENTRY !== "false",
posthog: process.env.NEXT_PUBLIC_ENABLE_POSTHOG !== "false",
};Change paymentsProvider to PaymentProvider.Polar, Midtrans, or Doku when you switch adapters. Sentry and PostHog can also be disabled with NEXT_PUBLIC_ENABLE_*="false".
Internationalization
Messages are scoped under packages/i18n/src/:
marketing/{en,id}.jsonmail/{en,id}.jsonsaas/{en,id}.json(catalog for product UI when you host it)
Supported locales: en, id. Marketing uses next-intl; docs use Fumadocs locale MDX. See Internationalization.
Payments
Plan IDs, display prices, and Mayar payment-link URLs live in @repo/payments and the Mayar env keys listed in Environment. Storefront checkout is created from the marketing app — Storefront checkout.
Set RESEND_KEY and RESEND_EMAIL_DOMAIN. sendEmail always uses Resend today. Optional SMTP_* / MAILPIT_URL are validated for local Mailpit but are not wired until you uncomment the SMTP branch — Mailpit.
Storage
Configure the S3-compatible client with S3_REGION, S3_BUCKET, S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, and optional S3_PUBLIC_URL. See Storage setup.
Use cases
Marketing site
apps/marketing owns public routes, legal pages, SEO, Mayar checkout, and hosts Hono at /api. Configure public URLs and Mayar keys in .env.
Documentation site
apps/docs owns Fumadocs MDX and chrome i18n. Set NEXT_PUBLIC_DOCS_URL. Do not add the docs origin to Better Auth trustedOrigins.
Kit packages (no product host here)
@repo/auth, @repo/database, and product-oriented API modules remain in the monorepo for when you add a product app. Point leftover NEXT_PUBLIC_SAAS_URL / NEXT_PUBLIC_APP_URL at marketing (or your future product origin) so CORS and trusted origins stay valid.