Skip to content
SETUP.mdExample: SaaS with AI preset

Set up your
services.

Every generated repo contains a SETUP.md that follows the modules and providers you picked. It holds a checklist, one merged block of environment variables, and a guide per module. This page shows the one for the SaaS with AI preset.

What is in SETUP.md

  • ChecklistCreate .env, push the database schema, work through the module guides, start the app.
  • Environment variablesOne block for the whole project. A variable several modules use is listed once.
  • Module guidesAccounts, keys and buckets for each module, written from the same notes the CLI prints after install.

Checklist

  • Create .env in the project root and paste the values from Environment variables, then fill them in.
  • Push the database schema: npx prisma db push
  • Work through the module guides below (accounts, keys, buckets).
  • Start the app: npm run dev

Module guides

Open one, pick the provider you chose in the builder
0 of 6 services set up
    1. Get a database

      Use any PostgreSQL host you already have, or a local one.

    2. Set the connection string

      Edit DATABASE_URL in .env with your real connection string.

      DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
    3. Push the schema

      Creates the tables of every module you installed.

      npx prisma db push

Your .env

Everything above in one file
# Database Configuration
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
DATABASE_POOL_SIZE=10
DATABASE_POOL_TIMEOUT=20

# Email Configuration
EMAIL_FROM="noreply@example.com"
EMAIL_REPLY_TO="support@example.com"
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# Resend Configuration
RESEND_API_KEY="your_resend_api_key_here"

# Auth Configuration
BETTER_AUTH_URL="http://localhost:3000"
BETTER_AUTH_SECRET="your-secret-key-here-replace-with-secure-random-string"
# Generate a secure random string using: openssl rand -base64 32

# Google OAuth (Optional)
# GOOGLE_CLIENT_ID="your_google_client_id"
# GOOGLE_CLIENT_SECRET="your_google_client_secret"

# Stripe Configuration
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Stripe Price IDs (test mode, server-only): one STRIPE_PRICE_<PLAN> per paid plan in lib/payments/plans.ts
STRIPE_PRICE_PLUS=price_test_xxxxxxxxxxxx
STRIPE_PRICE_PRO=price_test_xxxxxxxxxxxx

# Storage
STORAGE_PROVIDER=r2
STORAGE_DOWNLOAD_MODE=redirect
STORAGE_UPLOAD_URL_EXPIRES_IN=300
STORAGE_DOWNLOAD_URL_EXPIRES_IN=60

# Cloudflare R2: keep the bucket private (no public access, no r2.dev domain)
R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_BUCKET=
# eu uses <ACCOUNT_ID>.eu.r2.cloudflarestorage.com. Use auto only for non-EU buckets.
R2_JURISDICTION=eu

# AI
AI_GATEWAY_API_KEY=
AI_MODEL=anthropic/claude-haiku-5.5
AI_RATE_LIMIT_MAX=20
AI_RATE_LIMIT_WINDOW_SECONDS=60

The generated repo already ignores .env files in .gitignore. Add the same variables in your host's settings when you deploy.

Edit the file wherever you like: tailar add and tailar sync only rewrite the marked sections and keep your own text.

All set? Start the app.
$ npm run dev