Strapi Headless CMS: Top Pros and Cons

Nitalimittal
CitrusLeaf
Published in
4 min readOct 1, 2021

With the growing channels of content distribution, the need for Headless content management systems is more than ever before. While traditional CMS were good for managing content for one or two channels, like a website, they soon became a bottleneck for scaling content needs.

Your audience is now consuming content from more than one source. They are now looking for your brand in the form of a website, a mobile app, a YouTube channel etc. To gain more visibility you have two options: do manual work and post content for each platform separately, or use a CMS that exposes one API to be consumed by all of your platforms.

This is where headless CMS comes into picture. They allow you to easily manage content across the platforms by giving you one place to manage it. And one such CMS is Strapi.

Strapi gives you a lot of flexibility in terms of data modeling and APIs. It readily gives you standard CRUD APIs out of the box for any kind of data model. You can then consume those APIs wherever you want: Website, Mobile App and even on modern advertisement billboards. Basically, anything which is connected to the Internet can use Strapi’s APIs.

Let’s explore some of the advantages of using Strapi as your Headless CMS.

Advantages of Strapi Headless CMS:

  • Easy Data Modeling: Strapi gives you an amazing interface right out of the box to model your data. Which means that you don’t have to create database tables and write queries. Using Strapi’s admin UI, you can create any kind of relational data including One-to-Many and Many-to-Many relationships.
  • Authentication and Authorization: Strapi also gives you the ability to control who can consume your data using APIs. For example, you might want to hide some data points from public usage, and hence you can put those entities behind an authentication method. Strapi also gives you the ability to provide fine-grained access to fields inside an entity or data point. These are called Roles and Permissions in Strapi.
  • Internationalization: Many CMSs are still suffering from poor i18n support. Not with Strapi. With it’s latest release, Strapi now has gained the ability to provide translation to any data entity. This means that you can now serve content to a wider audience without much-ado.
  • REST and GraphQL APIs: Strapi gives you out-of-the box documented REST and GraphQL APIs. Just create your entities in the Strapi Admin and you can get the Swagger/GraphQL documentation for free! If you’re writing any custom end-points or making changes to existing ones, make sure to update the API documentation.
  • Easy customization: Strapi started as an MVC framework for NodeJS and it’s still the same internally. You can easily add more API end-points as per your requirements and write custom logic in models and controllers for it. You can customize existing end-points as well. You can also provide authentication and authorization for the custom endpoints. The Admin panel is also very customizable thanks to React.

Disadvantages of Strapi headless CMS:

  • Limited database migration/seed support: Any type of content type creation/updates are handled transparently by Strapi into the database. This means that you have to manually handle database migrations across multiple environments. For example, changing permissions for an entity in one environment are recorded transparently inside the database. There are no migration files generated. Hence, in your other environments, you’ll either have to write a custom migration solution or manually do those permission changes.
  • Limited TypeScript support: Strapi is completely written in JavaScript. If you want to use TypeScript, you’ll have to use an external package to convert existing models into TypeScript code. This is not an issue with smaller codebases, but if you’re planning to build large content systems using Strapi, you should consider using this package before starting the development.
  • Frequent updates: While this is a good thing for Strapi as an ecosystem, however, if you’re planning to use Strapi for large content repositories, you’ll find frequent updates a bit off-putting. Some of these updates introduce breaking changes which makes it hard for a production system to be upgraded easily without full end-to-end testing.

Do you need Strapi?

If you really want to scale your content and have multiple integration requirements, we’d say yes. Strapi gives you a very easy and automated way to create APIs. It also gets out the way if you want to do any kind of customization.

For example, if you want to fetch external data into your own Strapi app, you can do that. Want to send emails programmatically? Strapi has you covered. We recently created a whole Mobile CRM with complete accounting and backend/inventory needs using Strapi. Do read it’s case study here.

Not only from a development perspective, Strapi gives non-technical users a great experience in building data models easily with great flexibility. It also has amazing media handling capabilities. All in all, we believe that Strapi should be your first choice for making a content heavy website or a mobile application.

If you’re looking for someone well-versed in Strapi development, please reach out to us on hello@citrusleaf.in

This article first appeared on CitrusLeaf Blog.

--

--