CMS / foldkit-cms
Where content, drafts, and state live
| Fact | Owner |
|---|---|
| Published content | your tables, read as any Entity is |
| Unfinished author edits | a draft, kept beside the row, never in it |
| Entry lifecycle state | derived by Cms.state, never stored |
| Allowed transitions for a state | Cms.offers, checked before user permissions |
| Who may make a transition | your allow rule, checked on the server |
| The draft being typed | foldkit-form, inside the editor's Model slice |
| Save progress and conflicts | Cms.editor, in that slice |
Draft updatedAt and entry revision | Remote's store, read directly |
Persistence and visitor filtering live in the server adapter.
How drafts sit beside live rows
A draft is an unsent form. Your content row holds only what is published,
while a draft stores the unsent input of the operation that will publish it.
Publishing runs your own mutation with the draft's value; visitors read only
content rows and never touch drafts; a revision saves a published value; and a
half-filled form can autosave even when a not null column would reject it.
An Entry tracks a piece of content from its first keystroke to its archive. It exists before the first published row and remains after a row is unpublished. Publishing runs your mutation to update the live row and appends a Revision to the Entry.