Making prop wiring / pixel diagrams
- TypeScript 93.7%
- CSS 5.5%
- Dockerfile 0.5%
- JavaScript 0.2%
- HTML 0.1%
Old caps (16px radius / 22px font) read tiny on the multi-thousand-px full-content canvas. Grow them relative to the real node spacing: nodeRadius = clamp(spacing*0.2, 7, 48), labelFont = clamp(min(spacing*1.0, (spacing - nodeRadius - 6)/1.4), 10, 60). The spacing-based guard keeps the dot diameter and its below-label within the gap, so larger marks still never overlap. Layout scale (distances) unchanged. +unit case asserting prominent sizing; wire e2e still green; container rebuilt. |
||
|---|---|---|
| client | ||
| docker | ||
| docs | ||
| server | ||
| tests/e2e | ||
| .dockerignore | ||
| .gitignore | ||
| AGENTS.md | ||
| App_req.md | ||
| eslint.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| Project_Plan.md | ||
| README.md | ||
| tsconfig.base.json | ||
| vitest.config.ts | ||
PropMaker
Design pixel-based lighting prop layouts and wiring diagrams, then import them into xLights as Custom Models (.xmodel).
- Open source (MIT), self-hosted with Docker Compose.
- React + TypeScript + Konva frontend, Node/Express + SQLite backend.
- Phone HEIC/HEIF photos are auto-converted to JPEG in the browser on upload.
- See
Project_Plan.mdfor the full build plan and milestones.
Features (complete — M1–M10)
- Guided 6-step flow — create a prop, upload a reference photo, calibrate scale, place, validate, and export (export lands in M9).
- Konva canvas editor — place pixels by click, drag to move, delete from the end of the string; wheel-zoom-to-cursor, pan (tool / Space / middle-drag), adaptive grid, and fit-to-prop.
- Live styling inspector — dot colour/size, numbered labels with start value, font size and 9-point position, wire colour/width, and background visibility/opacity.
- Undo / redo — session history over the design (view excluded); continuous edits coalesce into one step.
- Scale calibration + distance validation — two-pixel calibration to inches, live red-X markers on over-long wire edges, and a per-string spacing summary.
- Auto-route — nearest-neighbour + 2-opt reorder to minimise over-distance edges then wire length, with a green preview and apply/cancel (one undoable step).
- Wire diagram — printable black-on-white schematic with front/back mirror, grid, zoom/pan, over-distance markers, and full-diagram PNG/print export (dots and numbers auto-sized to stay legible, independent of on-screen zoom).
- xLights export — one-click Custom Model
.xmodeldownload (nodes numbered in string order) plus Mark Complete. - Autosave to SQLite — debounced (and flushed on navigation/close so nothing is lost), persisted across browsers via a Docker volume.
- Polish — keyboard-shortcut help (press
?), dark full-bleed canvas, responsive layout, and an MIT-licensed, Docker-verified one-process deployment.
Development
npm install
npm run dev # starts API (:5174) and client (:5173)
npm run typecheck
npm run lint
npm test # unit + api + e2e
Docker
docker compose -f docker/docker-compose.yml up --build
# open http://localhost:8080
Documentation
docs/user-guide.md— end-user workflow.docs/developer-guide.md— architecture and contributing.
License
MIT — see LICENSE. All dependencies are MIT/Apache/BSD.