rename: mCables → CableGUI (project + repo + image + paths)
Full project rename per m's call. Single atomic commit because the codebase rename is a coupled change — go module path, env vars, DB default, Docker artefact names, and on-disk mDock paths all flip together. - go.mod: module mgit.msbls.de/m/mcables → mgit.msbls.de/m/cablegui - cmd/mcables → cmd/cablegui (git mv) - All Go imports rewritten to the new module path - Env vars: MCABLES_ADDR/MCABLES_DB → CABLEGUI_ADDR/CABLEGUI_DB - DB default path: data/mcables.db → data/cablegui.db - Dockerfile + docker-compose.yml: image, container_name, env vars, bind-mount /home/m/stacks/mcables → /home/m/stacks/cablegui, secrets /home/m/secrets/mcables → /home/m/secrets/cablegui - Makefile: bin target + run/build commands point at cmd/cablegui - .gitignore + .dockerignore: /mcables → /cablegui - README, docs/design.md, CLAUDE.md: prose + paths + image name - web/static/index.html: <title> + brand - web/static/main.js + web/web.go: header comment - internal/exporter: Scene.Source "mcables" → "cablegui" - internal/server/export.go: error-detail secrets path - internal/db/migrations/*.sql: header comments (mCables vN → CableGUI vN) Memory group_id kept as "mcables" to preserve existing memory continuity. Documented as historical in CLAUDE.md. go build ./... clean; go test -race ./... green
This commit is contained in:
31
CLAUDE.md
31
CLAUDE.md
@@ -1,11 +1,11 @@
|
||||
# mCables — Project Instructions
|
||||
# CableGUI — Project Instructions
|
||||
|
||||
## Project Overview
|
||||
|
||||
Cable-management **framework + solver** for m's setup. m declares his
|
||||
**devices** and the **connection requirements** between them ("NAS must
|
||||
connect to Switch via RJ45"). mCables runs a solver that emits the cable
|
||||
plan + bundle recommendations. mCables is a **schematic**, not a
|
||||
connect to Switch via RJ45"). CableGUI runs a solver that emits the cable
|
||||
plan + bundle recommendations. CableGUI is a **schematic**, not a
|
||||
physical-routing tool — cables are straight lines between endpoints; the
|
||||
"maximum bundling" objective is satisfied by the endpoint-pair rule
|
||||
(when two or more cables share the same A↔B endpoint pair, group them
|
||||
@@ -13,16 +13,17 @@ into one bundle). The visual editor is still there for tweaking the
|
||||
plan, but the solver is the headline.
|
||||
|
||||
Each cable-managed environment (LOFT, OFFICE, …) is a separate
|
||||
**mCables project**, and each project is backed by exactly one Excalidraw
|
||||
**CableGUI project**, and each project is backed by exactly one Excalidraw
|
||||
drawing. The framework provides a visual web interface backed by a Go
|
||||
HTTP API and SQLite, plus an export pipeline that writes `.excalidraw`
|
||||
files via mExDraw.
|
||||
|
||||
**Memory group_id:** `mcables`
|
||||
**Memory group_id:** `mcables` (kept historical — all prior memories live
|
||||
under this id; renaming would orphan them)
|
||||
|
||||
**No CLI.** Frontend-first — every interaction is through the visual
|
||||
interface. The backend serves the UI and the API; there is no
|
||||
`mcables` shell binary intended for humans.
|
||||
`cablegui` shell binary intended for humans.
|
||||
|
||||
## Goal
|
||||
|
||||
@@ -53,7 +54,7 @@ interface. The backend serves the UI and the API; there is no
|
||||
|
||||
| Layer | Tech | Notes |
|
||||
|---|---|---|
|
||||
| DB | SQLite | `./data/mcables.db` (project-local, gitignored). Driver: `modernc.org/sqlite` (cgo-free). |
|
||||
| DB | SQLite | `./data/cablegui.db` (project-local, gitignored). Driver: `modernc.org/sqlite` (cgo-free). |
|
||||
| Backend | Go | `net/http` HTTP API + static frontend via `embed.FS`. Standard library + minimal deps. Single binary. |
|
||||
| Frontend | Vanilla JS modules + SVG, no build step | TypeScript types via JSDoc, optional `tsc --noEmit` in CI. Preact-via-CDN-ESM is the documented fallback if vanilla state gets painful — no build step either way. |
|
||||
| Diagram I/O | mExDraw HTTP API | `PUT https://mxdrw.msbls.de/api/drawings/<name>.excalidraw` with `Authorization: Bearer $MEXDRAW_TOKEN`. (The `mcp__mexdraw__*` MCP tools are not currently configured for this project — workers use the raw HTTP API.) |
|
||||
@@ -112,14 +113,14 @@ interface. The backend serves the UI and the API; there is no
|
||||
|
||||
## Deployment — mDock, raw docker (NOT Dokploy)
|
||||
|
||||
mCables runs on **mDock** (`192.168.178.131` on the LAN, Tailscale `mdock`)
|
||||
CableGUI runs on **mDock** (`192.168.178.131` on the LAN, Tailscale `mdock`)
|
||||
as a **plain docker-compose service**. Dokploy is for public mlake/mRiver
|
||||
stuff; mDock uses raw `docker compose` per the conventions of the existing
|
||||
mDock services (mgreen, mgeo, msports-garmin, paperless, …).
|
||||
|
||||
- Repo layout on mDock: `/home/m/stacks/mcables/` with `docker-compose.yml`,
|
||||
`data/` bind-mount, secrets in `/home/m/secrets/mcables/.env`.
|
||||
- Image: `mgit.msbls.de/m/mcables:latest` (built and pushed by a Gitea
|
||||
- Repo layout on mDock: `/home/m/stacks/cablegui/` with `docker-compose.yml`,
|
||||
`data/` bind-mount, secrets in `/home/m/secrets/cablegui/.env`.
|
||||
- Image: `mgit.msbls.de/m/cablegui:latest` (built and pushed by a Gitea
|
||||
Actions workflow on push to `main`, runs on the self-hosted runner on
|
||||
mDock with label `self-hosted:host`).
|
||||
- Port mapping: `7777:7777`, exposed on the LAN — no reverse proxy.
|
||||
@@ -127,12 +128,12 @@ mDock services (mgreen, mgeo, msports-garmin, paperless, …).
|
||||
- LAN URL: `http://mdock:7777`.
|
||||
- No auth — LAN-trusted.
|
||||
|
||||
Local dev (no Docker): `go run ./cmd/mcables` against `./data/mcables.db`.
|
||||
Local dev (no Docker): `go run ./cmd/cablegui` against `./data/cablegui.db`.
|
||||
|
||||
## Seed drawing — visual grammar reference, **not** a runtime importer
|
||||
|
||||
`mxdrw.msbls.de/draw/Cable-Management.excalidraw` is **reference material
|
||||
only**. mCables does **not** auto-ingest it. m will rebuild LOFT and OFFICE
|
||||
only**. CableGUI does **not** auto-ingest it. m will rebuild LOFT and OFFICE
|
||||
from scratch inside the tool — the seed exists so the **exporter** mimics
|
||||
its visual grammar:
|
||||
|
||||
@@ -163,13 +164,13 @@ Legend colours (global, seeded once by migration 001):
|
||||
|
||||
## Out of scope (v0)
|
||||
|
||||
- Multi-user. mCables is m-only.
|
||||
- Multi-user. CableGUI is m-only.
|
||||
- Auth / sharing — LAN-trusted on mDock.
|
||||
- Mobile / responsive — desktop browser only.
|
||||
- Cable inventory beyond visual structure (no length, no purchase history,
|
||||
no SKU). Strictly visual structure for v0.
|
||||
- Import from `.excalidraw` at runtime. If a one-shot migration is ever
|
||||
needed, a separate `mcables-migrate` CLI tool is the right shape, not a
|
||||
needed, a separate `cablegui-migrate` CLI tool is the right shape, not a
|
||||
hot API endpoint.
|
||||
|
||||
## Worker Preferences
|
||||
|
||||
Reference in New Issue
Block a user