109 Commits

Author SHA1 Message Date
mAi
b6eb29a103 chore: untrack .m/ worker-local mai event log 2026-05-15 16:40:41 +02:00
mAi
e55993ca53 bootstrap: go module, skeleton dirs, Makefile, main.go entrypoint 2026-05-15 16:40:14 +02:00
mAi
14f0d74e44 merge: design v3 (framework, multi-project, mDock deploy)
inventor shift done by picasso. docs/design.md (760 lines) + CLAUDE.md
locked. m approved coder shift.

Next: slice 1 (bootstrap + project CRUD) on mai/picasso/slice-1.
2026-05-15 16:38:02 +02:00
mAi
c690113ea1 docs: design v3 — global cable_types, device UNIQUE, delete guardrail
Tight pass on round-4 answers (single commit per head's request):

- cable_types is GLOBAL — drop project_id, UNIQUE(name). Migration 001
  seeds the 5 defaults once; POST /api/projects no longer seeds them.
  API moves to top-level /api/cable-types. Renaming/recolouring affects
  every project. CASCADE from projects does not touch cable_types.
- devices: UNIQUE (project_id, name) added.
- projects: drawing_name defaults to "<name>.excalidraw" server-side
  on POST when omitted; editable via PATCH.
- DELETE /api/projects/:pid requires ?confirm=<name>; server checks
  name match, returns 400 if missing or mismatched.
- io_markers: no type_id (Power-by-convention, UI soft-warn). Confirmed
  v0 stance.
- Bundles ignored on export — carries over from v2.
- §0 changelog rewritten as "what changed in v3 / what carried over".
- §2 schema rewritten; FK-shape paragraph updated to call out the one
  global table.
- §3 endpoints: cable-types moved to top level; POST/DELETE projects
  show new defaults + guardrail semantics.
- §4 export table notes cable_types pulled from global.
- §7 "edit cable type" flow gains the cross-project-effect banner +
  ON DELETE RESTRICT inline-error UX.
- §8 slice 1 rewritten: no per-project seeding; legend reads global.
- §9 all six v2 questions marked resolved with the v3 answer per item.
- Trailer changes to "DESIGN v3 READY — coder shift gated".
- CLAUDE.md mirrors: global cable_types, device UNIQUE per project,
  drawing_name default, delete guardrail.
2026-05-15 16:32:20 +02:00
mAi
023bf82dbd docs: CLAUDE.md reflects v2 — framework, multi-project, mDock deploy
Sync project instructions with design v2:

- Framework framing: top-level `projects` table, LOFT/OFFICE/… as
  separate projects, frames as sub-zones inside a project.
- DB path moved from ~/.m/mcables.db to ./data/mcables.db (gitignored).
- Frontend stack locked: vanilla JS modules + SVG, no build step,
  TypeScript types via JSDoc, Preact-via-CDN-ESM as fallback.
- Deploy: raw docker on mDock under /home/m/stacks/mcables/ — explicitly
  NOT Dokploy. Port 7777, no reverse proxy, no auth (LAN-trusted).
- mExDraw access: raw HTTP API (mcp__mexdraw__* not configured for this
  project), one-way export only.
- Seed drawing reframed as visual-grammar reference, NOT a runtime
  import target. IO markers documented as wall-outlet terminators
  (type=Power), not inter-frame bridges.
- Out-of-scope list updated: no auth, no inventory fields, no runtime
  import. Worker-preference slices re-aligned with the new design.
2026-05-15 16:13:34 +02:00
mAi
b734e7f874 docs: design v2 — framework rescope, mDock deploy, no runtime importer
Revision after m's answers (2026-05-15):

- mCables is a framework. Top-level `projects` table; LOFT and OFFICE
  are separate projects, each backed by one drawing. project_id is
  denormalised onto every row for cheap project-scoped queries; CASCADE
  from projects wipes a project's whole subgraph.
- IO diamonds are wall-outlet terminators (type=Power), not inter-frame
  bridges. paired_with_id removed.
- No runtime importer. The seed Cable-Management.excalidraw is the
  visual-grammar reference for the exporter only. /api/sync/import is
  dropped from MVP; only /api/sync/export remains (one-way, manual).
- No cable inventory fields. Strictly visual structure for v0.
- DB at ./data/mcables.db (project-local, gitignored).
- Deploy: raw docker on mDock under /home/m/stacks/mcables/ (NOT Dokploy).
  Conventions verified live (mgreen, mgeo, msports-garmin patterns).
  Port 7777, container_name mcables, image from Gitea registry, Gitea
  Actions self-hosted runner builds + deploys on push to main.
- Bind 0.0.0.0:7777 on the LAN. No auth.
- UI gains a projects picker; all CRUD endpoints scoped under
  /api/projects/:pid/.
- Slices re-planned: empty bootstrap → frame+device → port+cable →
  IO+cable-type editing → export.
- Open questions trimmed; six new ones (drawing-name policy, device
  uniqueness, non-Power IO, bundle export, cross-project cable types,
  delete guardrail).

Ends with DESIGN v2 READY FOR REVIEW.
2026-05-15 16:13:24 +02:00
mAi
f429111462 docs: design pass 1 — schema, API, importer, sync, slices
Inventor shift 1. Reads the live Cable-Management.excalidraw on
mxdrw.msbls.de, lands on:

- vanilla JS modules + SVG diagram (no build step) served by a single
  Go binary with embed.FS
- SQLite schema with frames, devices, ports, cable_types, cables,
  io_markers, bundles (cgo-free driver)
- HTTP API under /api/, /api/state as the editor's one-shot loader
- importer that respects port-on-edge geometry (ports are positional,
  not containerId-bound) and resolves arrow endpoints to port/device/IO
- bundle detection MVP: same-endpoints-pair → suggestion
- sync model: DB authoritative, Excalidraw is a projection, manual
  import/export buttons with element-ID stability and conflict flagging
- five vertical slices for the coder shift, smallest end-to-end first
- nine open questions for m before code starts

Ends with DESIGN READY FOR REVIEW.
2026-05-15 12:26:27 +02:00
m
a94e8d9f60 bootstrap: README + CLAUDE.md (architecture sketch, no CLI)
Visual interface + SQLite inventory + mExDraw integration. Seeded from m's existing Cable-Management.excalidraw. Backend Go, frontend TBD.
2026-05-15 12:17:55 +02:00
m
eaf2d968dd Initial commit 2026-05-15 10:16:28 +00:00