How prmgr-org/prmgr-observatory-starter works
PRMGR Observatory Starter is a local-first home-energy dashboard with an optional file-based recorder. A user views synthetic readings or imports JSON in the browser; the dashboard validates and presents energy, heating, and historical measurements, with JSON export. For recording, an external adapter supplies a local JSON file, the collector appends new timestamped samples to history, and the dashboard can request a snapshot from the local server. The sampled code supports these links; other README-described capabilities are retained as dashboard responsibilities without implying separate unsampled implementations.
Main entry points: app.js Dashboard views and controls · history.mjs History persistence · server.mjs Local web and history server · collector.mjs History collector
Components 9
Browser dashboard
- Dashboard views and controls
public/app.js - Labels and artwork settings
public/config.js
Reading model
- Validation and reading logic
public/model.js
Local recording
- History collector
collector.mjs - History persistence
history.mjs - Local web and history server
server.mjs - Recorded history file
Other components
- Home observer
- Adapter-produced file
Connections 10
- Home observer → Dashboard views and controls: views and imports
README.md - Dashboard views and controls → Validation and reading logic: validates and displays
public/app.js - Dashboard views and controls → Labels and artwork settings: reads settings
public/app.js - Dashboard views and controls → Local web and history server: requests snapshot
public/app.js - Local web and history server → Dashboard views and controls: serves app files
server.mjs - Adapter-produced file → History collector: provides JSON input
README.md - History collector → History persistence: records samples
collector.mjs - History persistence → Validation and reading logic: validates readings
history.mjs - History persistence → Recorded history file: reads and writes
history.mjs - Local web and history server → History persistence: loads history
server.mjs