In this tutorial, we will be looking at what Strapi is, how to install Strapi, and a few global key features in Strapi. I will also talk about the importance of these features with a brief explanation of the features and installation process.
Strapi is an open-source headless CMS for creating quick and readily-manageable APIs. It allows developers to create flexible API structures with a beautiful user interface easily.
Strapi can be used with various databases, including PostgreSQL and many others. Strapi enables users to consume APIs from a content type via Get, Post, Delete, and Put requests, mostly performed manually.
To install Strapi successfully, a few basic things must be implemented.
Strapi does not support Node 15. Only LTS versions are supported (v14 and v16). Other versions of Node.js may not be compatible with the latest release of Strapi.
We will use Node 14, so after downloading Node 14 (LTS) from the Node official site during your installation, make sure you are connected to the internet during the installation so it can download all the other attachments needed.
Strapi is an open-source, Node. JS-based, headless CMS that saves the user a variety of time-consuming tasks at the same time as giving them the liberty to apply their preferred equipment and frameworks.
Once you have the above software installed, enter the on your Terminal the following commands:
yarn command
yarn create strapi-app my-project --quickstart
Or
npx command
npx create-strapi-app@latest my-project --quickstart
#For Node.js, you type:
node -v
#For the NPM version, type:
npm -v
npx create-strapi-app@latest my-strapiproject1
Running the above command will prompt you to choose your installation type.
On your terminal, navigate to the folder where Strapi is installed and run the command below to start the Strapi application.
npm run develop
The above command will open the registration page for the application. Once you've registered successfully, you'll be redirected to your dashboard page to manage your application.
1.Better Rendering You can now produce pages at deployment time and serve them over a CDN. With Strapi and a site generator, only the most applicable zone of the mound is running when a user makes a request, speeding the entire operation by degrading the series of ways.
2.Advanced Security You do not have to worry about vulnerability or insecurities while utilizing Strapi with your static websites. You do not have any reason or need for a server-side language to be executed, thereby reducing your attack surface area and the threat of malware code injection.
3.Establishment Features Strapi Enterprise Edition includes developed Role-Based Access Control( RBAC), Single Sign On( SSO), and establishment Support.
4.Scaling Traffic Over Cost Because your files are loaded through the CDN, the CDN effortlessly compensates for improved traffic when your app gets further queries.
The three roles in Strapi Community Edition are:
You may configure all of your users in the permissions settings' user section, where you can find them all. You will have access to a created URL link upon user creation that you can provide to your new user to complete their registration.
More Custom Roles are available in the Enterprise Edition: unlimited custom roles in the Bronze, Silver, and Gold plans. The Bronze is available for free to students, open-source, and non-profits.
Teams may design reusable content models with the least number of changes feasible with Dynamic Zones.
Dynamic zones are areas of your application where you let content editors dynamically choose what component to include. So, when you design the application, you define which components can be included in a dynamic zone when creating each content instance( e.g. the homepage). Editors then decide which component to select for that zone. A dynamic zone includes one or more components.
Providers extend the plugin's essential capabilities, such as uploading media files to Rackspace instead of the local server or using Amazon SES for emails instead of Sendmail. Certain plugins can be enhanced by installing and configuring additional providers.
You can find a list of Providers available in the Strapi Marketplace.
The following format can install new providers with npm or yarn @strapi/provider-
1 # Install the AWS S3 provider for the Upload plugin
2 npm install @strapi/provider-upload-aws-s3 --save
3 # Install the Sendgrid provider for the Email plugin
4 npm install @strapi/provider-email-sendgrid --save
In the. /config/plugins.js
file, newly installed providers, are enabled and configured. If this file does not already exist, it must be created. Each provider will have a unique set of configuration options. To learn more, go to the corresponding entry for that provider in the Marketplace or npm (opens a new window). The example below shows the configurations for the Upload plugins.
1 // path: ./config/plugins.js
2 module.exports = ({ env }) => ({
3 // ...
4 upload: {
5 config: {
6 provider: 'aws-s3', // For community providers, pass the full package name (e.g. provider: 'strapi-provider-upload-google-cloud-storage')
7 providerOptions: {
8 accessKeyId: env('AWS_ACCESS_KEY_ID'),
9 secretAccessKey: env('AWS_ACCESS_SECRET'),
10 region: env('AWS_REGION'),
11 params: {
12 Bucket: env('AWS_BUCKET'),
13 },
14 },
15 },
16 },
17 // ...
18 });
Please, click here for the configuration of the email plugins and how to create providers after installation. Strapi's default security middleware includes a very stringent content security policy that limits loading images and media to "self" only. For more information, see the example setup on the provider page or the middleware documentation.
This Draft and Publish feature allows you to leave your content as a draft and publish it later using the draft and publish tool. The draft and publish feature is turned on for all newly generated collections and single types. However, the feature can be turned off at the content-type level (i.e. it can be enabled for one content-type but disabled for another).
To use the Draft and Publish feature in Strapi, you need to have your content-type already created. You can create a collection type using the collection type builder plugin.
Once you are done with that, navigate through Content Manager > Select Collection Type from the sidebar and click on Create a New Entry.
Fill in the input you want to display and click on the Save button. Now we are done with the draft, the next step is to publish your article. Click on the publish button beside the save button. That is how to use the Draft and Publish feature in Strapi.
Note: Some roles and permissions may be necessary for publishing content. For instance, the default roles in the community version only permit authors to generate and edit drafts, whereas editors are allowed to publish content.
Published content may be taken down and reverted to draft status. Click on the Unpublish button in the content editor's top right corner to remove content from publication.
As a Strapi user, you can develop, manage, and distribute localized content in several languages, or "locales," using the Internationalization (i18n) plugin. Refer to the W3C definition for more details on internationalization.
The i18n plugin allows admin panel users to generate several localized versions of their content (see user guide). It also permits developers to create localized projects by collecting and consuming the appropriate content based on the user's country/language.
All Strapi applications running version 3.6.0 or higher include the Internationalization plugin by default. Lower versions require a migration (see Update Strapi version) as well as manual installation of the plugin.
The plugin can be installed using the Terminal by running one of the following commands:
1npm run strapi install i18n
The i18n plugin is beneficial in so many ways. Let’s discuss some of the features of the i18n plugin.
Smooth Editing: With a single click, you can copy and paste text from one locale to another, keeping some content consistent across all locales.
To add “Spanish” to our language locales:
Understanding the Strapi features play an important role in content management. After going through this article, I hope you understand how to install Strapi, the version of node.js that works with Strapi, some key features to know about Strapi, and the main roles of the users in the Strapi community edition according to RBAC. You also learned the installation of the internationalization plugin and how to add a new language to our Locales. For more Strapi features and installation please visit the Strapi marketplace.
My name is Fagbuyiro David, a software developer and technical writer. i like sharing my experience as a developer with others.