Installation
Clone, install, configure, and run LaunchFst in under five minutes.
Prerequisites
- Node.js 18+ — nodejs.org
- pnpm —
npm install -g pnpm - PostgreSQL — local install, Neon (recommended, free tier), or Supabase
Quick Start
Clone and install
git clone https://github.com/your-org/launchfst.git my-app
cd my-app
pnpm installConfigure environment variables
cp .env.example .env.localOnly DATABASE_URL is required to start. Everything else is optional.
Set up the database
pnpm db:push # push schema to database (no migration history)
pnpm db:generate # generate Prisma client (run after schema changes)For a local database using Docker:
pnpm docker:dev # starts postgres:17-alpine on port 5432
# Use: DATABASE_URL="postgresql://launchfst:launchfst@localhost:5432/launchfst"Start the dev server
pnpm dev # starts on http://localhost:3000 with TurbopackCreate your first account
Go to http://localhost:3000/signup. To promote your account to SuperAdmin:
pnpm make-superadmin your@email.comEnvironment Variables
All variables are documented here. Copy .env.example → .env.local and fill in what you need.
Required
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
NEXTAUTH_URL | Your app URL (http://localhost:3000 in dev) |
AUTH_SECRET | Random secret for JWT signing — generate with openssl rand -base64 32 |
.env.local. It's already in .gitignore, but double-check before pushing.Payments (choose one)
Set PAYMENT_PROVIDER to activate a provider. Leave empty to disable payments (billing page shows a setup guide).
PAYMENT_PROVIDER="lemonsqueezy" # or "polar" or "stripe"LemonSqueezy:
| Variable | Description |
|---|---|
LEMONSQUEEZY_API_KEY | API key from app.lemonsqueezy.com → Settings → API |
LEMONSQUEEZY_STORE_ID | Store ID from Settings → Stores |
LEMONSQUEEZY_WEBHOOK_SECRET | Webhook signing secret |
Polar:
| Variable | Description |
|---|---|
POLAR_ACCESS_TOKEN | Access token from Polar Dashboard → Settings → API |
POLAR_WEBHOOK_SECRET | Webhook signing secret |
POLAR_MODE | sandbox for testing, production for live |
Stripe:
| Variable | Description |
|---|---|
STRIPE_SECRET_KEY | Secret key (sk_live_xxx or sk_test_xxx) |
STRIPE_PUBLISHABLE_KEY | Publishable key (pk_live_xxx or pk_test_xxx) |
STRIPE_WEBHOOK_SECRET | Webhook signing secret (whsec_xxx) |
Email (choose one)
Set EMAIL_PROVIDER to activate email sending. Leave empty to log emails to console (local dev).
EMAIL_PROVIDER="resend" # or "nodemailer"
EMAIL_FROM="YourSaaS <noreply@yourdomain.com>"Resend:
| Variable | Description |
|---|---|
RESEND_API_KEY | API key from resend.com → API Keys |
Nodemailer (SMTP):
| Variable | Description |
|---|---|
SMTP_HOST | SMTP server hostname |
SMTP_PORT | SMTP port (default: 587) |
SMTP_USER | SMTP username |
SMTP_PASS | SMTP password |
SMTP_SECURE | Use TLS (true/false, default: false) |
OAuth
Both providers default to disabled. Set NEXT_PUBLIC_*_ENABLED="true" and provide credentials to show the login button.
NEXT_PUBLIC_GOOGLE_ENABLED="true"
GOOGLE_CLIENT_ID="your-client-id"
GOOGLE_CLIENT_SECRET="your-client-secret"
NEXT_PUBLIC_GITHUB_ENABLED="true"
GITHUB_CLIENT_ID="your-client-id"
GITHUB_CLIENT_SECRET="your-client-secret"Feature Flags
Toggle features on/off at build time. All default to enabled.
NEXT_PUBLIC_ENABLE_BLOG="true"
NEXT_PUBLIC_ENABLE_DOCS="true"
NEXT_PUBLIC_ENABLE_CONTACT="true"
NEXT_PUBLIC_ENABLE_NEWSLETTER="true"
NEXT_PUBLIC_ENABLE_ORGANIZATIONS="true"
NEXT_PUBLIC_ENABLE_WAITLIST="true"
NEXT_PUBLIC_ENABLE_FEEDBACK="true"
NEXT_PUBLIC_ENABLE_CHANGELOG="true"
NEXT_PUBLIC_ENABLE_SEARCH="true"
NEXT_PUBLIC_COMING_SOON="false"
NEXT_PUBLIC_DEMO_MODE="false"Feature Add-ons
These are only needed when you enable the corresponding feature add-on.
AI Chat:
AI_PROVIDER="openai" # or "anthropic"
OPENAI_API_KEY="sk-..."
# ANTHROPIC_API_KEY="sk-ant-..."File Uploads (UploadThing):
UPLOADTHING_TOKEN="your-token"Rate Limiting (Upstash Redis):
UPSTASH_REDIS_REST_URL="https://..."
UPSTASH_REDIS_REST_TOKEN="your-token"Error Monitoring (Sentry):
NEXT_PUBLIC_SENTRY_DSN="https://...@sentry.io/..."
SENTRY_ORG="your-org"
SENTRY_PROJECT="your-project"Analytics:
NEXT_PUBLIC_ANALYTICS_PROVIDER="posthog" # or "google"
NEXT_PUBLIC_POSTHOG_KEY="phc_..."
NEXT_PUBLIC_POSTHOG_HOST="https://us.i.posthog.com"
# NEXT_PUBLIC_GA_ID="G-..."Contact form email destination:
CONTACT_EMAIL="hello@yourdomain.com"Available Scripts
| Script | Description |
|---|---|
pnpm dev | Start dev server (Turbopack, port 3000) |
pnpm build | Production build |
pnpm start | Start production server |
pnpm lint | Run ESLint |
pnpm db:push | Push Prisma schema to database |
pnpm db:generate | Generate Prisma client |
pnpm db:studio | Open Prisma Studio GUI |
pnpm make-superadmin | Promote user to SUPERADMIN by email |
pnpm seed-demo | Create demo users and orgs |
pnpm email:preview | Preview email templates |
pnpm docker:dev | Start local PostgreSQL with Docker |
pnpm docker:down | Stop Docker PostgreSQL |
pnpm docker:build | Build Docker image |
pnpm docker:prod | Run production Docker container |
Common Issues
DATABASE_URL not set — The app will crash on startup. Set it in .env.local.
Prisma client not generated — Run pnpm db:generate after cloning or after schema changes.
Auth error "AUTH_SECRET is not set" — Generate with openssl rand -base64 32 and add to .env.local.
OAuth redirect mismatch — Add http://localhost:3000/api/auth/callback/google (and /github) to your OAuth app's allowed redirect URIs.
Port 5432 in use — Another PostgreSQL instance is running. Stop it or change the Docker port mapping in docker-compose.yml.