I'm currently working on a small project and I'm curious if a lightweight JSON-based backend for static sites already exists or if it's unnecessary. I recently created a static website for a local coffee shop using React and Next.js, and they love it! However, they want to make some changes themselves, like updating the About section, changing some gallery images, and tweaking the menu.
Instead of setting up a full-blown CMS or connecting to Firebase, Supabase, or MongoDB, which seems like overkill, I started building a simple backend CMS that operates on the same server, storing all content as plain .json files. It features a secure API for editing and viewing these JSON files, as well as optional schema validation to keep everything from breaking. The goal is to allow static site creators to easily implement this solution for editable content without needing a full CMS.
So my question is, does a solution like this already exist in a usable format? Or have I overlooked something?
4 Answers
Honestly, I don't think clients will be able to edit JSON files themselves. It might seem simple, but one misplaced symbol could lead to serious issues like breaking the site. You're right that JSON is behind the scenes, but a user-friendly UI could help them interact more safely with their content.
Have you considered using markdown files instead to manage site content? A site compiler could seamlessly integrate those into your pages, serving them as static HTML and CSS, making it easier to manage for your clients.
YAML could be a better fit for your needs! You might want to check out Grav CMS. It's not exactly what you're looking for, but it deals with similar concepts. Just keep in mind that it leans more towards being a site builder rather than a backend API that you're aiming for.
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads