Installing the Next.js Drizzle SaaS Kit
Complete installation guide for setting up the Next.js Drizzle SaaS Kit on your local machine.
Installation Steps
Get the SaaS kit running on your local machine
What is Makerkit?
Makerkit is a production-ready SaaS starter kit that provides all the foundational features every SaaS application needs out of the box:
- Authentication - Sign up, sign in, password reset, OAuth providers, MFA
- Multi-tenancy - Organizations, team members, invitations, role-based access
- Billing & Subscriptions - Stripe integration, checkout, customer portal
- Admin Dashboard - User management, metrics, impersonation
- Email System - Transactional emails with customizable templates
- Account Settings - User profiles, organization settings, preferences
Built on modern technologies including Next.js 16, React 19, PostgreSQL, Drizzle ORM, and Better Auth, Makerkit lets you start with a working foundation and focus on building your unique product features instead of reinventing common SaaS functionality.
Documentation vs Course
This documentation serves as a comprehensive API reference covering every feature, configuration option, and integration point in detail. It's ideal for looking up specific implementations, understanding how individual features work, or customizing specific aspects of your application.
For a streamlined, hands-on approach to learning Makerkit, we recommend the Next.js Drizzle Course. The course walks you through building a complete SaaS application (TeamPulse - a team feedback tool) from scratch, teaching you:
- How all the pieces fit together in a real application
- Best practices and architectural patterns
- Building features step-by-step with real-world examples
- Understanding the "why" behind implementation decisions
Recommendation: Start with the course to understand the foundations and see how everything connects, then use this documentation as a reference when building your own features. Or use them together as you build your own features.
This guide will walk you through setting up the Next.js Drizzle SaaS Kit on your local development machine. The entire process should take approximately 15-30 minutes.
By the end of this installation, you'll have:
- A fully functional local development environment
- A running PostgreSQL database with migrations applied
- The Next.js application running on
http://localhost:3000 - The ability to create accounts and test all features
Prerequisites
Before you begin, ensure you have the following installed on your machine:
Required Software
- Node.js 20.10 or later
- Check your version:
node --version - Download from nodejs.org
- We recommend using Node.js 20.10 or later for best compatibility or (even better) the latest LTS version
- Check your version:
- pnpm (Package Manager)
- This project uses pnpm for package management
- Install globally:
npm install -g pnpm - Check your version:
pnpm --version
- PostgreSQL 16 or later
- A running Postgres instance (local or hosted)
- You'll need connection credentials
- Options: native installation, Docker (recommended), Postgres.app, or hosted (Supabase, Neon, Railway, etc.)
- Git
- For cloning the repository
- Check if installed:
git --version
For running the database and the Mailer testing service, we suggest installing and running Docker.
This will allow you to run a full local development environment with all the dependencies needed.
Quick Start
If you're familiar with the process, here's the quick version:
# Clone the repositorygit clone git@github.com:makerkit/next-drizzle-saas-kit-turbo.git# Install dependenciespnpm install# Run setup script and follow the promptspnpm turbo gen setup# Start Docker (Postgres and Mailpit)# make sure you have Docker installed and runningpnpm run compose:dev:up# Run database migrationspnpm --filter "@kit/database" drizzle:migrate# Seed the database with test datapnpm run seed# Start the development serverpnpm devNavigate to http://localhost:3000 and start developing!
Seeding data
If you haven't already seeded the database, you can use the following command to seed it with some test data.
pnpm run seedThis will create 5 users, 2 organizations per user, and 3 members per organization. Follow the instructions in the terminal to login with the test data.
Detailed Installation Steps
For a step-by-step walkthrough, follow these guides in order:
- Prerequisites - Detailed prerequisite setup
- Clone Repository - Get the code on your machine
- Setup Dependencies - Install all packages
- Project Setup - Configure the project
- Environment Variables - Configure required settings
- Running the Project - Start developing!
Common Installation Issues
pnpm command not found
Solution: Install pnpm globally:
npm install -g pnpmPort 3000 already in use
Solution: Kill the process using port 3000 or specify a different port:
# Find and kill process on port 3000 (macOS/Linux)lsof -ti:3000 | xargs kill -9# Or run on a different portPORT=3001 pnpm devWindows: Module not found errors
Solutions:
- Place repository near drive root (e.g.,
C:\projects\) - Avoid OneDrive-synced directories
- Use PowerShell or Windows Terminal (not Command Prompt)
- Consider using WSL2 for better compatibility
Next: Prerequisites →