← 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 a set of articles. The panel's sidebar lists one entry per file, so this also keeps navigation manageable once a site grows.

Every field has a type: text, markdown, image, tags, color, datetime, and a handful of others. The type decides which editor the panel shows, and which extra template variables get generated for free. A datetime field doesn't just hand the raw string back. It also splits the value into year, month and day, so a template can format a date without a line of PHP.

None of this needs migrations or schema files. Add a field in the panel and it's just another key in the JSON the next time it saves. Remove one and it disappears just as cleanly. That's the whole pitch, really: content as files you can read, back up, and version like anything else in the project.