Development Setup
Prerequisites
- Bun ≥ 1.3.12
- Docker (for PostgreSQL)
Install dependencies
bash
bun installStart the database
bash
docker compose up -d postgresConfigure environment
bash
cp .env.example .envThe 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 devStart the dev server
bash
bun run --filter @doto/server devThe server starts on port 3000 with hot reload via bun --watch.
Start the web app
bash
bun run --filter @doto/web devThe 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 buildRun 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