The most advanced open-source headless CMS that can easily build powerful APIs

The most advanced open-source headless CMS that can easily build powerful APIs

2022-10-19 0 1,417
Resource Number 46105 Last Updated 2025-02-21
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

The Strapi recommended in this issue is a leading open-source headless CMS, which is 100% JavaScript, fully customizable, and developer first.

The most advanced open-source headless CMS that can easily build powerful APIs插图

Strapi is a free and open-source headless CMS that provides your content wherever you need it.

  • Control your data.With Strapi, you can know where your data is stored and always maintain complete control.
  • Self hosted.You can host and expand the Strapi project in your own way. You can choose any hosting platform you want: AWS, Render, Netlify, Heroku, VPS, or dedicated servers. You can expand as you grow, 100% independent.
  • Database agnosticism.Strapi is suitable for SQL databases. You can choose your favorite databases: PostgreSQL, MySQL, MariaDB, and SQLite.
  • Customizable.You can quickly build logic to perfectly meet your needs by fully customizing APIs, routers, or plugins.

Strapi features

  • Modern Management Panel: An elegant, fully customizable, and fully expandable management panel.
  • Default security: Reusable policies, CORS, CSP, P3P, Xframe, XSS, etc.
  • Plugin oriented: Install authentication system, content management, custom plugins, etc. in seconds.
  • Extremely fast: Strapi is built on top of Node.js and provides amazing performance.
  • Front end agnosticism: using any front-end framework (React, Vue, Angular, etc.), mobile applications, or even the Internet of Things.
  • Powerful CLI: dynamic scaffolding projects and APIs.
  • SQL database: suitable for PostgreSQL, MySQL, MariaDB, and SQLite.

Install Strapi

Install using Docker

Docker is an open platform that allows the use of containers (packages that contain all the necessary parts for an application to run, such as libraries and dependencies) to develop, publish, and run applications.

  • Create an empty folder.
  • Create a docker-compose.yaml file in your empty folder. This is the place to create a new Strapi project, which defines the database and Strapi services to be used.
version: '3'
services:
  strapi:
    image: strapi/strapi
    environment:
      DATABASE_CLIENT: mysql
      DATABASE_HOST: mysql
      DATABASE_PORT: 3306
      DATABASE_NAME: strapi
      DATABASE_USERNAME: strapi
      DATABASE_PASSWORD: strapi
      DATABASE_SSL: 'false'
    volumes:
      - ./app:/srv/app
    ports:
      - '1337:1337'
    depends_on:
      - mysql

  mysql:
    image: mysql
    command: mysqld --default-authentication-plugin=mysql_native_password
    volumes:
      - ./data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: strapi
      MYSQL_DATABASE: strapi
      MYSQL_USER: strapi
      MYSQL_PASSWORD: strapi
  • Use the following command to pull the latest image:
docker-compose pull

Run Strapi

To run a Strapi project created using Docker, use one of the following commands:

# Execute Docker image detaching the terminal
docker-compose up -d

# Execute Docker image without detaching the terminal
docker-compose up

DigitalOcean One Click Installation

DigitalOcean is a cloud platform that helps developers deploy and scale applications by providing an Infrastructure as a Service (IaaS) platform.

Create a Strapi project

  • Go to the Strapi page on the DigitalOcean marketplace.
  • Click the Create Strapi Droplet button.
  • Keep the selected ‘Shared CPU Basic’ plan.
  • Select ‘Regular Intel with SSD’ as the CPU option.
  • Choose your virtual machine size (at least 2 GB/1 CPU).
  • Choose a data center area (closest to you or your target area).
  • Add a new SSH key. You can follow this guide to open a new window
  • Give your virtual machine a host name.
  • Click to create a Droplet. Droplet startup may take 30 seconds to a few minutes, while completing Strapi installation may take a few minutes.

Run Strapi

Your Strapi application on DigitalOcean will run in development mode. It is not recommended to use this application directly in production.

To access your Strapi application:

  • Go to the droplet list on DigitalOcean (open a new window) and log in.
  • Click on the droplet name for your Strapi application.
  • Copy the public IPv4 address of the Droplet.
  • Use this address to access the Strapi application.

The first visit to the Strapi application page will require the creation of the first administrator user.

Project Structure

The default structure of a Strapi project created without starting the CLI is as follows:

. # root of the application
├──── .cache # files used to build the admin panel
├──── .tmp
├──── build # build of the admin panel
├──── config # API configurations
│     ├ api.js
│     ├ admin.js
│     ├ cron-tasks.js
│     ├ database.js
│     ├ middlewares.js
│     ├ plugins.js
│     └ server.js
├──── database
│     └──── migrations
├──── node_modules # npm packages used by the project
├──── public # files accessible to the outside world
│     └──── uploads
├──── src
│     ├──── admin # admin customization files
│           ├──── extensions # files to extend the admin panel
│     │     ├ app.js
│     │     └ webpack.config.js
│     ├──── api # business logic of the project split into subfolders per API
│     │     └──── (api-name)
│     │           ├──── content-types
│     │           │     └──── (content-type-name)
│     │           │           └ lifecycles.js
│     │           │           └ schema.json
│     │           ├──── controllers
│     │           ├──── middlewares
│     │           ├──── policies
│     │           ├──── routes
│     │           ├──── services
│     │           └ index.js
│     ├──── components
│     │     └──── (category-name)
│     │           ├ (componentA).json
│     │           └ (componentB).json
│     ├──── extensions # files to extend installed plugins
│     │     └──── (plugin-to-be-extended)
│     │           ├──── content-types
│     │           │     └──── (content-type-name)
│     │           │           └ schema.json
│     │           └ strapi-server.js
│     ├──── middlewares
│     │     └──── (middleware-name)
│     │           ├ defaults.json
│     │           └ index.js
│     ├──── plugins # local plugins files
│     │     └──── (plugin-name)
│     │           ├──── admin
│     │           │     └──── src
│     │           │           └ index.js
│     │           ├──── server
│     │           │     ├──── content-types
│     │           │     ├──── controllers
│     │           │     └──── policies
│     │           ├ package.json
│     │           ├ strapi-admin.js
│     │           └ strapi-server.js
│     ├─── policies
│     └ index.js # include register(), bootstrap() and destroy() functions
├ .env
└ package.json

configuration

The application configuration is located at/ In the config folder (see project structure). All configuration files are loaded at startup and can be accessed through the configuration provider.

If/ The config/server. js file has the following configuration:

module.exports = {
  host: '0.0.0.0',
};

Server. host can access the key through the following methods:

strapi.config.get('server.host', 'defaultValueIfUndefined');

deploy

General guidelines

precondition
In order to provide the best environment for Strapi, there are some requirements that apply to development (local) as well as staging and production workflows.
Please note that Node LTS (v12 or V14) will never support odd numbered versions
Nodes (such as v13, v15). Any content included with NPM v6 or LTS node versions
A typical standard build tool for your operating system (build essential software packages on most Debian based systems) to
Less than 1 CPU core (strongly recommended at least 2)
At least 2 GB of RAM (medium recommended 4)
The recommended minimum storage space or 32 GB of available space for your operating system
Supported database versions
MySQL >= 5.7.8
MariaDB >= 10.2.7
PostgreSQL >= 10
SQLite >= 3
Supported operating systems
Ubuntu>=18.04 (LTS only)
Debian >= 9.x C
entOS/RHEL >= 8
MacOS Mojave or later version (does not support ARM)

Strapi plugin

Automatic plugin discovery

Strapi will automatically load plugins installed using npm. In the background, Strapi scans each file of the package. json project dependency and looks for the following declaration:

"strapi": {
  "kind": "plugin"
}

—END—

Open source license: MIT License

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code The most advanced open-source headless CMS that can easily build powerful APIs https://ictcoder.com/the-most-advanced-open-source-headless-cms-that-can-easily-build-powerful-apis/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services