Components
VERSION 0.1 · 2026-10-12 · developer.nrgon.net/components
How software is shaped on every layer. An application is assembled from components. A component does one job, reads from the data layer and writes its result back there.
What a component has
Stated in one sentence at the top of its README.
Named objects or keys, each with its format.
A function, a command-line entry point or an HTTPS endpoint. Often all three.
A script that runs it on known input and compares the output.
Components today
The tariff and time-of-use bands for a site on a date. From data.nrgon.net.
Daily energy, peaks and a battery size per value case, from interval load and tariff.
What a battery saved against a baseline, with the method.
Read and write a vendor's equipment through its cloud API or register map.
Charge and discharge windows for tomorrow, in the vendor's format, written and read back.
Proposal, weekly report, final report. PDF and Markdown.
A sizing conversation on tablet, phone and browser from one definition file.
Conventions
- JSON for messages, JSONL for logs, CSV for tables, YAML for configuration, Markdown for text. Anything else is named in the README with the reason.
- UTC inside, local time at the edge. Stored timestamps are UTC. Conversion happens where a person reads it.
- Units in field names:
power_kw,energy_kwh,soc_pct. - One definition, many renderers. Content that appears on several platforms lives in one file. A harness checks the renderers agree.
- A check before a feature.
- No secrets in code. Credentials come from the environment. The README names which.
Adding a component
- Write the README: job, inputs, outputs, interface.
- Own folder, own check script.
- Read inputs from the bucket, Redis, data.nrgon.net or YAML. Never from another component's internals.
- Write outputs with the naming on the Infrastructure page.
- Run the check. Add the component to the list above.
