New:New releases:CLIcreate-clubedge-app v0.49.1·Clubedge Starter v0.32.0

Clubedge Starter Docs

Local services

Run PostgreSQL and the other services on your machine with Docker, the Supabase CLI, or nothing at all, or use a hosted Neon database.

The --infra module decides how the project runs its development services. Change it later with pnpm clubedge add infra <option>.

docker-compose.dev.yml runs the services this project uses on your machine, listening on 127.0.0.1 only. Install Docker Desktop (or Docker Engine with Compose), then:

pnpm infra:up      # start and wait until every service is healthy
pnpm db:migrate    # create the tables
pnpm check:services

It contains the services for your modules:

  • PostgreSQL 17 on port 5432, database app, user and password postgres. Data survives restarts in a Docker volume.
  • Redis on port 6379, with --cache redis.
  • S3-compatible storage (adobe/s3mock) on port 9090 with the bucket app, with --storage s3. It accepts any credentials and is for development only.
  • Mailpit, with --email smtp. It catches every email the app sends: SMTP on port 1025, and the inbox at http://localhost:8025.

pnpm infra:down stops the services, pnpm infra:reset also deletes their data, and pnpm infra:logs follows their logs. The file is for development; in production, point the same variables at managed services.

With a separate API

In a project with a frontend and its API, the API owns the database, and its DATABASE_URL is in apps/api/.env.local. It holds the database URL for the chosen infrastructure, the same as above. With Better Auth, apps/web/.env.local has a DATABASE_URL too, for the frontend's auth server: keep the two the same. With Hono or FastAPI, the API also uses the other local services, so their settings, such as REDIS_URL, STORAGE_ENDPOINT, or SMTP_URL, are in apps/api/.env.local, and with --infra local, STORAGE_DIRECTORY is relative to the API.

A project without a website works the same way, with apps/api/.env.local as its only server env file. With the Supabase CLI, copy the Supabase API URL and the publishable key that pnpm infra:status prints into it.

Projects from Starter v0.24.1 and earlier always got postgresql://postgres:postgres@127.0.0.1:5432/postgres in apps/api/.env.local. With the Supabase CLI or No Docker, change the port to 54322 or 5433; with Docker, the database to app.

How is this guide?