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 -dThis will start:
- PostgreSQL on port
5432(database:supastarter, user:postgres, password:postgres) - MinIO S3-compatible storage on port
9000(API) and9001(Console)- Access the MinIO Console at http://localhost:9001
- Credentials:
minioadmin/minioadmin
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 downTo also remove the data volumes:
docker compose down -vGet 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";