Vibestacks LogoVibestacks
Getting Started

Installation & Local Development

Step-by-step guide to installing Vibestacks locally. Learn how to set up Docker, install dependencies with pnpm, and launch your development server in minutes.

This guide will walk you through setting up Vibestacks on your local machine. By the end, you'll have a fully running development environment ready for building your SaaS.

Prerequisites

Before you begin, make sure you have the following installed on your system.

Node.js

Node.js is the runtime environment that executes JavaScript code outside of a browser.

Check your Node.js version
node --version
# Required: v18.0.0 or higher

If Node.js is not installed or outdated, download it from the official Node.js website. We recommend using the LTS version.

Pro Tip

Use nvm (Node Version Manager) to easily switch between Node.js versions across different projects.

Git

Git is the version control system used to track changes and collaborate on code.

Check your Git version
git --version

If Git is not installed, download it from the official Git website.

Docker

Docker is required to run the local PostgreSQL database and other services. Vibestacks uses Docker Compose to orchestrate your local development environment.

Check your Docker version
docker --version
docker compose version

If Docker is not installed, download Docker Desktop for your operating system.

New to Docker?

Not sure what Docker is or why we use it? Read our guide on What is Docker and why does Vibestacks use it? for a beginner-friendly explanation.

Package Manager (pnpm)

We strongly recommend using pnpm for Vibestacks. It's significantly faster and handles dependencies more efficiently than npm or yarn.

Install pnpm globally
npm install -g pnpm
Verify the installation
pnpm --version

Why pnpm?

Curious about the benefits? Read our detailed breakdown on Why pnpm is the industry standard compared to npm and yarn.


Quick Installation

Follow these steps to get Vibestacks running on your machine in under 5 minutes.

Download the Source Code

Choose how you want to download Vibestacks. We recommend Forking the repository so you can easily pull future updates and improvements.

Forking creates your own copy of the repository that stays linked to the original, making it easy to sync updates.

  1. Visit the Vibestacks GitHub Repository.
  2. Click the Fork button in the top-right corner.
  3. Important: Set the visibility to Private.

Once forked, clone your copy to your machine:

git clone https://github.com/YOUR_USERNAME/vibestacks.git my-saas
cd my-saas

If you have direct access to the repository or are just testing locally:

git clone https://github.com/your-username/vibestacks-shipfast.git my-saas
cd my-saas

If you prefer not to use Git:

  1. Go to the Vibestacks Repository.
  2. Click CodeDownload ZIP.
  3. Extract the ZIP file to your preferred location.
  4. Open the extracted folder in your terminal.
cd path/to/vibestacks

Keep It Private

Per your license agreement, Vibestacks source code must remain in a private repository and cannot be redistributed. Violations may result in license termination and legal action. See full terms.

Install Dependencies

Install all project dependencies using pnpm. This will also set up any required tooling.

pnpm install

This process typically takes 30-60 seconds depending on your internet connection.

Run the Setup Script

Vibestacks includes an interactive setup script that handles everything for you - environment variables, Docker containers, and database initialization.

pnpm setup

The setup script will:

  • Create your .env.local file from the template
  • Guide you through configuring required environment variables
  • Start the Docker containers (PostgreSQL database)
  • Push the database schema using Drizzle ORM
  • Optionally seed the database with sample data

What's happening under the hood?

The setup script runs tsx scripts/init.ts, which orchestrates your local environment. It uses T3 Env for type-safe environment variable validation - if any required variables are missing or invalid, you'll get clear error messages telling you exactly what to fix.

Start the Development Server

Once setup is complete, start the local development server:

pnpm dev

Open http://localhost:3000 in your browser to see your app running.

Success!

If you see the Vibestacks landing page, congratulations - your setup is complete!


Manual Setup (Alternative)

If you prefer to configure everything manually instead of using the setup script, follow these steps.

Configure Environment Variables

Copy the example environment file to create your local configuration:

cp .env.example .env.local

Open .env.local in your editor and fill in the required values. For a detailed explanation of each variable, see the Environment Setup guide.

Type-Safe Environment Variables

Vibestacks uses T3 Env for runtime validation of environment variables. If a required variable is missing or has an invalid format, the app will fail to start with a descriptive error message - no more silent failures from typos.

Start Docker Containers

Spin up the local PostgreSQL database and any other required services:

docker compose up -d

This starts the containers in detached mode. To view logs:

docker compose logs -f

Push the Database Schema

Once the database container is running, push the Drizzle schema:

pnpm db:push

Seed the Database (Optional)

Populate the database with sample data for development:

pnpm db:seed

Start the Development Server

pnpm dev

Open http://localhost:3000 to view your app.


Available Scripts

Here's a quick reference of the most useful commands:

CommandDescription
pnpm devStart the development server on port 3000
pnpm buildCreate a production build
pnpm startRun the production build locally
pnpm setupInteractive setup script for first-time configuration
pnpm db:pushPush schema changes to the database
pnpm db:generateGenerate migration files from schema changes
pnpm db:migrateRun pending database migrations
pnpm db:studioOpen Drizzle Studio to browse your database
pnpm db:seedSeed the database with sample data
pnpm emailPreview email templates on port 3001
pnpm lintRun ESLint to check for code issues

Troubleshooting

Having issues? Here are solutions to common problems.

Port 3000 is already in use

Another application is using port 3000. Either stop that application or run Vibestacks on a different port:

pnpm dev --port 3001

Docker containers won't start

Ensure Docker Desktop is running, then try restarting the containers:

docker compose down
docker compose up -d

If issues persist, check for port conflicts (PostgreSQL uses port 5432 by default).

Database connection errors

Verify your DATABASE_URL in .env.local matches the Docker container configuration. The default local connection string is:

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/vibestacks"

Environment variable validation errors

T3 Env will show you exactly which variables are missing or invalid. Check the error message and update your .env.local file accordingly.

Module not found errors

Try clearing the cache and reinstalling dependencies:

rm -rf node_modules .next
pnpm install

Next Steps

Now that Vibestacks is running, continue with the setup: