This is the whole platform’s relational shape in one diagram: every table, its
primary and foreign keys, and the references between them. It is generated from
the live schema, not drawn by hand, so it cannot fall out of step with the
tables. When a migration adds or changes a table, the next make gen redraws
this page, and a schema change that forgets to regenerate is caught by the ERD
drift test, the same way a stale generated client is.
The diagram groups tables into subsystem containers. Each table is a node
showing only its primary-key and foreign-key columns, the relational
skeleton, so a forty-plus-table platform stays legible; the full column list of
any table lives in its migration and its Storage Gateway type, not here. Each
edge is a foreign key, drawn from the referencing column to the row it
points at. Edges that cross container borders are the seams between subsystems:
estate.component.product_id pointing at catalog.product.id, or
catalog.product_property.property_type_id pointing at
telemetry.property_type.id.
The generator would render a table not yet assigned to a subsystem in an
unclustered container, but a committed diagram never shows one: the
introspection test hard-fails on any unmapped table, so the failure is the
prompt to add a one-line entry for the new table to the cluster map in
internal/erd/cluster.go (cmd/erdgen only calls it).
identity - who can act and what they may do: principals (human and
service), groups, grants, roles, capabilities, and the impersonation trail.
estate - what is being monitored: locations, systems, components, and the
interfaces a component exposes.
catalog - the shared reference library: vendors, products, drivers, and
standards, plus the capabilities and properties they define.
telemetry - the observability model of ADR-0063:
the typed registries (property_type, event_type, command_type) over the
bare-noun data tables (property, metric, state, event, log_line,
command) and the alarms raised off them (alarm, alarm_capability).
collection - where and how telemetry is gathered: the nodes that run probes
and the tasks they execute.
config - the settings, variables, secrets, and credentials that parameterize
everything above.
content - the cross-cutting attachments: blobs, files, and the tag bindings
that label any entity.
audit - the immutable record of every privileged mutation and auth event.