Skip to main content

Local setup

You need: Docker, uv, Node 20+, pnpm.

Backend

cd backend
cp .env.example .env
docker compose up -d # postgres+timescale+postgis, redis
uv sync
uv run alembic upgrade head
uv run python -m vambora.main # API on :8000 (or HTTP_PORT in .env), poller in same process

Verify:

curl -s localhost:8000/health
curl -s 'localhost:8000/vehicles?fresh_seconds=120' | jq 'length'

Web

cd web
cp .env.example .env.local
pnpm install
pnpm dev

Open http://localhost:3000. The map should show ~1k yellow dots over Rio after the first backend tick (~30 s). If the backend is on a non-default port, set NEXT_PUBLIC_API_BASE_URL=http://localhost:8002 (or whatever) in .env.local.

Quality gates

Each repo runs the same shape locally as in CI:

GateBackendWeb
Formatuv run ruff format --checkpnpm lint (Biome)
Lintuv run ruff checkpnpm lint
Typesuv run mypy src (strict)pnpm typecheck (tsc --noEmit)
Unit testsuv run pytest -m unitpnpm test (Vitest)
Integrationuv run pytest -m integration (testcontainers)
E2Euv run pytest -m e2epnpm e2e (Playwright)

Tearing down

cd backend && docker compose down -v # -v wipes the volume