diff --git a/CLAUDE.md b/CLAUDE.md index 1e5c77b..b30c804 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,54 +4,96 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Commands -**Build and run (Docker):** +**Build and run (Podman) — must run as root:** ```bash cp .env.example .env # first time only -docker compose up -d --build +sudo podman compose up -d --build ``` -UI available at `http://127.0.0.1:8094/` +UI available at `http://127.0.0.1:8094/` and `https://voicelog.aquantico.lan` (via Traefik). -**Run locally without Docker:** +**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:** +**Publish container to registry:** ```bash -docker build -t registry.aquantico.lan/claw/diarization-ui:latest . -docker push registry.aquantico.lan/claw/diarization-ui:latest +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` (~1550 lines). There are no templates, no separate frontend build, and no additional modules. +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 `