Develop locally
Use local development when you are changing backend, frontend, tests, or docs.
Install dependencies
Python dependencies are managed with uv. Web dependencies use npm.
Run backend commands from the repository root:
bash
uv run --extra dev pytest
uv run --extra dev ruff check src testsInstall web dependencies:
bash
cd web
npm installRun the backend and web UI
Start the API:
bash
INVOICER_DB_PATH=.data/invoicer.sqlite3 uv run uvicorn invoicer.api.server:app --reload --host 127.0.0.1 --port 8000Start the web UI in another terminal:
bash
cd web
npm run devOpen http://127.0.0.1:5173. The Vite dev server proxies /api to the local FastAPI backend.
Seed local data
Create a small deterministic fixture:
bash
uv run invoicer app seed-demo --db .data/invoicer.sqlite3Create a dense UX test ledger:
bash
uv run invoicer app seed-rich --db .data/invoicer.sqlite3 --replace--replace clears local finance records, history, and recovery rows while preserving app settings and managed backup files.
Run the standard verification loop
Run:
bash
uv run --extra dev pytest
uv run --extra dev ruff check src tests
cd web && npm run build
cd web && npm run test:e2e
docker compose up -d --build
curl -fsS http://127.0.0.1:8000/api/healthWork on the docs
Install docs dependencies:
bash
cd docs
npm installRun the docs locally:
bash
npm run devBuild the static docs site:
bash
npm run buildThe build output goes to docs/.vitepress/dist.