A tree icon similar to the Forestry.io icon turning into a Mattrbld iconA tree icon similar to the Forestry.io icon turning into a Mattrbld icon

use case

Forestry.io Alternative

Illustrated drawing of Amadeus Maxmimilian StadlerIllustrated drawing of Amadeus Maxmimilian Stadler

Amadeus Stadler

April 21, 2023, last updated April 21, 2023

Today, the popular static site CMS Forestry.io shuts down for good. It’s superseded by Tina CMS by the same developers, but that project doesn’t cover all features Forestry had (yet) and seems to be geared more towards sites built with React. So, understandably, some users might be looking for an alternative.

Perhaps Mattrbld can be just that!

A Bit of History

Mattrbld was directly inspired by Git-based headless CMS like Forestry and NetlifyCMS. In fact, Forestry was the first CMS of this kind I encountered, and I immediately fell in love with the concept: a simple UI to edit files and make commits that even non-technical users could use.

However, all of these tools had something in common: they required that a third party had access to the Git repository and traffic was routed through their servers as they interfaced with the various APIs of Git providers such as GitHub and GitLab. This also meant that if the tool didn’t support the provider of your choosing, you were out of luck.

On top of that, these tools, and Forestry especially, felt unfinished. They had their own set ways of doing things and plenty of seemingly half-baked features, from wonky previews to missing support for internationalisation. As much as I loved them, I also quickly grew frustrated with them.

Which is why I created Mattrbld as an alternative.

What Sets Mattrbld Apart

Contrary to Forestry, Mattrbld doesn’t run on a server. It runs directly on your device. The only server-side component is a proxy to circumvent CORS restrictions, which you can (and should) host yourself. This means Mattrbld can even work offline!

On top of that, Mattrbld also doesn't rely on third part APIs to function. It simply uses Git, like you would on your development machine. Yes, that means that Mattrbld is able to use Git right in the browser.

Mattrbld was built with flexibility and multi-language content in mind. It has some robust internationalisation features built in, but should be flexible enough for you to add your own. The same goes for real-time content previews: they require a little more development than in Forestry, but once implemented, they are a lot more reliable.

Limitations

Of course, nothing is perfect, and neither is Mattrbld. The project is still young (although it has been used in production for over a year now!) and thus might still have the occasional bug or missing feature. There’s a more comprehensive list of limitations in the official documentation, but if you’re migrating from Forestry.io, the biggest drawback you may notice is the lack of GitLFS and external image providers.

Due to the lack of a server-side component, user management is also off-loaded to your Git provider. You can set up different roles with different permissions in a Mattrbld project, but those roles are more cosmetic than functional. Your collaborators will need their own accounts at your Git provider, so if they were savvy enough to circumvent Mattrbld’s role restrictions, they’d probably simply do whatever they wanted to do directly via Git from their devices.

Last, but not least, Mattrbld works differently than Forestry did. It puts more control into the hands of the user, making them decide what to sync when—but that also means that they have to actively sync their changes! Nonetheless, once the initial migration is completed, it should only be a matter of getting used to the subtle differences between the two platforms.

Migrating from Forestry.io

Just like in Forestry, content in Mattrbld is organised into Collections and structured according to Schemas (called “Front Matter Templates” in Forestry). There’s a media library for your media files, which supports folders and centralised meta-information.

If you’re migrating off of Forestry, you likely already have a structure for your content in place. You can use it as a base when configuring Mattrbld. There’s no way to import your Forestry Schemas directly, but Mattrbld can generate Schemas based on existing content.

Like Forestry, Mattrbld is also self-contained in the sense that it stores all its configuration data in a folder called .mattrbld in your Git repository. This means you can try out Mattrbld for yourself and if you decide that it’s not the right fit for you, you can simply delete that folder from your repo and move on to the next solution.

While Mattrbld works similarly to Forestry, it is not a drop-in replacement. Migration should be relatively simple, however some work is required, and it should be done by a developer familiar with Git and the codebase of the website that is being migrated.

If you’d like to give Mattrbld a try, here’s what you need to do:

  1. Generate an Access Token for your Git Provider (here are instructions for GitLab and GitHub) so you can safely log into your Git account using Mattrbld

  2. While you’re there, grab a copy of the https clone link of the repository of your website

  3. Open app.mattrbld.com or click the “Get started” button in the top right

  4. Paste that link into the “Repository URL” field in the Mattrbld onboarding screen, authenticate using your Access Token if prompted and then select the branch you’d like to import

  5. The next screens in the onboarding process will allow you to set up your (local) Mattrbld user account while the website is being cloned in the background

  6. Once the import is completed, you’ll be dropped into the “Project Settings” screen, where you can configure your project

  7. The tabs at the top are arranged in a way that working through them from left to right should give you a good guide of what to do when

  8. Start by creating Schemas for all the content types you had on your Forestry website, you can use your old Forestry schemas as a reference, or simply generate the Mattrbld schemas based on existing content items

  9. Next, create Collections for your content types. Each Collection has a content folder where the content items for that Collection live, and one or more Schemas that can be assigned to the individual content items in that Collection. Here you will also set what type of file lives in the Collection

Currently, only Markdown and JSON files are supported!

  1. Collections also allow you to define what content items should be linkable and how the links to them should be generated

  2. If you had “include template” elements defined in your Forestry schemas, you can use custom fields in Mattrbld to achieve a similar result

  3. If you have media files in your repository, you might also want to configure the Media Library to point to your upload directory

  4. Last, but not least you can add your defined Collections, as well as individual content items to the sidebar of your project in the “Sidebar” tab

And that’s it! You should now be able to go into one of your Collections and open a content item to edit it. Every change you make will be saved locally on your device until you go back to the Dashboard and sync those changes back to your Git repository.

You can quickly go to the Dashboard of a project by clicking the project thumbnail at the top. And if you’d just like to quickly sync your changes, you can also click on the orange “changes” pill right below the thumbnail.

Syncing changes works like staging, committing and pushing changes in Git, just using a more user-friendly terminology. You can even inspect and discard changes from the synchronisation modal!

This barely scratches the surface of what is possible with Mattrbld, but it should give you a solid starting point to build on top. You could even go the extra mile and implement real-time previews for your users, although this will take a bit more work than flicking a switch.

Closing Thoughts

It is always sad to see a project go, especially if it leaves some users stranded and scrambling for an alternative. Forestry was a major inspiration for Mattrbld and my personal gateway to the wonderful world of headless content management systems.

Hopefully, Mattrbld can be a viable alternative to some of you out there. Switching to a new tool is never an easy decision—and Mattrbld will not be the right fit for every project, but it might be for yours.

So why not give it a try today?