HotLayout describes a mobile or web screen as data. A manager assembles the screen from widgets in the HotLayout builder and publishes it; the result is a JSON document that every HotLayout reader draws natively. This repository holds the contract those readers implement, so that a reader (or a backend) can be written without the builder.
Five artifacts, each versioned on its own. A new widget does not change the palette, and a rebrand does not add widgets.
| Artifact | What it describes | Version |
|---|---|---|
screen-schema.json |
the screen document: which widgets, fields and tokens exist (28 widgets) | 9.28.0 |
theme.json |
the theme: what the tokens mean (colors, spacing, radii, shadows, text styles) | 4.0.1 |
data-contract.json |
the data dictionary: which values a layout may bind to, and in which form | 1.7.0 |
icons.json |
the icon set: the drawing behind every icon name (332 icons) | 1.0.0 |
placements.json |
the placement map: which published document each named place of an app shows | 1.0.0 |
The schema, the data dictionary and the placement map are JSON Schema documents with x-… blocks that carry
the rules JSON Schema cannot express (layout rules, locale resolution, action catalog,
number and date formats). Readers take those blocks as data rather than re-deriving them.
Every artifact carries MAJOR.MINOR.PATCH. The reader decides from it whether it understands a document:
- the major version must match the one the reader implements;
- a minor version adds only optional fields, so a reader of an older minor can still read a newer document and ignores what it does not know;
- the policy for everything else (unknown widget, unknown token, missing translation, …) is the
x-compatibility.policyblock of the artifact: one named decision per case.
Where the schema cannot say what a reader must do, the contract says it with a table of cases: input and expected output, written by hand. Every reader runs the same tables and must pass every row, which is how the readers are kept from drifting apart.
There are 33 tables in 32 folders under fixtures/, named *-cases.json, for example
fixtures/actions/action-cases.json (action addresses, event order),
fixtures/template/template-cases.json (text templates, plurals, money),
fixtures/locale/locale-cases.json (locale resolution).
fixtures/ also holds 37 sample screen documents (*-screens.json, *-screen.json) and the themes they use
(fixtures/themes/). They validate against the schema and are what the readers render in their own tests.
| Platform | Package | Repository |
|---|---|---|
| Web (React) | npm @hotlayout/react |
hotlayout/hotlayout-react |
| Flutter | pub.dev hotlayout_flutter |
hotlayout/hotlayout-flutter |
| iOS | Swift Package Manager, https://github.com/hotlayout/hotlayout-ios |
hotlayout/hotlayout-ios |
| Android | Maven Central, com.hotlayout:hotlayout-android |
hotlayout/hotlayout-android |
backend/ is for the team that stores and serves documents: an OpenAPI description
(backend/openapi.yaml), a README, an example of the user-state payload
and a sample implementation (C# models and a PostgreSQL schema). The sample shows one possible shape; it is not a required stack.
- Product: https://hotlayout.com
- Documentation: https://hotlayout.com/docs
Apache License 2.0, see LICENSE. Third-party material is listed in THIRD-PARTY-NOTICES.md.