Cloudcore

Architecture

Cloudcore is a headless CMS that runs entirely on Cloudflare's edge network. No traditional servers, no PHP, no MySQL.

Stack

LayerTechnologyPurpose
RuntimeCloudflare WorkersV8 isolates, sub-50ms cold starts globally
API FrameworkHonoLightweight, fast, TypeScript-native
DatabaseCloudflare D1 (SQLite)Relational data at the edge
StorageCloudflare R2S3-compatible object storage for media
ORMDrizzle ORMType-safe SQL queries
ValidationZodRuntime schema validation on all inputs
Admin UIReact + Vite + TailwindCSSAdmin dashboard with WYSIWYG editor

Request flow

In production, the recommended architecture uses two workers:

Frontend -> cloudcore-api (read-only) -> D1/R2 <- cloudcore-cms (behind CF Access)
            api.example.com                          cms.example.com (locked down)

The Public API is a separate read-only worker with zero write operations and zero access to user data. The CMS stays behind Cloudflare Access or a VPN. Both share the same D1 database and R2 bucket.

Philosophy

Cloudcore is the foundation, not the whole house. It provides:

  • Content storage and retrieval via API
  • Block-based content model
  • Authentication and authorization
  • Media management
  • Admin dashboard

It does not provide plugins, themes, comments, analytics, e-commerce, or SEO tools. You build what you need on top, or let AI generate it for you.

Content model

Content is stored as structured blocks — arrays of typed JSON objects. Each block has a type, a value, and optional options. This is more flexible than Markdown and more structured than raw HTML.

{
  "type": "page",
  "title": "About Us",
  "slug": "about",
  "blocks": [
    { "type": "richtext", "value": "<p>Welcome to our site.</p>" },
    { "type": "image", "mediaId": "01ABC...", "options": { "caption": "Our team" } },
    { "type": "code", "value": "npm install cloudcore", "options": { "language": "bash" } }
  ]
}

RBAC

Three roles with cascading permissions:

RoleCan do
AdminEverything — users, settings, publish, delete
EditorCreate, edit, publish content. Manage categories, tags, media.
ContributorCreate drafts only. Cannot publish, cannot manage taxonomy or media.