CMS / foldkit-cms-drizzle

What it owns

FactOwner
Published contentyour tables, bound with bind as any are
Unpublished workcms_entries, cms_drafts, cms_revisions
Which rows of those a principal may seethis package: none, unless they are an author
Which rows of your content a visitor may seeyour content Entity's Read rules, compiled into its binding's visible
Who is an author, and who may make a transitionyour guard set's principal guards, as authors and transitions; allow for a rule about the entry
What publishing a post doesyour own create and update handlers
That a publish is wholethis package, inside the transaction you name
The timeyour 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 else

Install

sh
pnpm add effect drizzle-orm foldkit-cms foldkit-cms-drizzle foldkit-guard foldkit-remote-drizzle foldkit-remote-server