Skip to content
J. Shipps

Croft

A small PHP CMS: describe a kind of content in one file, and Croft builds the admin around it.

Croft's home page: "Declare the content. The CMS builds the rest." above a screenshot of its admin

The problem

Every site I build for a client ends up needing the same things behind the scenes: a list of items, an editor, drafts, a publish date, image sizes, a way to undo a bad save. I kept rebuilding them, slightly differently each time, and so does every developer who builds small sites.

What I built

Croft turns that work into one small tool. A developer describes a kind of content (a recipe, a menu item, a case study) in a single PHP file, and Croft builds everything around it: the database table, the admin list, the editor, publishing, revision history and the public pages.

Then I designed and built getcroft.dev to explain and sell it, with documentation, a live demo and launch pricing. The site runs on Croft: every word of its home page, and the order of its sections, is edited in the same admin panel its buyers get.

app/types/recipe.php
return [
    'label'    => 'Recipe',
    'features' => ['slug', 'status', 'schedule', 'seo', 'revisions'],
    'title'    => 'name',
    'public'   => ['index' => '/recipes', 'single' => '/recipes/{slug}', 'template' => 'recipe'],
    'fields'   => [
        ['name' => 'name',   'type' => 'text',     'panel' => 'title'],
        ['name' => 'method', 'type' => 'markdown', 'panel' => 'main', 'editor' => true],
        ['name' => 'serves', 'type' => 'number',   'panel' => 'sidebar'],
    ],
];

Save this file and reload: Croft adds a Recipes table, a list and an editor in the admin, and the pages /recipes and /recipes/{slug}. Add a field later and the column is added for you.

Croft's article editor: a markdown editor with a toolbar on the left, publishing options on the right
The editor: markdown with a toolbar, live preview and word count. Status, scheduling and the page address sit beside it.

What every content type gets

  • 01Drafts, publishing and future-dated scheduling
  • 02Revision history on every save, with restore, including deleted items
  • 03Per-item SEO title, description and social image
  • 04Automatic redirects when an address changes
  • 05Media library with automatic WebP sizes and a warning before deleting a file in use
  • 06Editable lists for navigation, FAQs, team or opening hours
  • 07Admin and editor roles, two-factor sign-in, login rate limiting
  • 08Cookieless visitor counts: no IP addresses, no third parties
Croft’s dashboard: counts of pages and articles, a 30-day visits chart, the most-read pages and recent activity
The dashboard: a month of visits from Croft’s own cookieless counter, the most-read pages, and every recent save.
Croft's price table: $59 launch price, down from $99, for one developer and unlimited sites, with what the licence includes
Landing pages are built from sections you can reorder, hide or duplicate. History keeps the previous version on every save.

For developers

  • Plain PHP 8.1+ and SQLite. No framework, no Composer, no npm, no build step, no database server. Unzip it, point a domain at public/, and it runs, including on shared hosting.
  • Small enough to read. About 2,500 lines in fifteen classes, with thirteen guides.
  • Your templates, your CSS. Croft decides what data a template receives and nothing else.
  • One licence per developer, every site you build. Use it on as many client sites as you like and hand the source over with the finished site.

See it for yourself. The live demo, the full documentation and launch pricing are at getcroft.dev.

Next step

Want something like this for your business?

Tell me what you sell and what the site needs to do. You'll get a fixed quote before any work starts, or an honest no.

Start a project