Files
charging_station/CLAUDE.md
T
2026-07-12 10:32:57 +02:00

11 lines
1.5 KiB
Markdown

# Charging Station Project
Four parts:
- **`backend/`** — the production FastAPI backend: private OCPP 1.6J CSMS + REST API + Tuya relay control on port 9000. All state in `backend/backend.db` (SQLite, gitignored). Run from the repo root: `venv\Scripts\python -m backend.main`. Documented at `wiki/entities/backend.md`.
- **`frontend/`** — the React control panel (Vite + TypeScript + React Router + zustand + TanStack Query). Dev: `npm run dev` (proxies `/api` to :9000). Prod: `npm run build` → `frontend/dist/`, served statically by the backend. Documented at `wiki/entities/frontend.md`.
- **`wiki/`** — an LLM-maintained knowledge base about the Anfu home charger OCPP integration. **Read `wiki/CLAUDE.md` before touching anything in it** — it defines the schema, conventions, and ingest/query/lint workflows. `wiki/raw/` is immutable source material; never edit it.
- **`discovering/`** — throwaway-ish Python scripts used during discovery (`csms.py`, `rawlisten.py`, `station.py`). Superseded by `backend/` for production; kept as diagnostics. Documented at `wiki/entities/csms-toolkit.md`.
Deployment: `Dockerfile` (node builds the panel, python serves it) + `compose.yaml` (Komodo stack, Traefik labels, raw :9000 for the charger) + `.gitea/workflows/build.yml` (build → smoke gate → push to `git.infra.msai.al` → Komodo redeploy). Documented at `wiki/entities/deployment.md`. Smoke test: `venv\Scripts\python -m backend.smoke_test` (65 checks, isolated temp DB — safe to run anytime).