Skip to content

MVP scaffold: data schema, server, floor plan viewer, Docker and CI - #1

Merged
MathiasVDA merged 1 commit into
mainfrom
feat/mvp-scaffold
Oct 10, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
feat/mvp-scaffold

Conversation

@MathiasVDA

Copy link
Copy Markdown
Contributor

Requested by Mathias · project thread

Before: the repo holds only a license and a one-line README.

After: HAdoc runs as one Docker container that reads a folder of YAML files describing the house. It shows each floor with its rooms, points and cable routes. Tapping a point shows what feeds it, which cables and terminals it lands on, which device or PLC channel sits behind it, and which MQTT topic or openHAB item reads it. A checks panel lists broken references and anything still undocumented. A demo house is included.

The point ID pattern and every level and type abbreviation are settings in settings.yaml. The default is {level}-{room}-{type}-{nr}, e.g. 1-DRS-PIR-01.

How

  • schema/: one JSON Schema per data file (settings, site, points, enclosures, devices, cables, circuits, signals).
  • server/: Fastify + TypeScript. Loads and validates the YAML without throwing, runs cross-file checks (references, ID scheme, undocumented items), builds the trace, serves /api/house, /api/trace/:id, /api/issues, reloads on file changes, and ships a hadoc validate <dir> CLI for pre-commit or CI in the data repo. 10 vitest tests.
  • web/: Svelte 5 + Vite. SVG floor plan with drag, wheel and pinch zoom, layer toggles, search, details panel (a bottom sheet on phones), issues list, PWA manifest and a network-first service worker.
  • Dockerfile, docker-compose.yml, and a CI workflow that type-checks, tests, builds, validates the demo house and builds the image (pushed to GHCR only on main).

Verified locally: npm run check, npm test (10 passed), npm run build, validator on the demo house (0 errors, 2 intended warnings), and the production layout served with --omit=dev deps. I checked screenshots at 1280×800 and 390×844. I couldn't run docker build because the build environment has no Docker daemon, so the CI docker job is its first real run.

Not in this PR: editing points in the app and committing to git, the WAGO, openHAB and UniFi importers, and the AREI diagrams. These follow the roadmap in the README.

🤖 Generated with Claude Code

https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv


Generated by Claude Code

- JSON Schemas for settings, site, points, enclosures, devices, cables,
  circuits and signals, with a configurable point ID pattern and
  abbreviations
- Fastify server: YAML loader with schema validation, cross-file checks,
  trace from a point to its power, cables, device and signals, REST API,
  hot reload, and a validate CLI
- Svelte web app: floor plan with pan/pinch zoom and layers, details
  panel with the trace, search, issues list, PWA manifest and offline
  fallback
- Demo house, Dockerfile, compose example, CI workflow, README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv
@MathiasVDA MathiasVDA self-assigned this Oct 10, 2026
@MathiasVDA
MathiasVDA marked this pull request as ready for review October 10, 2026 22:44
@MathiasVDA
MathiasVDA merged commit d940664 into main Oct 10, 2026
2 checks passed
@MathiasVDA
MathiasVDA deleted the feat/mvp-scaffold branch October 10, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants