LogoLaunchSaaS

Getting Started

Quick start guide for LaunchSaaS – clone the repo, install dependencies, configure your database, and run your SaaS locally in minutes.

This guide will walk you through setting up LaunchSaaS. We will go through the process of cloning the project, installing dependencies, setting up your database and running the local development server.

Prerequisites

Before you begin, make sure you have the following installed:

Node.js

Node.js 20+ is required. If Node.js is not installed, download it from the Node.js official website.

# Check if Node.js is installed
node --version

Git

Git is a version control system used to track changes in files. If Git is not installed, download it from the Git official website.

# Check if Git is installed
git --version

Package Manager

We recommend using pnpm, but you can use npm, yarn, or bun as well.

Quick Installation

1. Set Up Your Project

Clone the repository to your local machine:

git clone https://github.com/LaunchSaasOrg/saas.git your-project-name
cd your-project-name

The monorepo contains apps/launchsaas/ — this is the real LaunchSaaS product app. Copy it to your own app directory and work from there:

cp -r apps/launchsaas apps/your-app

Then update the name field in apps/your-app/package.json to match your app name:

// apps/your-app/package.json
{ "name": "your-app" }

Finally, update the root package.json so all workspace scripts point to your app instead of launchsaas. Replace every --filter launchsaas with --filter your-app:

// package.json (root)
{
  "scripts": {
    "dev": "pnpm --filter your-app dev",
    "build": "pnpm --filter your-app build",
    "start": "pnpm --filter your-app start",
    "db:generate": "pnpm --filter your-app db:generate",
    "db:migrate": "pnpm --filter your-app db:migrate",
    "db:push": "pnpm --filter your-app db:push",
    "init:db": "pnpm --filter your-app init:db",
    "init:scripts": "pnpm --filter your-app init:scripts"
  }
}

apps/launchsaas/ is kept as a reference and receives upstream updates. Make all your customizations in your own copy (e.g. apps/your-app/) so you can merge future LaunchSaaS updates without conflicts.

2. Install Dependencies

Install the dependencies by running:

pnpm install

3. Set Up Environment Variables

Copy the example environment file into your app directory:

cp apps/your-app/.env.example apps/your-app/.env

Then open apps/your-app/.env and fill in the values. The .env.example file contains all available variables with inline comments.

4. Initialize the Database

Run the database initialization command:

pnpm run init

This command will:

  1. Generate database migrations
  2. Apply migrations to your database
  3. Create the admin user

Make sure you have configured DATABASE_URL in your .env file before running this command. See the Database guide for setup instructions.

5. Start the Development Server

pnpm run dev

This will start the development server on http://localhost:3000.

Verify Installation

To verify everything is working correctly:

  1. Homepage: Visit http://localhost:3000 - You should see the landing page
  2. Sign In: Go to http://localhost:3000/auth/sign-in - Try signing in with the admin credentials (from your .env file)
  3. Dashboard: After signing in, you should be redirected to the dashboard
  4. Admin Panel: Visit http://localhost:3000/en/admin to access admin features (note the /en locale prefix)

Development Commands

CommandDescription
pnpm run devStart development server
pnpm run buildBuild for production
pnpm startStart production server
pnpm run formatLint, format, and auto-fix with Biome
pnpm run db:generateGenerate database migrations
pnpm run db:migrateApply database migrations
pnpm run initInitialize database and create admin user

Next Steps

Now that you have LaunchSaaS running, here are some next steps: