ZTS Docs

Quick Start

Use the GitHub repository as a template

Click Use this template on the Zero To Shipped repository. Templates let you create multiple copies under your account; GitHub only allows one fork per account.

Install dependencies

This is a pnpm monorepo (see Monorepo layout). From the repository root:

pnpm install

Requirements: Node 20+, pnpm 11 (see packageManager in root package.json), and PostgreSQL for local development.

Configure environment

Generate variables with env.zerotoshipped.com, or copy the example:

cp .env.example .env

Set at minimum:

  • DATABASE_URL — local PostgreSQL (e.g. postgresql://postgres@localhost:5432/my_app_db). DBngin is a simple option on macOS/Windows. See Database.
  • BETTER_AUTH_SECRET — e.g. openssl rand -base64 32

Optional: NEXT_PUBLIC_APP_NAME, NEXT_PUBLIC_APP_DESCRIPTION, feature flags in .env.example.

Root .env is loaded for the web app via scripts/with-root-env.mjs.

Migrate database

pnpm db:migrate

Schema and migrations live in packages/db/prisma/.

Run development

Web app (Next.js, port 3000):

pnpm dev

Mobile (Expo — requires web API for tRPC/auth):

pnpm dev:mobile

Set EXPO_PUBLIC_APP_URL=http://127.0.0.1:3000 when the device cannot reach localhost. See Mobile.

Browser extension:

pnpm dev:extension

See Browser extension.

Open http://localhost:3000 for the web app. Continue with Folder structure, Public API, and integration docs below.

On this page