Variables, form fields, data tables, pipeline inputs — users encounter each of these in different parts of MakeBox, but underneath they all share one shape. That shape is the schema.
Once you see the schema model, you stop asking “how do I bind this variable to that data source” and start asking “what shape does this template need.” The data finds its way in.
What a schema is
A schema is a named shape of fillable data. It lists fields, each with a type (text, number, date, list, …), an optional default, and optional validation.
A template declares the schema it needs — “give me a customer name, an invoice total, and a list of line items.” At render time a data payload fills that shape. A field the payload leaves out shows its chip’s fallback; in a pipeline, validation rules decide what happens when a field is missing or has the wrong type.
The schema is not the data — it’s the contract for what the data must look like.
Where schema shows up
Variable chips read the schema — a {{customer.name}} chip is asking the schema for the customer.name field’s value at render time.
Form fields read and write it — the field’s binding says which schema field it writes to, and the field’s type should match that schema field’s type.
Data tables read it in bulk — one tbody row × N data rows means the data row has to match the shape of fields referenced inside tbody.
Pipelines carry it in both directions — a Data Source node emits rows matching its upstream schema; a Rendering node accepts rows matching its template’s schema.
Composites compose it — a Composite’s section bindings resolve variable references across multiple sections, each of which carries its own schema.
See How variables bind to content for the mechanics layer and Template, document, form for where schemas are authored.
Field types and defaults
Every field has a type that governs which values it accepts:
| Type | Example value |
|---|---|
| text | "Alice" |
| number | 42 or 3.14 |
| true / false | true |
| date | "2025-03-15" |
"alice@example.com" | |
| URL | "https://example.com" |
| phone | "+1 555 0100" |
| currency | 1250.00 |
| list | [{...}, {...}] — repeats as table rows |
| group | { "name": ..., "email": ... } — nested fields |
The aggregate.<fieldKey> convention
Table totals in a tfoot row use a special path shape: aggregate.<fieldKey>. A chip with the path aggregate.line_total inside a tfoot resolves at render time to a reduction over the sibling tbody rows’ line_total values.
The schema does not declare these paths — they’re computed at render time from the surrounding <tbody>. See How data tables work for the aggregation shapes.
When the schema differs from what’s in the template
Schemas and template content drift in two directions:
Orphan chips. A variable chip references a field that the schema doesn’t declare. Common after bulk-pasting content from another template — the chips come along, the schema doesn’t. The editor flags the drift; at render time the chip shows its fallback value if it has one, otherwise its path.
Unreferenced schema fields. The schema declares a field that no chip or form-field reads. Harmless but noisy — usually left over from a prior template structure.
Either kind of drift is a signal to resync the schema with the template content, not a bug to work around. See How variables bind to content for the cleanup flow.
See also
- How variables bind to content — the mechanics layer
- Template, document, form — what the schema is for
- How forms work — form fields as a schema-writing surface
- How data tables work — schema × row-expansion mechanics