Commit Graph

7 Commits

Author SHA1 Message Date
10d08e3b87 Name cameras here, and rename them on the camera
Both of your cameras call themselves "I91ET", so the slimmed dashboard
showed two identical names.

- A nickname kept in the registry now wins wherever a camera is named:
  cards, camera page, live view and its window title, pop-outs and the
  recordings list. It survives a rescan, and clearing it falls back to
  the camera's own name, then its model.
- Rename on the camera page also writes the camera's own name and
  location over ONVIF SetScopes, so everything else on the network sees
  them. Since SetScopes replaces every configurable scope, the others are
  read and sent back untouched; the result is re-read from the camera and
  reported as applied or adjusted, and the change is audited.
- cameraName() lives in a client-safe module, because the registry is
  server-only and the dashboard names cameras in the browser.
- NEXT_DIST_DIR lets a build run while dev servers hold .next.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-20 07:42:28 -05:00
daaecb7452 Fix the published package: compile the CLI, bundle onvif (0.1.1)
Installing 0.1.0 failed twice, both my mistakes.

- Node refuses to strip types under node_modules, so shipping .ts for the
  CLI could never work from an installed package. tsconfig.cli.json now
  compiles those modules to dist/ as ES modules, and the helper scripts
  are plain .mjs.
- serverExternalPackages made Turbopack emit require("onvif-<hash>"),
  a name that resolves nowhere, because onvif comes from a git URL.
  Bundling it fixes that; checked from an installed tarball, where
  /api/discover answered 200 and a real camera's info and snapshot came
  back through the packaged server.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 19:21:53 -05:00
5824db8ea9 Add MediaMTX video bridge: pinned installer and supervised localhost process
- npm run video:install downloads the pinned MediaMTX v1.21.0 for this
  platform, verifies its SHA-256 against checksums committed in
  src/lib/mediamtx-install.ts, and installs it into gitignored bin/.
- On server start, instrumentation launches MediaMTX with a generated
  owner-only config: API and WebRTC signaling on 127.0.0.1, only the ICE
  port (UDP 8189) on the LAN, a hashed per-boot API password, no
  anonymous users, unused protocols off. Restarts on crash with backoff,
  stops with the server; VIDEO_BRIDGE=off skips it.
- Camera streams are added to MediaMTX at runtime, on demand, with the
  stored login; nothing with a password is written to disk or echoed.
- rtspSourceWithLogin() reads a profile's RTSP URI over ONVIF.
- Export vrek log (live video goal, decisions, codec finding).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 15:33:55 -05:00
ebd488b672 Add camera pop-out window
- "Pop out" on each dashboard card opens /cameras/[id]/live in a named
  popup sized to the main stream (a plain link if popups are blocked).
- The live page shows only the frame, never stretched past its own size,
  with a fading name/time/refresh-rate overlay and error handling.
- The card pauses its own polling while its pop-out is open; the two
  coordinate over a BroadcastChannel.
- Share frame rendering (FrameImage) between card and pop-out.
- Ignore a stray build cache folder; export vrek log.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 15:02:39 -05:00
97a6b59cfe Track vrek export, MCP config and IDE VCS mapping
Commits .vrek/log.ndjson, the vrek export of goals, principles,
decisions, issues and evidence (restore with vrek_import), plus
.mcp.json, which wires the vrek MCP server, and .idea/vcs.xml. The
SQLite database and its -wal/-shm files are local state and are
gitignored; the export is refreshed and committed periodically.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 08:52:49 -05:00
f39d16a8c0 Add ONVIF camera app with a server-rendered camera dashboard
Discovers ONVIF cameras (Hikvision/Annke) over WS-Discovery, keeps a
server-side registry and an encrypted credential store, and serves
info, snapshot and credentials routes for each camera.

The home page is now a Server Component that lists known cameras from
the registry on load, without a scan (vrek iss-a0hz0py). The snapshot
refresh rate lives in the URL (?refresh=), and a scan refreshes the
server-rendered list.

Route input is validated with zod (iss-rjqy3hy), and /api/discover no
longer returns raw error messages (iss-dbwgww8). Adds
@tanstack/react-query and zod as dependencies, with a QueryClient
provider in the root layout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 08:40:32 -05:00
5e73d3ffe0 Initial commit from Create Next App 2026-09-19 07:15:19 -05:00