1.5 KiB
1.5 KiB
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 inbackend/backend.db(SQLite, gitignored). Run from the repo root:venv\Scripts\python -m backend.main. Documented atwiki/entities/backend.md.frontend/— the React control panel (Vite + TypeScript + React Router + zustand + TanStack Query). Dev:npm run dev(proxies/apito :9000). Prod:npm run build→frontend/dist/, served statically by the backend. Documented atwiki/entities/frontend.md.wiki/— an LLM-maintained knowledge base about the Anfu home charger OCPP integration. Readwiki/CLAUDE.mdbefore 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 bybackend/for production; kept as diagnostics. Documented atwiki/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).