# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Commands **Build and run (Podman) — must run as root:** ```bash cp .env.example .env # first time only sudo podman compose up -d --build ``` UI available at `http://127.0.0.1:8094/` and `https://voicelog.aquantico.lan` (via Traefik). **Restart after code changes:** ```bash sudo podman rm -f diarization-ui sudo podman compose up -d --build ``` **Run locally without Podman:** ```bash pip install -r requirements.txt API_BASE=http://... OLLAMA_BASE_URL=http://... DB_PATH=./ui.db uvicorn app:app --host 0.0.0.0 --port 8094 --reload ``` **Publish container to registry:** ```bash podman build -t registry.aquantico.lan/claw/diarization-ui:latest . podman push registry.aquantico.lan/claw/diarization-ui:latest ``` **Logs:** ```bash sudo podman logs -f diarization-ui ``` There are no tests and no linter configured. > **Important:** This system uses `podman` / `sudo podman compose`, not `docker`. Always use `sudo` for podman compose commands — the container runs as root. ## Documentation Detailed docs live in `doc/`: - `doc/architecture.md` — data model, background jobs, DB schema - `doc/api.md` — all HTTP endpoints - `doc/interfaces.md` — Transcription-API and Ollama request/response details - `doc/configuration.md` — env vars and runtime settings - `doc/deployment.md` — build, deploy, backup, Traefik setup **Keep `doc/` up to date** whenever routes, DB schema, settings keys, or external interfaces change. ## Architecture The entire application lives in a single file: `app.py` (~2000 lines). There are no templates, no separate frontend build, and no additional modules. ### Request handling All routes are FastAPI endpoints. HTML is returned as server-rendered Python f-strings using Bootstrap 5.3 (CDN) for layout. Inline `