← Back to Documentation

The flat-file data model

<TextField> doesn't use a database. Every editable piece of content lives in a plain JSON file under core/data/, and the panel reads and writes those files directly.

Each file holds two kinds of entries. Statics are single fields: a title, a short text, a color. Flows are repeatable sets of items that share the same fields, like a portfolio or a list of team members. A flow with six items looks like six copies of the same small form, one per item, each with its own values.

Split your content across several files instead of stuffing everything into one. A typical site might have config.json for the header and footer, home.json for the homepage, and blog.json for the articles. The panel's sidebar lists one entry per file, which keeps it readable as the site grows.

Every field has a type: text, markdown, image, tags, color, datetime, and a few others. The type decides which editor the panel shows, and which extra template variables you get. A datetime field, for example, also splits its value into year, month and day, so a template can format a date without a line of PHP.

There are no migrations and no schema files. Add a field in the panel and it becomes one more key in the JSON on the next save. Remove it and the key goes away. Your content ends up as files you can open, back up and commit with the rest of the project, and that's most of the reason this CMS exists.