Technical Architecture of EZ EDGE CMS
I developed EZ EDGE CMS with a specific goal: to create a content management system that runs entirely on Cloudflare Workers without the bloat of traditional frameworks. By moving styling, image processing, and SEO logic to the edge, I’ve eliminated the need for origin servers and complex build pipelines.
Here is the technical breakdown of the engine and the trade-offs I made to keep it fast.
1. Zero-CSS Middleware (with Theme Constraints)
EZ EDGE CMS has no static CSS files. I integrated a Just-In-Time (JIT) UnoCSS middleware that runs at the edge. When a request is made:
- The middleware scans the HTML content.
- It generates the minimal utility classes required for that specific page.
- It injects the CSS directly into the <head>.
The Restriction: To maintain this performance, you cannot upload custom CSS files. You are limited to built-in themes where you can only customize colors and fonts. This ensures the JIT engine stays lightweight and prevents CSS bloat from slowing down the edge isolate.
2. Edge-Native Image Processing
Instead of relying on external S3 buckets or heavy image transformation services, I handle assets directly within the Worker:
- WebP Conversion & Resizing: When you upload an image, the CMS automatically resizes it and converts it to WebP format. This ensures maximum compression and faster loading times for end-users.
- KV Binary Storage: Images are stored as Uint8Array binaries in Cloudflare KV. They are served from the same edge location as your content.
- Garbage Collection: When you save a page, I've implemented logic that identifies "orphaned" images (assets no longer used in your content) and deletes them from KV to keep your storage costs at zero or near-zero.
3. Automated SEO & JSON-LD Graphs
I dont like to manually manage metadata, so I automated the SEO layer using Schema.org JSON-LD graphs.
It is a structured data format (script-based) that tells search engines exactly what your site represents. Instead of just having a "Title" tag, the CMS generates a linked data map that tells Google: "This is a Website, owned by this Person, and this specific page is part of this Breadcrumb hierarchy." This helps search engines index your site with much higher accuracy.
4. Script Injection for Interactivity
Since the themes are constrained, I added the ability to inject Global and Page-Related Scripts.
- Global Scripts: Useful for adding analytics (like Google Analytics or Plausible) or sitewide chat widgets.
- Page Scripts: Allows you to add specific functionality—like a custom calculator, a gallery light-box, or interactive forms—to a single page without bloating the rest of the site.
Like this Accordion
was created using a script I added to the editor for this page.
5. Current Technical Restrictions
Being honest about the limitations is part of the "Edge-Native" philosophy. If you use EZ EDGE CMS, you need to be aware of these:
- Design Limits: You cannot build a "from-scratch" custom layout. You must work within the parameters of my optimized built-in themes (Colors/Fonts only).
- 25MB Value Limit: Cloudflare KV has a hard limit of 25MB per entry. This applies to individual pages and images.
- Propagation Delay: While the updateQueue prevents write errors, it can still take up to 60 seconds for a new post to appear in every single Cloudflare data center globally due to KV's native consistency model.