After exploring some static site recipes in my staticRack project, I wanted to explore the world of simple, static Content Management Systems. There is a PHP implementation of that sort of idea in Pulse CMS, and Ruby has something a bit different called Nesta. The latter, in particular, is a great solution if you love managing static sites with a desktop text editor and want a simple way to customize or build completely new designs. I decided to explore a custom CMS based on Sinatra to learn building apps with Rack and Sinatra.
I worked out some initial functionality and pushed it here. I’m calling it Cozy, and hopefully it evolves into a good way to make basic prototypes, to have database-less dynamic web apps, or to manage static websites. For now, Cozy can create, read, update, and delete “nodes,” which can be any kind of file. There is also some authentication to protect the create, update, and delete actions. The code is a little brittle right now, but you get the idea.
While the true capabilities and drawbacks are not clear yet, this idea of a static REST backend is turning out to be a great educational project. If anything, it can help inform a future attempt to create a light framework. In the meantime, I’m absolutely loving Sinatra’s simplicity and will have some followups exploring the specifics of Cozy.