I'm currently working on a project where I built a static website for a local coffee shop using React and Next.js. They love the site, but they want to make some updates themselves, like changing the About section, swapping out gallery images, and tweaking the menu. I thought about setting up a full CMS or connecting to something like Firebase or MongoDB, but that seemed like overkill. Instead, I started creating a lightweight backend CMS that runs on the same server and stores all content as plain JSON files. It features a secure API for editing and viewing the JSON files, with optional schema validation to prevent layout issues. Basically, the idea is for anyone who builds static sites, either for clients or themselves, to use my setup to get editable content without needing a full CMS. My question is whether something similar already exists that I might have overlooked?
3 Answers
YAML might be a better fit for this purpose. You could look into Grav — it's a flat-file CMS that uses YAML. While it may not exactly match what you're building, it could definitely give you some ideas for handling content in a more user-friendly way.
It sounds cool, but I think clients may struggle with editing JSON files directly. Even minor issues like newlines or quotation marks can lead to major problems. But if the JSON is just a backend storage method and there's a simple UI for them to interact with it, that could work! Definitely seems like a great way to simplify things for your clients.
Honestly, using markdown files for site content could also be a solid option! You can use a website compiler to integrate markdown into templates, generating static HTML and serving everything up nicely.
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads