deployed at the edge · 300+ locations

Content,
decentralized
by design.

0xCMS is an edge-native content management system that runs entirely on Cloudflare Workers. OAuth 2.1 sign-in, dual-database publishing, versioned content, private media vault — zero servers, zero cold starts.

0ms
cold starts
isolated D1 stores
page versions
0xcms — wrangler@edge

npm run deploy

Compiled Tailwind admin UI ✓

Uploaded 0xcms (2.41 sec)

D1 bindings: DB · PUBLISHED_DB

R2 vault: MEDIA_BUCKET [private]

Durable Object: PageSyncDO [realtime]

Deployed to https://cms.eventuai.com

// 01 — introduction

The protocol layer for your content

Everything a serious publishing stack needs, compiled into a single Worker. No origin servers. No databases to babysit. Trustless by default — even your media bucket is private.

🔐

OAuth 2.1 + PKCE

Sign in with Eventuai, GitHub, or Google. Dual JWTs — 15-minute access tokens plus rotatable 7-day refresh tokens, hashed in D1 for instant revocation.

⛓️

Dual-chain databases

Drafts, sessions, and trash live in a private D1 store. Publishing commits an immutable snapshot to a separate published D1 — public readers never touch your admin data.

🧬

Versioned everything

Every save mints a new page version. Roll back any page to any point in its history — your content ledger is append-only.

🛰️

Realtime page sync

A Durable Object coordinates concurrent editors per page, so your team never overwrites each other's work.

🗄️

Private media vault

Uploads land in a private R2 bucket — never public. The Worker gates every read at /media/* with on-the-fly image resizing for previews.

🧩

Worker plugins

Extend with separate Workers over service bindings: lifecycle hooks, custom content types, fields & blocks, admin pages. No runtime installs — just bind and redeploy.

HARDENED BY DEFAULT: CSP nonces Rate limiting Cross-origin mutation guard Canonical host enforcement Role-based access

// 02 — architecture

Publish flow, on-chain style

Drafts and live content are physically separated. A public reader Worker can bind only the published database — it can't even see users, sessions, or drafts.

DB · private
users · sessions
draft_pages · page_versions
tags · trash · media_files
— publish ⟶ ⟵ un-publish —
PUBLISHED_DB · public
live_pages
live_page_tags
(nothing else. ever.)
— reads ⟶ edge cache
🌐 Public site
Liquid templates
served from 300+
edge locations
Hono + TypeScript
router & runtime
Tailwind + VanillaJS
zero-framework admin UI
LiquidJS + Emmet
templating & authoring

// 03 — get started

Mint your own instance

From clone to edge deployment in nine steps. All you need is a Cloudflare account and wrangler.

01

Install dependencies

$ npm install
02

Create the D1 databases

Two isolated stores: cms for private admin data, cms-published for live content only. Copy the printed database_id values into wrangler.toml.

$ npx wrangler d1 create cms
$ npx wrangler d1 create cms-published
03

Run migrations

Add --remote for production. Locally, npm run db:migrate applies both.

$ npx wrangler d1 migrations apply cms
$ npx wrangler d1 migrations apply cms-published
04

Create the private R2 media vault

The bucket stays private; the Worker serves objects at /media/<key>. The MEDIA_BUCKET binding ships in wrangler.toml.

$ npx wrangler r2 bucket create worker-cms-media
05

Configure secrets

⚠️ The JWT secret must be at least 32 characters — the Worker refuses to serve in production with a weaker key. Create .dev.vars for local dev.

# random 32-byte signing key
$ openssl rand -hex 32 | npx wrangler secret put JWT_SECRET
06

Enable OAuth providers

Pick your gateways in wrangler.toml, then add a client ID + secret per provider.

ENABLED_PROVIDERS = "eventuai,github,google"
GITHUB_CLIENT_ID  = "<client-id>"
$ npx wrangler secret put GITHUB_CLIENT_SECRET
07

Grant yourself admin

Sign in once, then promote your account. Roles are a comma-separated list.

$ npx wrangler d1 execute cms --remote \
    --command "UPDATE users SET role='admin' WHERE email='[email protected]'"
08

Run locally

$ npm run dev
# → http://localhost:8787
09

Ship to the edge 🚀

$ npm run deploy

// ready when you are

Don't trust.
Verify it yourself.

The live instance is running on the edge right now.

Launch 0xCMS ↗

cms.eventuai.com