Frankenstein-CMS

Frankenstein CMS

Because CloudCannon is too expensive and your static site deserves a soul.

DEMO

Frankenstein CMS is a zero-install, single-folder content management system specifically built for static HTML sites hosted on GitHub. No database, no Node.js overhead, no monthly subscriptions. Just one folder to dominate your repo via the official GitHub API.

It uploads files directly to GitHub, making it work perfectly with GitHub Pages, Cloudflare Pages, Netlify and other hosting services.

Frankenstein Login Interface


🛠️ How Does the Magic Work?

Frankenstein isn’t just a text editor; it’s a technical beast that solves three complex problems that other “lightweight” editors ignore:

1. CSS Transfusion

Since the CMS and your website live in the same browser tab, their styles would normally clash. Frankenstein solves this by extracting all <link rel="stylesheet"> tags from the source, fetching them via the API, and injecting them live into the editor’s Shadow DOM.

2. Private Image Reanimation

Images in a private repository are normally invisible to an external editor. Frankenstein finds all <img> tags, fetches the binary data using your GitHub token, and creates temporary blobs for the preview. Upon saving, it reverts these to their original relative paths (img/photo.jpg) to keep your repo clean.

3. The Git Suture

When you hit “Save”, the editor’s DOM is stripped of all contenteditable attributes. Frankenstein reconstructs a full HTML document by merging the original <head> and <html> attributes with the new <body>. This entire package is Base64 encoded and pushed directly to GitHub.

Frankenstein Editor Interface


🚀 The Two Versions

Frankenstein now comes in two flavors depending on your needs. Choose the folder that best fits your workflow.

1. The dev/ Version (Zero Setup)

Perfect for personal projects or developers who want to manage their own sites. It talks directly to the GitHub API. No servers, no setup, just drop it in your repo.

Three ways to configure it:

Setup (dev/):

  1. Add data-editable attributes to your HTML.
  2. Generate a GitHub Personal Access Token.
  3. Open dev/index.html (or your iframe/URL link) and enter your Token. The repo details will pre-fill if you used Method B or C.

2. The prod/ Version (For Agencies & Clients) BETA (not tested yet)

Perfect if you build websites for clients. It uses a Serverless Bouncer (Cloudflare Worker) to completely hide your GitHub Token.

Now with Multi-tenant & Fallback support:

Setup (prod/):

  1. Deploy the Bouncer: Upload prod/worker/worker.js to a Cloudflare Worker.
  2. Configure Multi-tenancy (Optional): Follow instructions in prod/worker/wrangler.toml.example to set up a KV namespace for multiple sites.
  3. Secure the Vault: Set CLIENT_EMAIL, CLIENT_PASSWORD, and GITHUB_TOKEN as secrets (or in KV).
  4. Configure the UI: Edit prod/frankenstein.config.json to point to your bouncerUrl and optional backupBouncerUrl.
  5. Client Handoff: Your client visits prod/index.html and simply enters their Email and Password.

🏗️ Project Structure


⚰️ Todo & Roadmap

Planning:

IMPORTANT:

Later: