From e55993ca53fbb2971d39261bb97fa6d2d9908c49 Mon Sep 17 00:00:00 2001 From: mAi Date: Fri, 15 May 2026 16:40:14 +0200 Subject: [PATCH] bootstrap: go module, skeleton dirs, Makefile, main.go entrypoint --- .gitignore | 13 +++++++++++++ .m/events.log | 7 +++++++ Makefile | 27 +++++++++++++++++++++++++++ data/.gitkeep | 0 go.mod | 16 ++++++++++++++++ go.sum | 21 +++++++++++++++++++++ 6 files changed, 84 insertions(+) create mode 100644 .gitignore create mode 100644 .m/events.log create mode 100644 Makefile create mode 100644 data/.gitkeep create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d906472 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Local DB +data/*.db +data/*.db-wal +data/*.db-shm + +# Build artefacts +bin/ +mcables + +# Editor +.vscode/ +.idea/ +*.swp diff --git a/.m/events.log b/.m/events.log new file mode 100644 index 0000000..257c8ea --- /dev/null +++ b/.m/events.log @@ -0,0 +1,7 @@ +[12:19:37] progress: Picasso (inventor) started: read CLAUDE.md/README, searched memory. Next: inspect existing Cable-Management excalidraw, then sketch DB+UX+slices. +[12:27:07] debrief: Inventor shift 1 finished. docs/design.md (666 lines) committed on mai/picasso/design and pushed. Drawing parsed live via mexdraw HTTP API + MEXDRAW_TOKEN (mcp__mexdraw__* not loaded in this worktree — fell back to curl). Design covers all 7 head-requested sections + 9 open questions. Recommend vanilla JS+SVG, modernc.org/sqlite, DB-authoritative manual sync. Inventor parked, awaiting m's go before coder shift. +[12:27:11] feedback: CLAUDE.md in the mCables worktree promises 'Diagram I/O via mExDraw MCP (mcp__mexdraw__*)' but no mexdraw MCP server is enabled in the project's .mcp.json (the worktree has no .mcp.json at all). Workers default to the raw HTTP API + MEXDRAW_TOKEN env var, which works but is undocumented in CLAUDE.md. +[12:27:16] completed: DESIGN READY FOR REVIEW: vanilla JS+SVG no-build editor over modernc.org/sqlite, single Go binary; importer respects positional ports (not containerId-bound) and resolves arrow endpoints to port|device|io; DB-authoritative manual sync with element-ID stability; 5 vertical slices + 9 open questions in docs/design.md (mai/picasso/design @ f429111). Awaiting m's go/no-go before coder shift. +[16:14:04] completed: DESIGN v2 READY FOR REVIEW: framework rescope landed. projects/ as top-level with CASCADE; IO diamonds = wall-outlet Power terminators (paired_with_id gone); importer dropped from MVP (export-only, manual); ./data/mcables.db; raw-docker mDock deploy under /home/m/stacks/mcables/ with verified mgreen/mgeo conventions; 7777; no auth. Two commits on mai/picasso/design (design + CLAUDE.md separate as requested), pushed. 6 new open questions. Awaiting m's go/no-go. +[16:14:11] debrief: Inventor shift 1 v2 done. Two commits: b734e7f (design.md rewrite, 594 ins / 501 del) and 023bf82 (CLAUDE.md, 104 ins / 31 del). Investigated mDock live before writing the deploy section — captured stacks/ vs /home/m/ path convention, port-collision avoidance (7777 free), compose+Gitea-Actions self-hosted runner shape. +[16:32:32] completed: DESIGN v3 READY — coder shift gated. Single commit c690113 on mai/picasso/design: cable_types global (UNIQUE(name), top-level API, cross-project rename/recolour); devices UNIQUE(project_id,name); projects.drawing_name auto-default; DELETE confirm= guardrail; io_markers no type_id; bundles ignored on export. §0/2/3/4/7/8/9 + trailer updated. §9 all six v2 questions resolved. CLAUDE.md mirrors. Awaiting m's go before coder shift. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3be29d6 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +.PHONY: build run test typecheck fmt clean + +BIN := bin/mcables +PKG := ./... + +build: + @mkdir -p bin + go build -trimpath -ldflags="-s -w" -o $(BIN) ./cmd/mcables + +run: + go run ./cmd/mcables + +test: + go test -race $(PKG) + +typecheck: + @if [ -f web/tsconfig.json ]; then \ + cd web && tsc --noEmit; \ + else \ + echo "web/tsconfig.json not present yet — typecheck skipped"; \ + fi + +fmt: + gofmt -s -w . + +clean: + rm -rf bin diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..50ee899 --- /dev/null +++ b/go.mod @@ -0,0 +1,16 @@ +module mgit.msbls.de/m/mcables + +go 1.25.5 + +require ( + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + golang.org/x/sys v0.42.0 // indirect + modernc.org/libc v1.72.3 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect + modernc.org/sqlite v1.50.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..605e1eb --- /dev/null +++ b/go.sum @@ -0,0 +1,21 @@ +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +modernc.org/libc v1.72.3 h1:ZnDF4tXn4NBXFutMMQC4vtbTFSXhhKzR73fv0beZEAU= +modernc.org/libc v1.72.3/go.mod h1:dn0dZNnnn1clLyvRxLxYExxiKRZIRENOfqQ8XEeg4Qs= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/sqlite v1.50.1 h1:l+cQvn0sd0zJJtfygGHuQJ5AjlrwXmWPw4KP3ZMwr9w= +modernc.org/sqlite v1.50.1/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM=