Blackstar, the API-first, headless CMS built for developers

Written by Liam McLennan

Managed content in custom applications is useful, but building applications inside of a CMS is unproductive and miserable. Blackstar CMS is an API-first, headless CMS, built for application developers.

Blackstar CMS

I recently wrote that Hosting a custom application inside of a CMS is a terrible idea. Now, I present a solution.

Blackstar CMS is an API-first, headless CMS, built for application developers.

It allows you to put content in your custom web application, and provide a delightful content management experience for application administrators.

Blackstar CMS is currently in alpha preview. To access the alpha, signup for the Blackstar CMS newsletter below:



A tour of Blackstar CMS

An application using Blackstar CMS to embed managed content might look something like this:

Blackstarpedia

If I, as an application administrator, want to change the main heading, I click its edit link, and am taken to the blackstar edit page:

Edit

I can make a change, and see it reflected immediately:

Blackstarpedia updated

Some core design goals for blackstar are:

  • it should be simple for developers to integrate into their application and simple for administrators to use to manage content
  • it should be deployed on premise (see Why a SaaS CMS is not for everyone)
  • it should be simple to deploy and administer

The Developer Experience

There are different ways to integrate with Blackstar CMS. For a SPA type application this can be done by including elements decorated with the data-blackstar-name attribute. This tells Blackstar the name of the content chunk that should be inserted into that element. Here is an example from the BlackstarPedia demo.

<h2 data-blackstar-name="smaller-heading"/>
<div data-blackstar-name="second-content"/>

smaller-heading and second-content are the names of Blackstar content chunks.

Next, add the Blackstar client script, create a client, and specify what content should be bound to this page (all chunks with the tag blackstarpedia).

<script src="blackstar-cms-client.js"></script>

var blackstar = new Blackstar.Client('http://localhost:2999/', { showEditControls: true });
blackstar.get({ tags: ['blackstarpedia'] }).then(function (chunks) {
  blackstar.bind(chunks);     // bind by matching data-blackstar-name values to chunk names 
});

That’s enough to populate the page with content and allow application administrators access to create and edit content.

Blackstar CMS content can also be accessed via HTTP or a JavaScript client (browser or node.js).

Why a SaaS CMS is not for everyone

When I searched for a developer-oriented CMS designed for adding manageable content to custom applications I found a crowded market of hosted solutions (SaaS) and very little support for self-hosting. There are three reasons why I think that a hosted CMS is a bad idea for most situations.

1. It is an operational dependency

If your hosted CMS goes down, then your application becomes unavailable, or at least has no content.

2. You depend upon continued operation of the service

Hundreds of thousands of applications depended on a backend-as-a-service called Parse. In January 2016 Facebook shutdown Parse, leaving all those customers stranded. It probably made sense for Facebook, but it left their customers with no options. Other SaaS products like Charm shutdown before they even launch.

When you depend upon a third-party service for the runtime operation of your application you lose control of your own destiny.

3. Latency

Web applications always have some latency. It’s the time it takes for a request to travel from the client to your server, and then back again.

Using a SaaS CMS adds the latency of another network request. Now a request has to travel from the client, to your server, to your SaaS CMS server, back to your server, then back to the client. And that makes your app feel S L O W.

Blackstar CMS is currently in alpha preview. To access the alpha, signup for the Blackstar CMS newsletter below: