Kenresoft Technologies Ltd
Discuss a projectLog in
Back to Portfolio

Case study

Kenresoft CMS

An open-source headless CMS that runs in your own Cloudflare account. We designed and built the Hono API on Workers, D1 and R2 storage, a separate React admin, and the Astro integration that powers this site.

Kenresoft CMS
TechnologyAPI-First CMSCloudflare WorkersHonoOpen SourceDrizzle ORMD1R2ReactTanStack Query

Kenresoft CMS

Building a Cloudflare-Native, Self-Hosted Content Platform

Kenresoft CMS is a reusable, API-first content management platform designed around a simple principle: a CMS should give developers and organizations control over their content, infrastructure, and deployment without forcing them into a proprietary hosting environment.

Rather than building another traditional monolithic CMS, I designed Kenresoft CMS as a Cloudflare-native system where the API, database, media storage, administration layer, deployment tooling, and frontend integration are deliberately separated.

The platform is built around Cloudflare Workers, D1, R2, Hono, React/Vite, TypeScript, Drizzle ORM, Better Auth, Zod, and Astro.

The Problem

Modern CMS platforms solve content management well, but they can introduce architectural constraints around hosting, deployment, infrastructure ownership, frontend integration, and extensibility.

For projects built with Astro and Cloudflare, I wanted a different model:

  • The CMS should be self-hosted in the customer's own Cloudflare account.

  • Content should be accessible through a clean API rather than coupled to a frontend.

  • Media should live independently from structured content.

  • The administration interface should not have direct access to the database.

  • Developers should be able to build their own frontend with Astro or another framework.

  • Each client should be able to operate an independent CMS deployment.

  • Deployment should be reproducible rather than dependent on manually configured infrastructure.

  • The system should eventually support extensibility through plugins rather than becoming a collection of project-specific features.

The goal was therefore not simply to build an admin dashboard. It was to create an infrastructure-aware content platform that could be reused across projects.

Architecture

Kenresoft CMS separates the platform into independent layers.

API

The API runs on Cloudflare Workers using Hono.

It provides the HTTP boundary between the administrative interface, public websites, integrations, and the underlying data layer.

The admin interface never talks directly to D1.

Database

Structured content is stored in Cloudflare D1, with the database layer managed through Drizzle ORM.

The data model supports content types, fields, entries, users, roles, revisions, publishing state, forms, and other CMS concerns.

Media

Binary assets are stored in Cloudflare R2 rather than inside the database.

This creates a clean separation between structured content and large media objects while allowing the CMS to manage media as a first-class resource.

Administration

The administration application is a React/Vite application deployed as a Cloudflare Worker with Workers Static Assets.

It communicates with the API over HTTPS rather than accessing the database directly.

Frontend Integration

For frontend applications, Kenresoft CMS provides an Astro integration through:

@kenresoft-cms/astro

The integration provides a typed client for consuming CMS content from independently hosted Astro projects.

This allows the CMS and the website to remain separate systems.

Deployment Architecture

One of the most important architectural decisions was making the CMS self-hosted rather than hosted by Kenresoft.

A deployment provisions resources inside the customer's own Cloudflare account.

The installation process can provision:

  • API Worker

  • Admin Worker

  • D1 database

  • R2 bucket

  • Database migrations

  • Authentication configuration

  • CORS configuration

  • Required environment configuration

The result is an independent CMS deployment owned by the organization using it.

This model means different clients do not need to share Kenresoft infrastructure or databases.

Developer Experience

I also treated developer experience as part of the CMS itself.

The project includes:

  • CLI-based project scaffolding

  • Deployment automation

  • Local development tooling

  • API documentation

  • OpenAPI support

  • Typed contracts

  • Astro integration

  • Example integrations

  • Deployment documentation

  • Architecture documentation

A developer can either install the complete CMS or scaffold only the pieces required for a separately hosted Astro frontend.

Content Management

The platform provides a structured content model rather than treating everything as an arbitrary document.

The system supports:

  • Content types

  • Custom fields

  • Entries

  • Drafts

  • Publishing

  • Scheduled publishing

  • Revisions

  • REST API access

  • Public and administrative API boundaries

  • Forms and public submissions

  • Media management

This allows the same CMS infrastructure to support websites, blogs, landing pages, directories, structured business content, and more specialized applications.

Administration Experience

The administration interface evolved beyond basic CRUD screens into a more complete CMS experience.

The dashboard includes functionality such as:

  • Dashboard overview

  • Content management

  • Command palette

  • Drag-and-drop field ordering

  • Settings

  • Dark mode

  • Authentication and role-based access

  • Media management

  • Forms

  • Publishing workflows

The objective is to make the system usable by both technical administrators and content editors.

Security and Access Control

Authentication is handled through Better Auth, with role-based authorization controlling administrative capabilities.

The API boundary also provides a deliberate separation between public content access and administrative operations.

This architecture allows the administration interface to remain replaceable without changing the underlying content system.

Forms and Public Submissions

Forms are treated as another first-class CMS capability rather than requiring every project to build its own backend submission endpoint.

The platform supports public form submissions with protections such as rate limiting and spam controls.

This allows websites to expose forms while keeping the processing layer within the CMS infrastructure.

Why Cloudflare

Cloudflare was selected because the CMS architecture benefits from having compute, database, object storage, networking, caching, and deployment close to the application edge.

The platform uses:

  • Workers for server-side execution

  • D1 for relational data

  • R2 for media

  • Workers Static Assets for the admin application

  • Edge caching for public API responses

This keeps the architecture relatively small while providing a strong foundation for independently deployed client projects.

What I Engineered

My work on Kenresoft CMS spans the architecture and implementation rather than being limited to the frontend.

Key areas include:

  • CMS architecture

  • API architecture

  • Cloudflare Workers infrastructure

  • D1 database design

  • R2 media architecture

  • Authentication and authorization

  • Content modelling

  • Publishing workflows

  • Revision handling

  • REST API design

  • OpenAPI integration

  • Admin dashboard architecture

  • Deployment automation

  • CLI scaffolding

  • Astro integration

  • Developer documentation

  • CI/CD

  • Extensibility and plugin architecture

Outcome

Kenresoft CMS has evolved from a project-specific CMS concept into a reusable platform designed to support multiple independent deployments.

The architecture allows a client website and its CMS to remain separate while still providing a straightforward content-management workflow for editors and a typed API experience for developers.

The project is open source under the MIT License and is being developed as a reusable foundation rather than a single-client implementation.

Let's talk

Have something similar in mind?

If your product or system has similar requirements, tell us about it and we'll talk through the approach.