Skip to content

Development Setup

Prerequisites

  • Bun ≥ 1.3.12
  • Docker (for PostgreSQL)

Install dependencies

bash
bun install

Start the database

bash
docker compose up -d postgres

Configure environment

bash
cp .env.example .env

The default .env uses 127.0.0.1 instead of localhost for the database connection. This is intentional — some systems resolve localhost differently.

Run migrations

bash
DATABASE_URL="postgresql://doto:doto_dev@127.0.0.1:5432/doto_dev" \
  bun --cwd packages/server run prisma migrate dev

Start the dev server

bash
bun run --filter @doto/server dev

The server starts on port 3000 with hot reload via bun --watch.

Start the web app

bash
bun run --filter @doto/web dev

The Vite dev server starts on port 5173 and proxies /api/* requests to http://127.0.0.1:3000, so the web app can use same-origin API paths during development and production.

Build the CLI

bash
bun run --filter @doto/cli build

Run tests

bash
# Unit tests
bun run --filter @doto/server test

# E2E tests (requires database)
DATABASE_URL="postgresql://doto:doto_dev@127.0.0.1:5432/doto_dev" \
  bun run --filter @doto/server test:e2e

Released under the MIT License.