The Death of the CMS Database: Inside tnkuehne/gether
How a stateless editor uses Cloudflare edge primitives to bring real-time collaboration to Markdown files without vendor lock-in.

For me, all of this boils down to one thing. Why can't we have a content editor that interacts with the codebase but doesn't need to be integrated into the frontend.
- Gether eliminates CMS vendor lock-in by acting as a stateless UI layer over existing GitHub repositories.
- It achieves Google Docs-style real-time collaboration using Cloudflare Durable Objects and the Hibernation API.
- Live previews are generated by spinning up actual OCI-compliant containers via Cloudflare Sandboxes.
- The frontend leverages Svelte 5 Runes to manage complex multi-user state and GitHub permissions seamlessly.
The GUI Tax on Prose
For teams building static sites, there is a fundamental tension between how developers want to manage content and how writers want to write it. Developers prefer "content as code"—Markdown files living alongside the source code in a Git repository. Writers, however, need a GUI. They need live previews, rich text editing, and real-time collaboration.
The traditional solution is the Headless CMS. Platforms like Sanity or Contentful provide the interface, but at a steep cost. They introduce proprietary databases, complex API integrations, and vendor lock-in. You are forced to pay a "GUI tax" just to edit prose.
Git, on the other hand, is not a collaboration tool. It cannot handle two people typing in the same document simultaneously. Gether bridges this gap. It provides the multiplayer experience of a modern CMS without taking ownership of the underlying data.
The Stateless Architecture
Gether is a CMS that refuses to store your content. It acts as a real-time collaborative layer sitting securely on top of the GitHub API. When you finish editing, the final Markdown file is committed directly back to your repository.
| Feature | Traditional Headless CMS | Bare Git Repository | Gether |
|---|---|---|---|
| Content Ownership | Proprietary Database | Git Repository | Git Repository |
| Real-Time Collaboration | Yes | No | Yes |
| Live Preview Fidelity | High (Requires Integration) | Low (Local Dev Only) | High (Containerized) |
| Setup Complexity | High | Low | Medium |
This architectural choice fundamentally changes the risk profile of adopting a new tool. If Gether were to disappear tomorrow, your content remains safely version-controlled in Git, exactly as it was.
Orchestrating the Edge with Durable Objects
Achieving Google Docs-style multiplayer editing usually requires deploying heavy Kubernetes clusters and managing complex WebSocket connections. Gether bypasses this entirely by leveraging Cloudflare Durable Objects.
Inside packages/collab, Gether implements a CollaborativeDocument class. This class uses Cloudflare's Hibernation API, allowing the Worker to stay dormant until a WebSocket message arrives. This makes the service highly cost-efficient. State is persisted using the built-in SQLite storage (ctx.storage.sql), enabling structured queries of document history.
The Containerized Preview Pipeline
Live previews are the hardest problem in headless architecture. Most tools rely on regex-based Markdown parsers that attempt to mimic the final output. Gether takes a radically different approach: it spins up the actual site.
Using Cloudflare Sandboxes, the packages/preview engine instantiates an OCI-compliant container. It clones the GitHub repo, runs pnpm install, and executes the dev command (like npm run dev for Vite or Hugo). Once the port is active, it exposes a public URL. The preview you see is identical to what will be deployed, because it is running the exact same code.
Taming State with Svelte 5 Runes
On the frontend, Gether is an early showcase of Svelte 5 in production. The editor must manage a complex matrix of user permissions, branch protections, and PR statuses across the UI.
In contribution-state.svelte.ts, Gether uses the new $state rune to create a global, reactive state object. This allows the UI to instantly toggle between "Read-only/Fork" and "Edit/Commit" modes across the Sidebar, Editor, and Toolbar without prop drilling.