Getting Started
Set up and run your LaunchSaaS website in minutes
Getting Started
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 --versionGit
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 --versionPackage Manager
We recommend using npm (comes with Node.js), but you can use pnpm, 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-name2. Install Dependencies
Install the dependencies by running:
npm install3. Set Up Environment Variables
Copy the example environment file as a starting point:
cp .env.example .envThen, open the .env file and set the variables to your desired values. You can find more information in the Environment Setup guide.
4. Initialize the Database
Run the database initialization command:
npm run initThis command will:
- Generate database migrations
- Apply migrations to your database
- 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
npm run devThis will start the development server on http://localhost:3000.
Verify Installation
To verify everything is working correctly:
- Homepage: Visit http://localhost:3000 - You should see the landing page
- Sign In: Go to http://localhost:3000/auth/sign-in - Try signing in with the admin credentials (from your
.envfile) - Dashboard: After signing in, you should be redirected to the dashboard
- Admin Panel: Visit http://localhost:3000/admin to access admin features
Development Commands
| Command | Description |
|---|---|
npm run dev | Start development server |
npm run build | Build for production |
npm start | Start production server |
npm run lint | Run ESLint |
npm run format | Format code with Prettier |
npm run db:generate | Generate database migrations |
npm run db:migrate | Apply database migrations |
npm run init | Initialize database and create admin user |
Next Steps
Now that you have LaunchSaaS running, here are some next steps: