Concepts

Datachains

The DTPR instance that describes a data-collecting technology.

Datachains

A datachain is a concrete instance of a DTPR schema. It describes one data-collecting technology — what it collects, why, who operates it, and what happens to the data downstream.

Structure

At the top level, a DatachainInstance carries a schema_version and an ordered list of elements:

{
  "schema_version": "ai@2026-04-16-beta",
  "elements": [
    { "element_id": "purpose.example", "category_id": "purpose" },
    { "element_id": "data.camera",    "category_id": "data-collected" }
  ]
}

Each entry in elements[] is an element placement — a reference to an element definition from the schema, optionally carrying:

  • a label override,
  • variables with filled values (the element's description gets interpolated using them),
  • a citation.

The schema defines the vocabulary (elements, categories, variables); the datachain picks from it.

Validation

Datachains are validated against a pinned schema version. See:

Both validate both shape (Zod) and semantics (cardinality, required categories, placement rules). Shape errors surface as parse_error; semantic errors carry stable codes per rule.

Rendering

Once valid, a datachain can be rendered to HTML:

  • render_datachain (MCP Apps) — produces HTML consumed via resources/read.
  • @dtpr/ui/vue + DtprDatachain — render inside a Vue app.
  • @dtpr/ui/html renderDatachainDocument — SSR the same components to a standalone HTML document.

See also

Copyright © 2026