Architecture
Cloudcore is a headless CMS that runs entirely on Cloudflare's edge network. No traditional servers, no PHP, no MySQL.
Stack
| Layer | Technology | Purpose |
|---|---|---|
| Runtime | Cloudflare Workers | V8 isolates, sub-50ms cold starts globally |
| API Framework | Hono | Lightweight, fast, TypeScript-native |
| Database | Cloudflare D1 (SQLite) | Relational data at the edge |
| Storage | Cloudflare R2 | S3-compatible object storage for media |
| ORM | Drizzle ORM | Type-safe SQL queries |
| Validation | Zod | Runtime schema validation on all inputs |
| Admin UI | React + Vite + TailwindCSS | Admin 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:
| Role | Can do |
|---|---|
| Admin | Everything — users, settings, publish, delete |
| Editor | Create, edit, publish content. Manage categories, tags, media. |
| Contributor | Create drafts only. Cannot publish, cannot manage taxonomy or media. |