More Infos
We use cookies on our website. Some are essential, while others help us improve the site and your experience.
To the Privacy Policy

Headless content management systems (CMS) are on everyone's lips

Strapi Headless CMS

A field report on the Strapi CMS

Content management systems (CMS) are on everyone's lips these days and it's hard to imagine the toolbox of a modern development stack without them. The headless approach in particular has established itself and gained acceptance in recent years. There are numerous providers of headless CMS solutions. Some prominent headless CMS systems are: Sanity, Strapi, Payload, Builder. In the following article we want to focus on Strapi and share our experiences with it.

Content management systems (CMS) are on everyone's lips these days and it's hard to imagine the toolbox of a modern development stack without them. The headless approach in particular has established itself and gained acceptance in recent years. If you are now asking yourself: “What exactly can I imagine under a headless CMS?“ - Then we recommend the following explanation video from Sanity, a provider of a headless CMS solution.

As you can imagine, there are numerous providers of headless CMS solutions. Some prominent headless CMS systems are:

  • sanity
  • Strapi
  • payload
  • Builders

In the following article we want to focus on Strapi and share our experiences with it.

Strapi - what is that?

Strapi is one of the leading open source headless CMS. Strapi can be used to develop mobile applications, eCommerce sites and APIs. Strapi consists of 100% JavaScript and is expandable and customizable at all levels. Strapi's entire code base is available on GitHub. With over 51k stars, Strapi is a big player on GitHub. Strapi is characterized above all by its high adaptability and expandability. All aspects of the Strapi CMS can be adapted and expanded by the developer. This includes:

  • Look & Feel of Admin UI
  • Functions of the API
  • Plugins used
  • hosting

Strapi further offers the developer several ways to obtain the content stored in the CMS. The CMS automatically creates APIs based on the content created. The data can be obtained either via RESTful API or GraphQL. And that from almost any client. The same applies to hosting. Since Strapi follows the “self-hosted“ approach, you can freely decide where and how Strapi should be hosted.

Some more facts about Strapi:

  • Strapi is free in the Community Plan.
  • Strapi is relatively easy to learn and projects can therefore be completed with a good time-to-market
  • Strapi can be combined with very different frontend technologies (React, Vue, Angular, Svelte, Flutter etc.)

Benefits of Strapi

As with any CMS, there are pros and cons. In the following section we want to go into more detail about the advantages of Strapi, which have been shown when using Strapi:

Easy entry

Thanks to the good “getting started“ documentation and the ready-made templates, local development can be started within a few minutes. The whole setup process of Strapi is pretty simple and clear. By means of the “

” the most important functions are briefly and clearly explained and used immediately. Everything is played through, from the creation of a first content type to calling the API.

User friendly and easy to use

Strapi has a user-friendly admin UI that is easy and intuitive to use. The admin UI is available “out of the box” and does not have to be created or configured first, but can be adapted to project-specific needs using plugins or configurations. Either you use the standard admin UI or you change the logo, the theme and the arrangement of the UI elements. Strapi makes it possible.

Strapi Admin UI

Strapi Admin UI

Content types can be created via admin UI or via code

New content types can be created conveniently via the admin UI or directly via code (JSON file). If you create a new content type via the admin UI, the JSON file is generated immediately, which can then be further adjusted. However, the process also works in the other direction. However, based on our experience, it is advisable to create content types via the admin UI. This has the advantage that you don't have to memorize the Strapi-specific properties and property values that are used within the JSON files.

Content Type APIs

As soon as a new content type is recorded with Strapi, the corresponding APIs for this content type are also automatically created. This is all done automatically without having to write 1 line of code. All common HTTP verbs such as GET, POST, PUT, DELETE and OPTIONS are supported. After creating a content type, you can immediately interact with this type via API, obtain, adjust or delete entries. And it gets even better: The default API endpoints form a solid basis for further development steps, but additional and specific requirements often arise. This means that the default API endpoints are no longer sufficient. Strapi offers various options for this case:

  • Endpoints can be overridden with a completely custom implementation - the default implementation is lost.
  • Endpoints can be overridden with a completely custom implementation - however, the custom implementation uses the default implementation as a base, so the entire endpoint does not have to be freshly implemented.

All of the above customizations can be made at the HTTP Verb level. This means that z. For example, the default implementation is used for all HTTP verbs except for GET. However, GET requires individual logic and we equip Strapi with a custom implementation.

Custom implementation of GET with core functionality of Strapi (example)

Custom implementation of GET with core functionality of Strapi (example)

Integrated Authentication & Authorization System

A common requirement for an app, website or web portal is the login & logout mechanism paired with the definition of user rights. In order to be able to map all these functions, a custom backend has often been used up to now. However, Strapi is able to map all these functions. Strapi offers a flexible Authentication & Authorization System, which can be specifically adapted to the needs of your project. It is Z. For example, it is possible to define different users and user groups, which then have different authorizations within Strapi. However, the solutions are not limited to the admin UI - Strapi offers the integration of various authentication flow systems. So e.g. With Strapi, for example, an authentication flow can be easily defined using JWT (Json Web Tokens) and refresh tokens from Strapi to your individual client.

Self hosted and multiple supported databases

Since Strapi follows the “self-hosted“; approach, you can freely decide where and how Strapi should be hosted. Whether in a Docker container on your own server or on a managed hosting platform such as B. Heroku - Strapi also adapts to your needs in this respect.

The same applies to the database in which Strapi stores all necessary information and your content. You can choose from a list and swap out the database without much hassle. Supported are, for example, SQLite, MySQL, Postgres and MariaDB.

Large selection of plugins

Strapi has a large community e.g. B. on GitHub or on their own Discord. These platforms can be used for questions or the exchange of know-how and you get quick feedback. In addition, Strapi is based on a plugin system. There are many very useful plugins which can be integrated more or less quickly into an existing application. A common feature is the support of multiple languages in one CMS. There is also a plugin for this, which can be easily installed and you can start translating. Other helpful plugins:

  • Google Analytics integration
  • Swagger integration

Disadvantages of Strapi

In addition to the many advantages of Strapi, there are also some points with which we have had bad experiences. We do not want to withhold these points from you:

Limited support for TypeScript

Strapi doesn't support TypeScript out of the box, which is pretty uncool. However, it is possible to configure and also use TypeScript in Strapi. In addition, Strapi already offers some types for TypeScript. However, there are still a long way from the corresponding TypeScript types for all functions and types. During development this is often disruptive as you have to rely fully on the documentation and cannot enjoy any type support within the IDE. Developers who almost exclusively use TypeScript feel a bit helpless in the first few moments with Strapi. However, according to the community manager and roadmap, full TypeScript support is being worked on.

Strapi is not completely open source and free

Strapi is free and open source in the “Community Plan”. With the “Community Plan“ you quickly reach your limits, especially with larger applications, and you have to carry out a paid upgrade. The “Pro“ versions of Strapi are no longer free and offer additional features that are not open source.

Regular updates & outdated documentation

Strapi is constantly improving and bringing new features or improvements to the market. On the one hand this is cool, on the other hand it often leads to confusion and bugs. During our test project with Strapi, which was in development for about 1 month, there were several version updates. Unfortunately, 2 of the updates to the latest version had to be reversed, as some functions no longer worked or worked differently than described in the documentation.

deployment

With Strapi it is possible to host the application with different hosting providers using different methods. On the one hand, this flexibility is very helpful and useful, since the hosting solution can be flexibly adapted depending on the project and requirements. Strapi also offers corresponding guides for the various hosting providers on how to successfully deploy Strapi.

During our test project, we tested and tried several of these deployment guides. Unfortunately, during this process we had to realize that the guides are complex and rather difficult to understand. In addition, at our time, the guides were partly outdated or outdated. not up to date. This was annoying and time consuming as we had to try several hosting guides before we found a working solution.

Summary of our experiences with Strapi

Overall, Strapi offers a lot of useful features that you won't find in other headless CMS. From our point of view, the automatically created APIs for the content types, which can be adapted very flexibly, as well as the countless plugins, are the highlights of Strapi. Thanks to the open source idea and the very large community, new features can be implemented and added quickly. With Strapi you keep your finger on the pulse, also in the years to come. If, in addition to the highlights, the developer experience (TypeScript support, always up-to-date documentation, no breaking releases, simple deployments) can be increased with the next releases, Strapi will become an indispensable CMS partner for the future.