Simply copy and paste the following command line in your terminal to create your first Strapi project.
npx create-strapi-app my-project
Content management system (CMS) platforms have been at the forefront of content creation for nearly two decades. However, a lot has changed since the release of WordPress in 2004. New technologies have been introduced and CMSs have evolved, decoupling where the content is managed from where it’s displayed.
Even though WordPress is still in high use, it has a lot of drawbacks. To achieve better performance, higher reliability, greater security, and the freedom of displaying your content wherever and however you want, you may need to move to a headless CMS.
To do that, you’ll need first to decide which type of headless CMS you want to use—Git-based or API-driven?
In this post I’ll compare both types of headless CMS platforms, focusing on the differences between them, the pros and cons, and the use cases, to help you make your decision.
To better understand different types of CMSs, you first have to know the technologies that power them.
Git-based CMSs are built upon the Git version control system (VCS).
Git stores your files and their history of changes in a repository. It allows you to branch out, merge, clone, react to changes, and in general easily manage your content—especially the text element.
In a Git-based CMS, you manage your content through mentioned Git functionalities or the Git-powered editor right in your CMS. Then, on selected changes, the CMS processes the new or updated content and automatically builds and updates your frontend (website or app, for instance). That’s usually done through integration with large Git providers like GitHub or GitLab.
API-first CMSs work as unified pieces of software, serving content through an Application Programming Interface (API).
Developers can use the API (usually REST or GraphQL) to build the required frontend or other types of integrations. Reactions to specific updates and other outputs from the CMS also need to be directly handled.
The content storage, editor, and general management are all handled by the CMS.
Each type of headless CMS offers benefits and drawbacks. Here are the pros and cons of a Git-based CMS. As you’ll see, its biggest strengths and weaknesses come from the Git VCS powering it.
The advantages and disadvantages of API-first CMSs vary greatly from the Git-based CMSs. Not only are they based on a different foundation, but as unified pieces of software, they can be different even from each other.
Because of this, some API-first CMS platforms might have pros and cons that others might not have. Still, some general points apply to most of them.
Each type of headless CMS presents opportunities and challenges to the developer. How can you make the most out of either a Git-based or API-first CMS, and what bottlenecks can you expect as you go?
The benefits of powering a CMS through Git cannot be understated.
From the start, you’ll be working with a system you’re probably very familiar with. From version control to its open-source nature and multiple integrations to content formatting flexibility, you’ve got everything you need to set up all kinds of great websites quickly.
However, with content format flexibility also comes more responsibilities, like handling SEO optimizations yourself. That’s something API-first CMSs will often do automatically.
As for scalability, when going with a Git-based CMS, consider the future of your product. Plan the correct content format ahead of time. Know what frontends you’ll need to handle, how large your data set will get, and whether you’ll host frequently updated content, among other issues. A Git-based CMS doesn’t scale well for certain medium and larger or multiple frontends, so keep this in mind.
Using an API-first CMS allows access to opportunities that aren’t possible with Git. It’s much more scalable, can drive multiple diverse frontends, and can even integrate with unique consumer devices like smart speakers. With API, you can do pretty much anything given enough time and the right tools.
Additionally, API-first CMSs are better suited for handling heavy static assets and frequent content updates. Even if that’s not something you need currently, it’s important to consider as your content grows.
A drawback to all those API benefits is the fact that it drives higher reliance on developers. Whether that’s a deal breaker or not depends on your situation and use case.
API-first CMSs offer a more closed, proprietary model than Git, and along with that come higher costs. However, the amount and quality of provided services might be worth it for your use case.
Speaking of use cases, what exact products and services can you develop with either headless CMS?
Static websites are among the most popular sites for coupling with headless CMSs. For all the blogs, landing pages, newsletter pages, documentation, and other elements, both Git-based and API-first CMSs will work well—particularly the Git-based ones, given their simplicity and fast setup.
The type of CMS recommended for e-commerce sites will vary depending on how often you need to update your content. For simple, infrequently updated, small- to medium-sized stores, a Git-based CMS will do just fine. If you’re looking at scalability and planning for future growth, though, you should consider investing in an API-first CMS.
For multi-platform products with multiple frontends, API-first CMS is definitely the way to go. It will require more developer involvement, but with good API, you’ll get access to a huge variety of platforms.
However, depending on the type of multi-platform support you’re after, Git-based CMS could still be an option. Custom Git integration can work if you want your content to be available not only on your website but also through RSS, in PDF formats, or cross-posted to other websites.
If in addition to targeting multiple platforms, you also have multiple content sources, API-first CMSs offer one more feature worth considering—content federation.
With the right API (usually offered in GraphQL), you can utilize content federation to pull your content for multiple sources and access it all through a unified API-first CMS. That’s a huge advantage for large publications and a huge relief for content management.
Depending on your needs, there’s a use for both Git-based and API-first CMSs. While Git is great for rapid setup, guaranteed versioning, and simplicity of use, API-first CMSs provide more features, are more scalable, and offer more flexibility for future planning.
Whichever you choose, headless CMSs can make a huge difference in content creation and management for your site. Consider your technical and business needs so you can choose the CMS with the features you most require.
Arek Nawo is a web developer, freelancer ,and creator of CodeWrite