A RESTful CMS
Mage is a pure CMS. Unlike most CMSes, Mage is unopinionated about how you build your front end. It provides JSON via a REST API and an interface to edit content. That's all it does!
Mage functions similarly to a static site generator. It works by managing a collection of "blobs", which are simply JSON documents. It's up to you to define the structure of your blobs through JSON schemas.
- Lightweight and front-end agnostic.
- Schema-bound JSON document storage.
- Localization is a first class citizen.
- Client and server-side validation comes free.
Mage requires an installation of Node and npm to operate.
Run the following commands in your terminal:
git clone https://github.com/gvn/mage.git && cd magenpm installcp env.json.sample env.jsonnpm start
- Add a new JSON schema in
/sourcenamed after your blob (eg:pizza.json).
Pro Tip – Use the generator at jsonschema.net to create a schema!
To edit a blob's content, just navigate to http://localhost:31319/edit/BLOB and use the form.
When you're done, just hit the Save button. That's it!
By default, Mage is limited to a single locale, US English, but it's easy to add more! Just add additional locales to your env.json's locales array as needed. Once there are multiple locales defined, you will see a dropdown menu in the editor to switch between them.
GET: Retrieve JSON for the specified ID and LOCALE.PUT: Store JSON for the specified ID and LOCALE.
GET: Retrieve a list of the available blobs as well as their modification dates where applicable.
GET: Retrieve the JSON Schema for the specified ID.