Launchframe

Quick Start

1. Generate your project

npx create-launchframe my-saas

Follow the interactive prompts to pick your template, database driver, billing provider, and more.

2. Configure environment

cd my-saas
cp .env.example .env.local

Open .env.local and fill in:

# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/my_saas

# Auth
BETTER_AUTH_SECRET=your-random-secret-here
BETTER_AUTH_URL=http://localhost:3000

# Billing (if using Stripe)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_PRICE_ID=price_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Email (if using Resend)
RESEND_API_KEY=re_...
EMAIL_FROM=onboarding@yourdomain.com

3. Set up the database

pnpm db:push    # push schema to your database
pnpm db:seed    # optional: seed demo data

4. Start developing

pnpm dev

Visit http://localhost:3000. You should see the landing page. Sign up to create your first account.

5. Available scripts

ScriptDescription
pnpm devStart dev server (Turbopack)
pnpm buildProduction build
pnpm startStart production server
pnpm lintLint with ESLint
pnpm lint:fixFix lint errors
pnpm typecheckTypeScript type checking
pnpm testRun Vitest unit tests
pnpm test:e2eRun Playwright E2E tests
pnpm db:pushPush Drizzle schema to database
pnpm db:migrateRun Drizzle migrations
pnpm db:seedSeed demo data
pnpm db:studioOpen Drizzle Studio

Project structure

my-saas/
├── src/
│   ├── app/                # Next.js App Router pages
│   │   ├── page.tsx        # Landing / marketing page
│   │   ├── dashboard/      # Protected dashboard
│   │   ├── settings/       # Account settings (dashboard template)
│   │   ├── billing/        # Billing management
│   │   ├── email/          # Email demo
│   │   ├── sign-in/        # Authentication
│   │   └── sign-up/
│   ├── components/
│   │   └── auth/           # Auth form component
│   ├── lib/
│   │   ├── auth.ts         # Better Auth setup
│   │   ├── auth-client.ts  # Client-side auth
│   │   ├── auth-session.ts # Session helper
│   │   ├── env.ts          # Environment validation
│   │   ├── billing/        # Billing provider abstraction
│   │   └── email/          # Email client + templates
│   └── db/
│       ├── index.ts        # Drizzle client
│       ├── schema/         # Drizzle schema (auth, projects)
│       └── seeds/          # Seed script
├── drizzle.config.ts       # Drizzle configuration
├── .env.example            # Env template
├── AGENTS.md               # AI agent rules
├── ARCHITECTURE.md          # Project architecture
└── launchframe.json        # Generation manifest