A RESTful, localizable, JSON-oriented 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 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 mage
npm install
cp env.json.sample env.json
npm start
- Create a new folder in
/source
with the name of your blob. - Add a JSON Schema for your blob to the folder and name it
schema.json
.
Pro Tip – Use the generator at jsonschema.net!
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 the JSON Schema for the specified ID.