Skip to content
GitHubTwitterDiscord

Prerequisites & Initial Setup

Before you begin building your SaaS application with LaunchKit, you’ll need to set up several prerequisites and external services. This guide will walk you through everything you need to get started.

  • Node.js 18+ (recommended: Node.js 20+)
  • Package Manager: Choose one of the following:
    • Bun (recommended for best performance)
    • npm (comes with Node.js)
    • yarn (alternative)
  • Code Editor: VS Code, WebStorm, or your preferred editor
  • Git: For version control
  • Terminal: Command line access

Supabase provides your database, authentication, and storage.

Setup Steps:

  1. Go to supabase.com
  2. Sign up for a free account
  3. Create a new project
  4. Note down your project URL and API keys (we’ll use these later)

What you’ll get:

  • PostgreSQL database with real-time subscriptions
  • Built-in authentication with OAuth providers
  • File storage for user avatars
  • Row Level Security (RLS) for data protection

Stripe handles all payment processing and subscription management.

Setup Steps:

  1. Go to stripe.com
  2. Create an account
  3. Complete account verification for production use
  4. Access your dashboard to get API keys

What you’ll get:

  • Payment processing (one-time and subscriptions)
  • Customer portal for subscription management
  • Webhook endpoints for real-time payment updates
  • Detailed analytics and reporting

Resend powers all transactional emails in your SaaS.

Setup Steps:

  1. Go to resend.com
  2. Sign up for an account
  3. Verify your domain (or use their test domain for development)
  4. Generate an API key

What you’ll get:

  • Transactional email delivery
  • Email templates and customization
  • Delivery analytics
  • DKIM/SPF authentication

Only needed if you’re selling access to private GitHub repositories.

Setup Steps:

  1. Ensure you have a GitHub account
  2. Create a Personal Access Token with repo permissions
  3. Set up the repositories you want to grant access to

Create a .env file in your project root with the following variables:

# -----------------------------------------------------------------------------
# Application
# -----------------------------------------------------------------------------
NODE_ENV=development
NEXT_PUBLIC_APP_URL=http://localhost:3000

# -----------------------------------------------------------------------------
# Database (Supabase)
# -----------------------------------------------------------------------------
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key

# -----------------------------------------------------------------------------
# Payments (Stripe)
# -----------------------------------------------------------------------------
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret

# -----------------------------------------------------------------------------
# Email (Resend)
# -----------------------------------------------------------------------------
RESEND_API_KEY=your_resend_api_key

# -----------------------------------------------------------------------------
# GitHub (Optional)
# -----------------------------------------------------------------------------
GITHUB_TOKEN=your_github_personal_access_token

# -----------------------------------------------------------------------------
# AI Features (Optional)
# -----------------------------------------------------------------------------
ANTHROPIC_API_KEY=your_anthropic_api_key

If you have multiple Node.js versions, use a version manager:

  • nvm (Linux/macOS): nvm use 20
  • nvs (Windows): nvs use 20
  • Ensure .env is in your project root (same level as package.json)
  • Restart your development server after adding new variables
  • Don’t include spaces around the = sign
  • Verify your project URL format: https://[project-id].supabase.co
  • Check that your anon key starts with eyJ
  • Ensure your service role key has the correct permissions