Spontaneous is an open-source content management framework written in Ruby that has two main goals:
Online content management is not a solved problem. The web is evolving. Websites have to do more than ever before and technology is constantly improving yet the basic assumptions & design of current CMS systems haven’t changed.
Spontaneous takes a radically different approach.
Its sophisticated code-driven metadata system straddles the line between a web application framework and a more traditional content management system. It allows developers to model complex relational data yet provides editors with a consistent and intuitive user interface.
The following is a quick tour of the features that make Spontaneous the best CMS in the world.
Spontaneous is highly structured. You build a site by writing Ruby classes that define content types and the relations between them much like you would between tables in a database.
In Spontaneous this collection of Ruby classes is called the ‘schema’. It is what makes the system as a whole so powerful and flexible.
Instead of relying on a WYSIWYG editor and placing the burden of layout on the content editor, Spontaneous instead has a content model based on multiple lists of simple content “pieces”.
Defined within the schema, each site can have as many content types as necessary and each can have as many ‘fields’ as needed. These fields are laid out within templates coded by the developer.
By adding a piece of content and filling in its fields with text and images, editors are adding a beautifully and consistently styled element to their web-page without having to even think about layout.
Spontaneous uses feature detection to ensure that only the most capable browsers are able to access the editing interface. This means that it is free to lay on a rich layer of cutting-edge HTML5 features to make the editing experience as pleasant as possible:
If When you lose internet connectivity or your browser crashes half-way uploading a 700Mb video over your rural ADSL connection* Spontaneous will re-use nearly all the data you uploaded the next time you try.
* A real situation.
HTML is no longer enough.
Each page type in the Spontaneous schema can declare multiple outputs. Starting with a default HTML view you can add any number & mix of alternate HTML, XML based syndication feeds, JSON and plain text versions. This means your content is available in the browser but also in that native mobile application you want to provide. In future the aim is to extend this system to support more complex formats such as PDF, MOBI and EPUB (to name but a few).
You can also define your own outputs such as one that inserts rows in a database, or communicates with an external service so they can also form a part of integrating Spontaneous into a larger system.
Built in to the CMS and configured within the content schema is a powerful search system based upon Xapian.
Each Spontaneous site can have multiple search indexes encompassing a subset of content types.
Need to reference one bit of content from another? Want to include a list of features or favorites on your homepage? Easy.
Spontaneous’s alias system lets you create links to any bit of content on your site. Define your alias type in the schema (in Ruby as usual) and editors are presented with a dialogue that lets them pick the item they want to link to. The alias then has access to all their targets fields and templates as well has being able to have their own.
These aliases are like symbolic links in UNIX speak and are one of the most powerful aspects of Spontaneous’s type system. Although Spontaneous has no concept of a "media library" where commonly used images or files are kept, you can easily create an equivalent system using aliases. In fact you can create multiple simultaneous libraries, each with its own content logic.
Example uses (taken from actual projects) include:
members = category.aliases.map(&:page). Like every other page these category pages are generated as part of the publishing step and will be served lighting fast to your site visitors. Example
Spontaneous is as much a framework as a CMS. It’s schema system, backed by a solid relational database, is as much like coding an app as a content hierarchy.
Each content model can also provide its own set of controllers if you want to provide some dynamic functionality to a page. For example if you wanted to allow users to posts comments on each blog page you could add a comments controller:
If the page at
/blog/my-first-post is a
BlogPost page then GET-ing the URL
/blog/my-first-post/@comments will return the list of comments and POST-ing to
/blog/my-first-post/@comments/like/23 will like post with ID 23.
The current version of Spontaneous comes from a solid pedigree of earlier closed-source systems that have been in active use since 2006. Although the entire system has been re-written from scratch (the first versions were based on Rails 1.1.6…) the fundamental concept (pages, pieces, boxes & fields) hasn’t altered, simply because it was so successful.
The original brief was for a CMS that would enable beautiful design, rather than hinder it, whilst removing any technical/design burden from the site editors.
Some other features include:
This is just the start. The system is in active development with a plan for exciting features that’s already a mile long. However the aim is not for a constantly moving set of features but instead concentrate on honing and refining the core with an eye to making the developer’s life simpler and the system more robust. The goal is for extensions and customisations to be made available through external plugins interfacing with a clear and well-documented API.
Spontaneous currently powers the following websites:
If you use Spontaneous to make your site, let us know...
If you’d like to give it a spin then do the following:
Unfortunately the documentation ends there currently.
If you’d like to contribute to Spontaneous’s development then head over to the Github page. Spontaneous is currently the work of a single developer. Any help greatly appreciated.