Global Summary of Some Strapi Key Features
Tags: strapi, javascript, headlesscms
Published: 2022-10-10 08:29:23

Author: David Fagbuyiro


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.

## An Overview of Strapi
Strapi is an [open-source headless CMS](https://strapi.io/) for creating quick and readily-manageable APIs. It allows developers to easily create flexible API structures with a beautiful user interface. 

Strapi can be used with a variety of 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.


## Installing Strapi
To install Strapi successfully, a few basic things must be put in place.

- 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](https://nodejs.org/en/blog/release/v14.17.3/) during your installation, make sure you are connected to the internet during the installation so it can download all the other attachments needed.


## What is Strapi?

[Strapi is an open-source, Node. JS-based, headless CMS](https://strapi.io/) 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.

## How to Install Strapi

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```

### Steps to Follow After the Installation
1. Open your command prompt and type the below command to confirm if it has been installed successfully and what version has been installed.

```bash
    #For Node.js, you type: 
    node -v 
    
    #For the NPM version, type:
    npm -v
```

2. After the version confirmation, you need to enter the below command to create the first Strapi project:

```bash
    npx create-strapi-app@latest my-strapiproject1
```

*Running the above command will prompt you to choose your installation type.*

3. Navigate to the first option “**Quickstart**” with your navigation keys “up and down", then press the **Enter key** to proceed and follow the instructions to continue.


![Strapi installation screenshot](https://lh6.googleusercontent.com/Dgjqn0Wg4KCqQu6ru7od_Ezh5EJiogPvOq1tegU0KIZbKl1Gs-z5ZwvHJricDXdEVjM-IgFo8RND5uPMT7P1rEWL8vYFvs9dXIWb5eH9jqS2Kj1U-r6enwdaqHOK1oC14mBoQxr1BqNLEPywWQ)

4. The final step is to run your created project by typing the below command in your command prompt after successfully creating your first strapi project and installing the required packages.

On your terminal, navigate to the folder where strapi is installed and run the command below to start the strapi application.

```bash
        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.

![Strapi dashboard](https://lh3.googleusercontent.com/HYANaaGn0RcvLDbI0Hr21H-R52pHj44x_0r113trp13x8JOkeqDdtXF_RTlx0Dpw9drPXOjs_Rc9EI_y8x--BRFd2UEPARBFSufDQhMo80PaijCGuR-x614nP9eFbre7-UQkUGExNNSK9ajdjg)


## Benefits of Using Strapi
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, when your app gets further queries, the CDN effortlessly compensates for improved traffic.


## Global Key Strapi Features

1. **RBAC:** 
RBAC refers to Role Based Access Control, which is a group of operations and permissions that you can grant to users. Assigning permissions to users or user groups is more complicated than using roles to add, delete, or modify permissions. Roles become especially helpful as the size and complexity of your user base grow.


![Roles in Strapi Feature](https://lh3.googleusercontent.com/3SjM1EoktM2dpJmbG5BkGSKHF5P-Mm87TVWoMmRCEa3RgcT4RNASjVZW-9lQZTuAMKRqcZqNTh5Y8RpTQvMI__efP3BZnmPziFGNivM2uSv2d8s3fnJXXZhejsp2HaJiquNfJ2tRNBdFzQykVcPHQBg)



**The three roles in Strapi Community Edition are:**
- **Super Admins**: The Super Admins have access to and control of all features and settings.
- **Editor:** The Editors can edit, publish, and manage user-generated content.
- **Authors:** The authors are limited to managing and publishing the information they have produced.


*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](https://strapi.io/pricing-self-hosted): unlimited custom roles in the Bronze, Silver, and Gold plans.  The Bronze is [available for free to students, open-source, and non-profits](https://strapi.io/blog/announcing-free-strapi-enterprise-editions-for-students-open-source-and-non-profits).


2. **Dynamic zones** 

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.


3. **Providers**

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](https://market.strapi.io/providers). 


### Installing Providers in Strapi

The following format can be used to install new providers with npm or yarn *@strapi/provider-<plugin>-<provider> --save.* For example, to install providers using the Aws S3:

```
    # Install the AWS S3 provider for the Upload plugin
    npm install @strapi/provider-upload-aws-s3 --save
    # Install the Sendgrid provider for the Email plugin
    npm install @strapi/provider-email-sendgrid --save
```

### Configuring Providers
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.

```js
    // path: ./config/plugins.js
    module.exports = ({ env }) => ({
      // ...
      upload: {
        config: {
          provider: 'aws-s3', // For community providers, pass the full package name (e.g. provider: 'strapi-provider-upload-google-cloud-storage')
          providerOptions: {
            accessKeyId: env('AWS_ACCESS_KEY_ID'),
            secretAccessKey: env('AWS_ACCESS_SECRET'),
            region: env('AWS_REGION'),
            params: {
              Bucket: env('AWS_BUCKET'),
            },
          },
        },
      },
      // ...
    });
```
Please, [click](https://docs.strapi.io/developer-docs/latest/development/providers.html#configuring-providers) [here](https://docs.strapi.io/developer-docs/latest/development/providers.html#configuring-providers) [for the configuration of the email plugins and how to create providers after installation](https://docs.strapi.io/developer-docs/latest/development/providers.html#configuring-providers). Strapi's default [security middleware](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#internal-middlewares-configuration-reference) includes a very stringent contentSecurityPolicy that limits loading images and media to "self" only. For more information, see the example setup on the [provider page](https://www.npmjs.com/package/@strapi/provider-upload-aws-s3) or the [middleware documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#internal-middlewares-configuration-reference).

## 4. Draft and Publish 
This *Draft and Publish* feature allows you to leave your content as a draft and publish it at a later time 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, from the sidebar, navigate through **Content Manager > Select Collection Type** 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.

![The Publish Feature in Strapi](https://paper-attachments.dropbox.com/s_A0481687BBBE0700E1EF7AE142FA39739A8844B49F68D1D7B813D7FC2265ADA4_1658859467359_publish.PNG)

### To deactivate the draft and publish feature for a content-type:

- Select Content-type Builder under Plugins on the sidebar.
- Choose the collection or individual type for which you wish to disable the draft and publish function.
- To access the configuration, click the Edit button.
- Select "Advanced Settings" from the tab.
- Select the FALSE option in the DRAFT/PUBLISH area.
- To confirm the feature's removal, click the Finish button.

![Disable the Draft and Publish a Feature in Strapi](https://paper-attachments.dropbox.com/s_A0481687BBBE0700E1EF7AE142FA39739A8844B49F68D1D7B813D7FC2265ADA4_1658859108427_bio.PNG)

> 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.

## Unpublishing Content

Published contents 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.


## Internationalization in Strapi

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](https://www.w3.org/International/questions/qa-i18n.en#i18n) for more details on the idea of internationalization.

The i18n plugin allows admin panel users to generate several localized versions of their content ([see user guide](https://docs.strapi.io/user-docs/latest/content-manager/translating-content.html)). 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](https://docs.strapi.io/developer-docs/latest/update-migration-guides/update-version.html#upgrading-the-dependencies)) as well as manual installation of the plugin.

The plugin can be installed using the Terminal by running one of the following commands:


    npm run strapi install i18n


![Internationalization Plugin Installation in Strapi](https://paper-attachments.dropbox.com/s_A0481687BBBE0700E1EF7AE142FA39739A8844B49F68D1D7B813D7FC2265ADA4_1658906135195_image.png)


## Features of the Internationalization Plugin (i18n)

The i18n plugin is beneficial in so many ways. Let’s discuss some of the features of the i18n plugin.


- **Flexibility**: It uses various components and modifies the structure of each locale as well as dynamic zones.
- **Clear Navigation:** When reviewing the list of contents or updating an entry, you can easily switch between locales.
- **Smooth Editing:** With a single click, you can copy and paste text from one locale to another, keeping some content consistent across all locales.

 

##  How to Add a New Language to Locales:

To add “Spanish” to our language locales:

- Click on “Settings” under the “General” section. 
- Click on “Internationalization” right under the “Global Settings”.
- Click on “Add new Locale.”
- Select “Spanish (es)” in the Locales section and then **save**.

![Internationalization Settings in Strapi](https://paper-attachments.dropbox.com/s_A0481687BBBE0700E1EF7AE142FA39739A8844B49F68D1D7B813D7FC2265ADA4_1658913361909_lang+locales.PNG)
 

## Conclusion
Understanding the Strapi features play an important role in content management. I hope after going through this article, you now 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.](https://market.strapi.io/?source=collection_about-------------------------------------)