README Extended Reference#
This page contains detailed operational notes that were removed from repository README files to keep those files concise.
Documentation workflows#
Sync backend dependencies before running documentation tools:
cd backenduv sync
Build or preview Sphinx docs from
backend/docs:make htmlmake previewmake reload(live reload)
Alternative direct Sphinx build command:
uv run sphinx-build -b html source build/html
Optional live server with auto rebuild:
uv run sphinx-autobuild source build/html --open-browser
Documentation troubleshooting#
sphinxcontrib.mermaidimport error:cd backenduv add sphinxcontrib-mermaid
make reloadtarget not found:run commands from
backend/docs
sphinx-buildcommand not found:use
uv run sphinx-build ...
Port
8000already in use:run preview on another port (for example
python -m http.server 8001frombuild/html)
Frontend client generation#
Automatic generation from project root:
python backend/app/scripts/generate_client.py
Manual generation:
Download
http://localhost/api/v1/openapi.jsontofrontend/openapi.jsoncd frontendpnpm run openapi-ts
Regenerate whenever backend OpenAPI schema changes.
Frontend remote API configuration#
Set
VITE_API_URLinfrontend/.env.Example:
VITE_API_URL=https://api.my-domain.example.com
Frontend Playwright tests#
Start required backend service:
docker compose up -d --wait backend
Run tests:
cd frontendpnpm exec playwright test
Optional UI mode:
pnpm exec playwright test --ui
Cleanup stack and test data:
docker compose down -v
Backend operations#
Start local stack:
docker compose watch
Open a shell in the backend container when needed:
docker compose exec backend bash
Run backend tests in a running stack:
docker compose exec backend bash scripts/tests-start.sh
Database migrations#
Open backend container shell:
docker compose exec backend bash
Create migration revision after model changes:
alembic revision --autogenerate -m "Describe schema change"
Apply migration:
alembic upgrade head