Statamic: first impressions
Somewhere around 2003, I had to create a custom management system (CMS) for a project. Since then, the admin has significantly evolved with the needs of the projects and overall UI improvements. It has served me and the projects well. However, only maintaining it, would take more than one full time job. Therefore, the decision was made to try out another CMS. I re-created this website and another more complex website with Statamic. Since Statamic uses Tailwind CSS for their front-end (like Laravel), it was a good opportunity to replace Bootstrap and most of my custom Sass with it. While I was at it, I also ditched jQuery as it could be replaced with plain Vanilla JavaScript. I will perhaps cover Tailwind in another post. This is about my first impressions with Statamic.
What is Statamic?
Statamic is a CMS that out of the box does not work with a database. In stead all the data is written into YAML and markdown files. This way, it can be a part of your versioning code and you don't need to install/maintain a database. Other reasons why I choose Statamic for in stance over Craft is that it can be installed as a Laravel package. (Craft CMS needs to be installed with the Yii framework). And although I have had plenty of WordPress and Drupal experience, I did not consider them as viable options. Statamic is not really free but neither was maintaining my custom admin system.
What went well?
I installed version 3.3.3 as a package on an existing project without any issues. The UI is modern looking and intuitive and there are plenty of things to like such as the preview capability, filters, customizable lists (also by user), blueprints, the bard text editor, form builder, implementing search capability, assets with focal points... Adding the collections, creating the blueprints, fields, entries and a form was all pretty straight forward. Even adding a custom widget to the dashboard was a piece of cake.
I installed four Statamic "addons" as composer packages:
Seotamic to add some basic SEO functionality,
Captcha to protect the contact form from spam bots. (more effective than honeypot)
Bard Text Align is, as you could have guessed, to align text in the bard text editor
"data import" package to import all the data from my old MySQL database into the new system as markdown files. Note that the data import addon can only import CSV files into a collection without support for table relations. For my one-to many and many-to-many relationships, I created some custom commands.
The integration with Glide, that enables you to create image manipulations on the fly is also nice. The downside, of course, is the performance costs that adds up when you have a lot of images. Thankfully, it's really easy to enable the built-in static full cache to make everything blazingly fast. Awesome!
What could be improved?
Most of the functionality of the control panel is very intuitive and pleasant to work with and you can easily extend it to create your custom solution. Some of the functionality that I missed: disabling "create entry" buttons on a collection and how to create custom columns with rendered HTML f.i. for badges with color labels based on a value.
Working on the "front-end" with their templating engine 'Antlers' was not that great for me. Their is no IDE support (yet) and a lot of times, I found myself trying things out and not getting any wiser. The Laravel Debugbar (that I use on every project) is not showing any queries so it's not that usefull for me.
What also complicated things was that it's not always easy to find all the information as their official documentation sometimes skips over a lot of details and I feel that the online community is not (yet?) that big.
Something that would definitely annoy my clients is how small the (full sized!) images of the entries in the collection list gets squished into a height of 32px. That is way too too small for most of my clients. I managed to overwrite the CSS to render a bigger thumbnails but a better solution would be to render a thumbnail (with glide?) and on hover show the bigger image. Perhaps an idea for an addOn?
Future Plans
Overall, I'm impressed with the control panel and I will probably use Statamic on (smaller) projects going forward. Not needing to have a database is very nice but for bigger projects, I am sticking to a solution with a database and a headless CMS = an admin/control panel to manipulate the data in your database but you have the write the whole front-end yourself.