Simulacrum

Configuration

Reference for simulacrum.config.ts and how generated projects expose toggles for database, auth, payments, storage, and optional features.

simulacrum.config.ts

Generated projects include a single configuration module that drives code generation boundaries and runtime feature flags. Treat it as the contract between the CLI output and your deployment environment.

Core blocks

Typical sections include:

  • databaseadapter, connection URLs, pool hints, migration runner
  • auth — better-auth providers, session strategy, optional 2FA and passkeys
  • payments — active provider (Stripe, Lemon Squeezy, Polar, Creem, Dodo), price IDs, portal URLs
  • storage — S3-compatible provider, bucket, public URL base
  • mailing — transactional provider (Resend, Postmark, Nodemailer, Plunk)
  • analytics — Plausible, Google Analytics, PostHog, Umami, Mixpanel, Vercel, or none
  • tasks — Trigger.dev, QStash, BullMQ, or none
  • ai — optional model providers and feature toggles per template
typescript
// Example shape (names align with your generated project)
export const simulacrumConfig = {
  database: {
    adapter: "drizzle" as const,
    url: process.env.DATABASE_URL,
  },
  auth: {
    providers: ["google", "github", "magic-link", "credentials"],
  },
  payments: {
    provider: "stripe" as const,
  },
  storage: {
    provider: "r2" as const,
    bucket: process.env.STORAGE_BUCKET,
  },
} as const;

Keep secrets in environment variables only. Commit example values in .env.example, not real keys.

Environment parity

Mirror simulacrum.config.ts expectations across local, preview, and production. Missing variables should fail fast at startup where the generated app validates config.