Local development
Prerequisites
Section titled “Prerequisites”- Python 3.11+ and uv
- Bun 1.x (the monorepo uses Bun workspaces + Turborepo)
- PostgreSQL 15+ recommended; SQLite works for single-process development
Backend
Section titled “Backend”uv sync # install Python deps from uv.lockcp .env.example .envuv run uvicorn apps.api.main:app --reload --port 8000 # API on :8000Background enrichment and source imports run on the durable SQL-queue worker. Start one in a second terminal:
uv run python -m apps.api.workerOptional extras:
uv run python -m apps.api.scheduler # stale-job recovery + recurring refreshesuv sync --extra browser # patchright + stealth-requests for browser-tier fetchesuv run patchright install chromiumRedis is optional for single-process development; without it live progress falls back to in-process queues.
Frontend
Section titled “Frontend”bun install # once, at the repo rootbun run --cwd apps/web dev # https://opengtm.localhost via Portlessbun run --cwd apps/web dev:app # plain Vite on http://localhost:5173bun run dev at the root starts every workspace app in parallel through
Turborepo.
uv run pytest # hermetic backend suite (SQLite)uv run pytest -m postgres # RLS integration tests; needs a disposable Postgresuv run alembic check # model ↔ migration driftbun run lint && bun run build # every TypeScript package, including this docs siteuv run python scripts/export_openapi.py --check # API reference is currentTests marked live need real network services or credentials and are opt-in.
Docs site
Section titled “Docs site”bun run --cwd apps/docs dev # http://localhost:4321bun run --cwd apps/docs buildbun run --cwd apps/docs preview --ignore-lock # Astro 7.3: several previews side by sideSee the contributing guide for the pull-request checklist and commit conventions.