I ignored the internet and built a custom C.M.S.

Friday, July 31th 2020

If you ask anyone: “Should I build my own CMS?”, they will answer “NO”. And they are absolutely right! The answer should be always NO. However, I decided to ignore the wisdom of the internet (and my own good judgment) and started to write one for my personal website.

Internet Treason

Nowadays, the implementation of a CMS (Content Management System) is essential even for small projects, being them for the web or not. However, to write your own can prove to be a herculean task. It takes a lot of planning, effort and investment to develop a proper CMS. Initial development and deployment aside, a decent custom C.M.S. requires constant development in order to keep up with system compatibility, to add new features, implement third part APIs and apply security patches, thus, making the final cost not viable in the case of most projects.

Instead, there are plenty of alternatives out there (free and paid ones) to solve most of the ‘usual’ necessities: e-commerces, blogs, news agencies, etc… It is preferable to spend some time trying out and researching about an open source CMS, customizing it and exploring its plug-ins; the end result is better security and a stable environment. Also, it can reduce the initial adaptation time for new users and maintainers who have already worked with that software before or are familiar with it.

There are several articles online to enforce this conclusion (a quick DuckDuckGo search proves my point), like this one by Sean C. Davis where he tell us how after five years invested in the development and maintenance of his Sapwood project he ended up abandoning it. However, Davis’s advice isn’t only to avoid writing your own and go for the big open-sourced projects, he also acknowledges that in some cases a custom CMS may make sense, either because it’s a very specialized or because it’s simply a learning opportunity and fun for the developer.

My Case

When I started this website project, I decided that I wanted to develop a simple and lightweight markdown based website using Node.js and tools native to linux systems, like Git and SystemD. That lead me to create the Aedifico framework, my own blog/website engine written in JavaScript, a language not loved by everyone (with reason) but if HTML and CSS are the H and O of Internet’s base elements, JS is the C that brings everything to life.

JavaScript

The engine itself isn’t complicate: Node’s Express and Markdown modules make it very easy to serve static pages and Git is the simplest tool you can find to add a version control system. I could very easily ssh into my server, write pages/posts using VIm and this very website wouldn’t be any different from what it is. But as much as I love my terminal, I like nice and shiny graphical applications and the option to manage the content from my website from everywhere. So, Sprintplank was born, my own CMS! It’s development took me (at least) six times longer than the website engine and it was like…

Internal dialog:
  • “If the CMS is accessible online, I need a Log-In system”, so, lets spend a long time researching the best security practices.
  • “The CMS should integrate with Git”, ok, I need to read NodeGit’s lack of documentation.
  • “The CMS should preview the website and only publish when ready”, then, lets create a git repo with two different branches.
  • “These services should’ve been native”, hum… systemd it is!
  • “But how to set up all this mess?”, Fine! Let’s create an installer written in python.
  • “And how about an update system?” … 😭 😭 😭

I’m not even counting the time it took for solving bugs created by any new idea I had for the project… the self-update one delayed this very post by four months!

Then, why bother?

Well, my project was specialized enough that the use of any other tool would mean to significantly modify it, besides, I’ve learned A LOT during the whole process, and that was the main point of rewriting this website (otherwise I’d have used any payed service that my only labor would be to insert the site’s content, like squarespace, wix, wordpress, etc). And for sure solving all those puzzles was FUN!

Fun

Is Aedifico the most advanced web framework out there? Not by a long shot… but I’m proud of what it can do and how stable (knock on wood) it is now. This learning process helped me to improve my git workflow, software design, general problem solving and coding skills. The cost of what I’ve invested is neglectable in comparison with how much I’ve gained with it and how it fits in my portfolio.

As I stated in the beginning, to build your own CMS usually is not the answer, but you can learn and improve yourself a great deal by doing it.