Skip to main content

Getting started

Prerequisites

  • Node ≥ 18, npm (workspaces)
  • Docker + Docker Compose
  • PostgreSQL (or use the dev compose DB)

Quick start (dev)

# 1. Start the dev database (PostgreSQL on :5432)
docker compose -f docker-compose.dev.yml up -d

# 2. Install + run everything (API on :5000, web on :5173)
cp .env.example .env # fill in secrets
npm install
npm run db:migrate --workspace taghvimam-backend
npm run dev

The web app proxies /api → the API on :5000 (see vite.config.ts).

Common commands

npm run build # build all workspaces
npm test --workspace taghvimam-backend # API test suite (DB-backed)
npm run openapi:generate --workspace taghvimam-backend # regenerate the OpenAPI spec

Production

cp .env.example .env # set all required secrets (DATABASE_URL, JWT_*, SYNC_CURSOR_SECRET, …)
docker compose up -d --build # api + web + db + docs

This docs site is built from the docs/ Docusaurus project and served by the docs container behind Caddy at docs.taghvimam.ir.