coldstart

Deployment & infrastructure

Database, email, billing, and hosting setup

After scaffolding, you need to set up external services. You can do this manually, via coldstart setup, or conversationally with Claude Code and MCP servers.

Interactive setup

Terminal
coldstart setup

Walks you through each service based on your project's .coldstart.json. Every step is optional and shows its status at the end.

Service by service

Database (Neon)

Claude Code
> Create a Neon database for my project

Claude uses the Neon MCP to create a project, gets the connection string, and writes it to apps/api/.env.

  1. Create a project at console.neon.tech
  2. Copy the connection string
  3. Add to apps/api/.env:
apps/api/.env
DATABASE_URL=postgresql://user:pass@ep-xxx.neon.tech/dbname?sslmode=require
  1. Run migrations:
Terminal
pnpm -F @my-app/db db:generate
pnpm -F @my-app/db db:migrate

Auth secrets

Generate a secret (min 32 characters) and configure the API URL:

apps/api/.env
BETTER_AUTH_SECRET=your-random-secret-at-least-32-characters
BETTER_AUTH_URL=http://localhost:3001
CORS_ORIGIN=http://localhost:3000

For OAuth providers, create apps on each provider's console and add the credentials.

Billing

  1. Create products and prices in Stripe Dashboard
  2. Configure webhook: Developers → Webhooks → Add endpoint
    • URL: https://your-api.com/webhooks/stripe
    • Events: customer.subscription.*, checkout.session.completed
  3. Add to apps/api/.env:
apps/api/.env
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
  1. Add to apps/web/.env:
apps/web/.env
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
  1. Create products on dashboard.polar.sh
  2. Configure webhook URL: https://your-api.com/webhooks/polar
  3. Add to apps/api/.env:
apps/api/.env
POLAR_ACCESS_TOKEN=...
POLAR_WEBHOOK_SECRET=...

For mobile billing, configure RevenueCat: create products matching your App Store/Play Store offerings, add API keys to your mobile .env.

Email (Resend)

Claude Code
> Set up Resend for my project

Claude uses the Resend MCP to configure a sending domain and add the API key.

  1. Create an account at resend.com
  2. Add and verify your domain
  3. Add API key to apps/api/.env:
apps/api/.env
RESEND_API_KEY=re_...

Email templates are in packages/email/src/ — preview them with pnpm -F @my-app/email dev.

Web hosting (Vercel)

Claude Code
> Deploy my web app to Vercel
Terminal
pnpm dlx vercel

Or connect your Git repo in the Vercel dashboard — auto-deploys on push.

API hosting (Docker)

The generated Dockerfile is a multi-stage build optimized for production:

Terminal
docker build -t my-api -f apps/api/Dockerfile .
docker run -p 3001:3001 my-api

Or use the docker-compose.yml for local development with PostgreSQL:

Terminal
docker compose up -d   # starts Postgres on port 5432

Mobile builds (EAS)

Terminal
cd apps/mobile
pnpm dlx eas-cli init --non-interactive

Then use the release scripts:

  • bash scripts/release-local.sh — full pipeline: version bump → EAS build → submit → TestFlight
  • bash scripts/release.sh — CI-friendly version bump

The Expo MCP server is configured for Claude Code to manage builds and submissions.

CI/CD

Two GitHub Actions workflows are generated:

WorkflowTriggerWhat it does
ci.ymlPush/PR to mainLint, check-types, test, build
deploy.ymlPush to mainVercel deployment placeholder
desktop.ymlVersion tagsTauri multi-platform builds (if desktop)

On this page