Introduction to Strapi

What is Strapi? Strapi is a headless CMS for developing websites, mobile apps, eCommerce sites, and APIs without knowing any backend or database.

Digital Delivery
-
6 min
Digital Delivery
/
Introduction to Strapi

Strapi is a headless content management system, it’s a piece of software used in web development that enables users to generate, update, and publish information.

When we read this definition the first thing that comes to our mind is the famous WordPress, the drag, and drop, one of the fastest framework to build a website, but here we have a different case, it’s the term “headless”. 

Meaning, we have a CMS without the frontend (the head), we have only an API that provides content and it doesn’t care about displaying it, and that’s why the name is a play on the name Bootstrap API.

Here is a figure that illustrates the difference:

traditional cms
strapi cms

Deep dive into Strapi Headless CMS

In order to make content accessible via a RESTful API or GraphQL API, a headless CMS is a backend-only content management system (CMS) that was created for that reason.

The idea of cutting the "head" (the frontend) of the "body" (the backend) is where the name "headless" originates. A headless CMS doesn't care how or where your data is displayed, its sole objective is to enable accessing data with an API.

Use cases of a headless CMS

  • If we want to separate the backend technology from the frontend technologies.
  • Native Mobile Apps
  • Adding an endpoint to expose data rapidly for an existing website.
  • If we want to manage content for an intranet of our company.

The story behind Strapi CMS

Strapi was made by students, one of them the CEO Pierre Burgy, they wanted only to make some money for their studies, but one day the traditional CMS wasn’t compatible with their needs.

They wanted to build a mobile application with modern frameworks, so they decided to create an API framework, and the product that came out was Strapi.

Until 2020 Strapi wasn’t profitable, in that year the decision was to lunch an Enterprise Edition that had additional features.

The advantages of Strapi

A headless CMS eradicates the difficulty of starting and developing new projects quickly, for some types of websites the front-end developers have no more need for coding the backend project, getting the front project done is enough.

Here we will go through some of the main benefits and justifications for utilizing Strapi:

Database

Strapi may be used with several database architectures. With PostgreSQL, MySQL, MongoDB, and SQLite, it is possible to set it up and configure it to function.

Open-source

Strapi was created using open-source code and is based on Koa, a Node.js framework. This source code is easily accessible and extensible.

Customizable

Strapi may be easily customized to meet the unique needs of each project. Through the admin panel, each data type is built from the ground up.

Furthermore, the Strapi plugin system makes it simple to add other features.

RESTful

Strapi offers a REST API that can be consumed from different types of client web and mobile frameworks such as VueJS or Angular.

Users and permissions

Strapi can also manage authorization, we can give a user access on some endpoints and not others.

It’s a framework that was prepared to cover all cases, not only that but we can also make use of OAuth to be capable to authenticate from a third party tool like Google or Github.

Scalability

To scale Strapi is not a big deal, making use of Docker, Kubernetes, and a cloud provider, it’s really easy to scale our Headless CMS, and with that it can handle important traffic.

The drawbacks of Strapi

Strapi of course is not a perfect framework, it has also some cons, and here is a brief list of them:

  • Migrating an existing API is a big deal because you should do it all from the beginning. For that it’s really rare to migrate, all people use Strapi only for projects from scratch.
  • Strapi has an Enterprise Edition, so it’s not completely free.
  • Strapi has an important frequency of updates, so in order to not break the system we should keep an eye on all the updates and try to integrate them carefully.

Strapi Competitors

Hapi

Walmart created Hapi, which they continue to utilize. Being supported by such a large corporation ensures that it will not quickly lose support and, more significantly, that it is being created by experts so that you will always be able to obtain help for it. For Hapi, the configuration is more significant than coding; this is particularly helpful for extremely big teams.

Netlify CMS

Because Netlify CMS interacts with so many static site generators, we have the benefit of being able to develop projects that are quick, adaptable, and secure. Working with Netlify CMS has the primary benefit of storing all content and source code in the Git repository. It has also easy to use, we have a real-time preview, drag-and-drop media uploads, and rich text editing.

Prismic CMS

Prismic provides us with a very user-friendly way of processing, managing, and publishing online content. In addition, the CMS provides us with a great deal of technical flexibility, because it is well-suited to headless configurations.

Starting a Strapi project

Before the setup of our project, we should ensure that we have the Node.js and NPM installed in our machine, and we should be careful with the versions Node.js ≥10.x and NPM ≥6.x.

To create our project we need to start with the following command:


npx create-strapi-app@latest adservio-project

starting a strapi project

After the creation of the project, we can run it with the following command:

yarn start

how to start a strapi project

The terminal will redirect us to the following link: http://localhost:1337/admin/auth/register-admin

strapi cms

After filling in the fields we can click on “Let’s start”:

starting a strapi cms project

In conclusion

The simple setup process of Strapi and their clear guidelines, followed with the great integration possibility's, turns Strapi into a great tool for those who plan to build modern and quick APIs with the ability to update in real-time.

Remember that Strapi, with all of its fantastic features, is open source and free to use.

Published on
November 2, 2022

Industry insights you won’t delete. Delivered to your inbox weekly.

Other posts