CMS / foldkit-cms-drizzle
What it owns
| Fact | Owner |
|---|---|
| Published content | your tables, bound with bind as any are |
| Unpublished work | cms_entries, cms_drafts, cms_revisions |
| Which rows of those a principal may see | this package: none, unless they are an author |
| Which rows of your content a visitor may see | your content Entity's Read rules, compiled into its binding's visible |
| Who is an author, and who may make a transition | your guard set's principal guards, as authors and transitions; allow for a rule about the entry |
| What publishing a post does | your own create and update handlers |
| That a publish is whole | this package, inside the transaction you name |
| The time | your now, which defaults to the server's clock |
Mental model
A table is read four ways: by id, as the children of a relation, as the target
of a ref, and through a query. A rule on one of them leaves three open. So the
boundary is not a filter this package adds somewhere; it is a
visible rule on
each binding, which every one of those paths applies.
an author's principal ──> entries, drafts, revisions, every content row
a visitor's principal ──> published content rows, and nothing elseInstall
sh
pnpm add effect drizzle-orm foldkit-cms foldkit-cms-drizzle foldkit-guard foldkit-remote-drizzle foldkit-remote-server