Documentation
supastarter for Next.jssupastarter for Next.jsWorking with the codebase

Local Development

Learn how to set up your local environment for offline development with supastarter

The repository includes a complete local development environment with PostgreSQL and MinIO S3 storage. This allows you to run your entire application stack locally, making development faster and more reliable (also offline).

Prerequisites

Running third-party services locally with Docker Compose for offline development

Start the local development services (PostgreSQL and MinIO):

docker compose up -d

This will start:

  • PostgreSQL on port 5432 (database: supastarter, user: postgres, password: postgres)
  • MinIO S3-compatible storage on port 9000 (API) and 9001 (Console)

Environment Configuration

Use the following environment variables to access your local development environment:

# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/supastarter"

# Storage (MinIO)
S3_ACCESS_KEY_ID="minioadmin"
S3_SECRET_ACCESS_KEY="minioadmin"
S3_ENDPOINT="http://localhost:9000"
S3_REGION="us-east-1"
NEXT_PUBLIC_AVATARS_BUCKET_NAME="avatars"

Stopping Services

docker compose down

To also remove the data volumes:

docker compose down -v

Get mails on local development environment

To not have to set up a mail service to get mails on your local development environment, you can use console provider in packages/mail. This will print the mails to the console. Simply update the packages/mail/provider/index.ts like this:

export * from "./console";