Schemas
The shape of a kind of data, which both validates your content and generates the form you edit it in.
A schema is the shape of a kind of data: what fields a "product" or a "blog post" has, which are required, and what counts as valid. It's written as JSON Schema, an open standard, so your data stays portable and predictable rather than locked to a house format.
#The two jobs a schema does
This is what makes Tessryx feel like a CMS: one schema does both at once.
- It validates. Data that doesn't fit the shape is rejected before it's saved.
- It generates the editor. A schema with a name, a price, and a photo produces a form with a text box, a number field, and an image uploader, automatically. The admin panel is the schema, seen from the other side.
You never build the form; you design the data and the form appears. For the full range of controls a schema can turn into (sliders, rich-text and code editors, cross-record pickers, maps, variant choosers, and more), see Form fields.
#What a schema captures
Beyond field names and types, a schema records the rules your data must follow: which fields are required, allowed ranges and formats (an email, a date, a positive number), a fixed set of choices, nested structure, and lists. Each of those rules becomes both a validation check and a control in the editor: a fixed set of choices is a dropdown, a number with a range is a slider, and so on.
#Versions
A schema is versioned. Editing it creates a new draft; publishing makes that the live
version. Everything that points at a schema pins which version, @published (the live one)
or @latest (the current draft), so reworking a schema never silently reshapes data already
bound to the old one.
#Where schemas are used
- A content record is validated by, and edited through, its schema.
- A workflow can name a schema as its input, which turns a run into a form that collects that input first.