Running the Next.js Supabase SaaS Kit Locally

Start the local development environment with Supabase, Next.js, and optional Stripe webhook forwarding.

Running the project requires starting three services: Supabase (database), Next.js (web app), and optionally Stripe (billing webhooks).

Startup Order

Start services in this order for a working development environment.

1. Start Docker

Supabase runs in Docker containers. Open Docker Desktop (or OrbStack on macOS) before proceeding.

2. Start Supabase

pnpm run supabase:web:start

This starts:

First startup downloads Docker images and runs migrations. This can take a few minutes.

Bookmark these URLs:

If Supabase Fails to Start

Common fixes:

  1. Docker resources: Increase Docker memory to 4GB+ in Docker Desktop settings
  2. Port conflicts: Stop other services using ports 54321-54324
  3. Clean restart: pnpm run supabase:web:stop then try again

3. Start Next.js

pnpm dev

This starts:

The dev tools provide debugging utilities for environment variables, feature flags, and authentication state.

Test Credentials

The database is seeded with test users:

Regular User:

Email: test@makerkit.dev
Password: testingpassword

Super Admin (requires MFA):

Email: super-admin@makerkit.dev
Password: testingpassword

Super Admin MFA Setup

Super admin login requires a TOTP code. Use any authenticator app with this secret:

NHOHJVGPO3R3LKVPRMNIYLCDMBHUM2SE

Or use totp.danhersam.com with this secret to generate codes.

If Login Fails

Reset the database to restore seeded users:

pnpm run supabase:web:reset

This re-runs migrations and seeds fresh test data.

4. Start Stripe (Optional)

For testing subscription billing, forward Stripe webhooks to your local server:

pnpm run stripe:listen

This requires:

  1. Stripe CLI installed
  2. Stripe account authenticated (stripe login)

The command outputs a webhook signing secret. Add it to your .env.local:

STRIPE_WEBHOOK_SECRET=whsec_xxxxx

Local Development URLs

ServiceURLPurpose
Web Applocalhost:3000Main application
Dev Toolslocalhost:3010Debugging utilities
Supabase Studiolocalhost:54323Database management
Mailpitlocalhost:54324Email testing

Stopping Services

Stop Supabase:

pnpm run supabase:web:stop

Stop Next.js: Press Ctrl+C in the terminal.

Common Issues

"Module not found: Can't resolve 'react-dom/client'"

Windows path length issue. Move your project closer to the drive root (e.g., C:\projects\my-saas).

See troubleshooting module not found for details.

Database connection errors

Supabase isn't running. Start it with pnpm run supabase:web:start.

Seeded users not working

Database may have stale data. Reset with pnpm run supabase:web:reset.

Emails not arriving

Check Mailpit at localhost:54324. All local emails go there, not to real email addresses.

Next Steps