1: CMS overview

The Phlo CMS turns a model schema into a complete admin interface. You declare what your data looks like; the CMS generates the navigation, list views, record views, create and edit forms, a REST API and CSRF protection. There is no hand-built admin HTML.

1.1: What it generates

From a handful of models, each declaring a schema, the CMS produces:

1.2: How an app declares itself

An app mounts the CMS with two declarations: which models exist, and how they appear in the sidebar.

prop models => array_values(array_filter(['article', 'author', 'category'], fn($m) => phlo_exists($m)))
prop menu => [
    'article'  => ['icon' => 'πŸ“', 'uri' => 'articles',  'title' => 'Articles'],
    'author'   => ['icon' => '✍️', 'uri' => 'authors',   'title' => 'Authors'],
    'category' => ['icon' => 'πŸ—‚οΈ', 'uri' => 'categories', 'title' => 'Categories'],
]

The CMS framework is loaded as a resource path; your models live in modules/. The rest of this mini-manual covers schemas, relations, the admin and uploads, and ends at a live blog demo.

1.3: The demo

The phlo-demo-cms repository is a blog on SQLite: five models, every relation type, image uploads and a Faker seeder, a complete app you can copy and re-seed in one command.

We use essential cookies to make this site work. With your permission we also use analytics to improve the site.