I wanted to scratch an itch for myself so I built myself and API-only CMS over the last 24 hours. But now that I'm getting closed to finishing I'm building the landing page and realizing I don't know if/how I can sell it.
What is an API-only CMS?
Basically just a database/json store with content managing features built in. For example, say on my homepage I wanted a dynamic header, subheader, and store hours. I could POST JSON data to my endpoint like this.
POST - https://crudcms.cms/v1/homepage
{
"header": "My Store",
"subheader": "Store hours",
"hours": {
"monday": "8am - 10pm",
"tuesday": "8am - 10pm",
// etc.
}
}
This would create a new document homepage and store the JSON data in it.
Then in the code for my homepage I could send a GET to retrieve the content and drop it in my HTML like this: (shortened Next.js example)
GET - https://crudcms.cms/v1/homepage
const Home = ({ content }) => (
<div>
<h1>{content.header}</h1>
<h2>{content.subheader}</h2>
<ul>
<li>
Monday:
{content.hours.monday}
</li>
<li>
Tuesday:
{content.hours.tuesday}
</li>
</ul>
</div>
);
export async function getServerSideProps() {
const res = await fetch('https://crudcms.com/v1/homepage?token=${apiKey}');
const content = await res.json();
return {
props: { content },
};
}
export default Home;
You could then update the content whenever you want by sending a PUT request to the same endpoint: PUT - https://crudcms.cms/v1/homepage. This would automatically create a new version for you so you can access your original data at GET - https://crudcms.cms/v1/homepage/1 or get the newest version at GET - https://crudcms.cms/v1/homepage/2 (or drop the 2 since the base always points to the newest).
Finally you can delete documents and all versions of it with: DELETE - https://crudcms.cms/v1/homepage
Why would I use this over a usual headless CMS?
Ease of setup. Sing up and get an API key and you're ready to start creating and managing content, that's all.
Ease of use. No need to learn and setup complicated editors. Just POST and GET your get you content.
Completely unstructured data. Since it's just JSON stucture your documents however you want, you can even shove HTML or other data types in your JSON and just parse it on the client.
However, it'd obviously not be for everyone and isn't meant to replace CMSs, it's just good for people who need something quick and easy to manage dynamic data without setting up complicated CMSs or building their own database and versioning system.
Would you use it? Do you think people would pay for it?
Would I use it - no.
Every time I've implemented a headless CMS the people entering content weren't technical so I need a UI to allow them to enter content.
I used strapi ( https://strapi.io/ ) a while back as a headless cms and it worked pretty well for my usecase. Is this what you wanted do build or is it different? Maybe also a plugin for strapi could be a great way to go and not to build everything yourself.
Howdy, Justin. There's a product called ButterCMS, which I think is the same as your idea? I've never used it, so no opinion to offer there. So seems like there is some demand?
Interesting idea.
Perhaps this has its place, but I think it only becomes easy to use if admin front-ends are going to be created. Else one has to write some script or use Postman or whatever to invoke all the API's. Not sure if one would like to go that route.