v0.1 · open source · MIT

The CMS for SvelteKit on Cloudflare.

Define your content in TypeScript and get a Svelte 5 admin, a typed Local API, drafts, versions and sign-in. It all runs on Workers, D1 and R2: as one Worker with your site, or headless over Service Bindings.

pnpm create kitcms@latest my-site

Everything lives in your repo

No separate CMS server, no hosted database to pay for, no schema clicked together in a dashboard.

  • Schema is code

    Collections, globals, blocks and fields are defined in kitcms.config.ts. Types are inferred, migrations are generated, and every change goes through code review.

  • One Worker

    The admin, the API and your site deploy together as a single SvelteKit app on Cloudflare Workers.

  • One pipeline for every write

    The admin, REST, RPC and your own server code all go through the same access rules, hooks and validation.

  • Drafts, versions, live preview

    Autosaved drafts, version history with restore, and previews rendered by your own Svelte components.

  • Media on R2

    Uploads are stored in your own R2 bucket. Images are resized on the fly through Cloudflare's /cdn-cgi/image.

  • Headless when you need it

    Other Workers read content over a Service Binding with a typed client. No public API keys, no extra network hop.

Write a collection. Get an admin.

This is the whole definition. kitcms generates the D1 migration, the admin list and edit form, and the types your pages query with.

src/kitcms.config.ts
import { collection, defineConfig, fields as f } from '@kitcms/core';

export default defineConfig({
	collections: [
		collection({
			slug: 'posts',
			versions: { drafts: { autosave: true } },
			access: { read: () => true },
			fields: {
				title: f.text({ required: true }),
				slug: f.slug({ from: 'title', unique: true }),
				publishedAt: f.date(),
				body: f.richText(),
			},
		}),
	],
});
The posts edit screen in the kitcms admin

A full app or headless

Same config, same API. Pick how content reaches your users.

A browser talks to one Worker that holds the site, the admin and the API. The Worker reads D1 and R2.BrowserOne WorkerSiteAdminAPID1R2

Full app

Your site, the admin and the API are one SvelteKit app, deployed as one Worker. Pages read content with the Local API: a function call, not an HTTP request.

Another Worker calls the kitcms Worker over a Service Binding RPC. The kitcms Worker reads D1 and R2.YourWorkerkitcmsWorkerServiceBinding RPCD1R2

Headless over RPC

Keep content in one Worker and read it from others through a Service Binding. Calls stay inside Cloudflare and are typed end to end.

import { kitcms } from '@kitcms/client';
import type { KitcmsTypes } from './kitcms-types';

const cms = kitcms<KitcmsTypes>(env.CMS);
const { docs } = await cms.find('posts', { sort: '-publishedAt', limit: 10 });

What you need

kitcms runs only on Cloudflare. That is the point: no servers to run, and content sits next to your code.

  • Workers Paid plan

    Passwords are hashed with scrypt, which needs more CPU time per request than the Free plan's 10 ms limit.

    Learn more
  • D1

    Content, users and versions live in a D1 database, created with one wrangler command.

  • R2

    Uploaded files are stored in an R2 bucket you own.

Start a site in a minute

Scaffold, migrate, run. Local D1 and R2 work without a Cloudflare account.

pnpm create kitcms@latest my-site