985 B
985 B
AGENTS.md
- Repo root is a single Go module (
go.mod), with the app entrypoint inmain.goand tests inmain_test.go. - Static UI files live in
static/and are embedded with//go:embed static/*; changing HTML or SVG requires rebuilding/rerunning tests, not a separate asset pipeline. - The server will not start unless
WRITE_SECRETis set, or supplied via a localconfig.jsonif present. config.jsonis gitignored; treat it as a local-only runtime override, not a committed config file.ADDRdefaults to:8080when unset.chart_max_wattscomes fromconfig.jsonand only affects the chart when it is greater than zero.- The only supported write endpoint is
POST /writewithX-Secret; requests can be JSON ({"watts":123}) or form-encoded (watts=123). - History is kept in memory only, trimmed to the last 12 hours and capped at
10000points. - Use
go test ./...from the repo root for verification; targeted tests usego test -run TestName.