Getting Started

Quick guide to get up and running with NestSaaS

Welcome to NestSaaS! This guide will help you quickly set up and start using your new multi-functional website platform.

Prerequisites

Before you begin, ensure you have the following:

  • Node.js 18.x or later
  • pnpm 8.x or later (NestSaaS uses pnpm as the package manager)
  • A PostgreSQL database (Neon/Supabase recommended)
  • Basic knowledge of Next.js and React

Quick Start

Prepare your project

First get access to the NestSaaS repository, then fork the repository on GitHub to your own account.

Clone the repository to your local machine:

# Clone the NestSaaS repository
git clone https://github.com/your-username/nestsaas.git my-project

Install dependencies

# Navigate to the project directory
cd my-project
 
# Install dependencies
pnpm install

Create a database

NestSaaS requires a Postgres database to work. Make sure to created a new database and have the connection string ready.

We've covered some options for hosting your Postgres database in the Database Setup guide, for example, using Neon, Supabase or setup a self-hosted Postgres database.

The Postgres connection string will look something like this:

DATABASE_URL='postgres://[user]:[password]@[db_hostname]/[dbname]?sslmode=require'

Setup environment variables

  1. Create a .env file in the root directory based on the .env.example:
cp .env.example .env
  1. Configure your .env file with essential settings including database connection details, authentication secrets, and API keys. For a comprehensive guide to all available environment variables and their configurations, refer to the Environment Setup documentation.

Initialize the database:

pnpm prisma migrate dev

Seed the database with initial data:

pnpm prisma db seed

Running the Development Server

Start the development server:

pnpm dev

Your NestSaaS application should now be running at http://localhost:3000.

Next Steps

Troubleshooting

If you encounter any issues during installation:

  1. Ensure all prerequisites are installed correctly
  2. Check that your database connection details are correct
  3. Verify that all environment variables are properly set
  4. Check the console for any error messages

If problems persist, please refer to our troubleshooting guide or reach out to our support team.

On this page