cross icon
BackendGetting Started with Strapi: A Step-by-Step Guide for Beginners

Getting Started with Strapi: A Step-by-Step Guide for Beginners

5 mins Read
mainImg

Build with Radial Code

Radial Code Enterprise gives you the power to create, deploy and manage sites collaboratively at scale while you focus on your business. See all services.

If you’re looking for a powerful and flexible headless CMS that’s easy to use, Strapi might just be your new best friend. Built on Node.js, Strapi lets developers quickly build APIs with a user-friendly admin panel and robust customization options — all without writing boilerplate code.

In this guide, we’ll walk you through how to get started with Strapi step-by-step. Whether you're building a portfolio, blog, or e-commerce site, Strapi can help you launch faster with a clean backend. For more insights, check out our previous blog on Strapi.

What is Strapi?

Strapi is a free, open-source headless CMS (content management system) that lets you manage content through an easy-to-use dashboard. It provides REST and GraphQL APIs to access your content from anywhere. You can fully customize how your content is structured and delivered. Since it's self-hosted, you have complete control over your backend.

Key Features:

  • Customizable API (REST or GraphQL)
  • Role-based access control
  • Media library
  • Easy integration with front-end frameworks (React, Next.js, Vue, etc.)
  • Plugin support

Requirement:

Before you start, make sure you have the following installed:

  • Node.js (v14 or higher)
  • npm or yarn
  • Git (optional, for version control)
follow-steps

Step 1: Install Strapi

You can create a new Strapi project with just one command:

npx create-strapi-app@latest my-project --quickstart

will quickly spin up a new Strapi project named my-project (or any name you prefer) with the default configuration using SQLite as the database. Here's what happens:

Prompt

Recommended Input

Start with an example structure & data?

n

Use the default database (sqlite)?

Y(or your desired)

Install dependencies with npm?

Y(or your desired)

Start with TypeScript?

Y(recommended)

Initialize a git repository?

Y or n

After Setup: Run the Dev Server

Once installation is complete, navigate to the project directory:

cd my-project

To start the Strapi dev server at any time, use:

npm run develop

This command will:

💡 The --quickstart flag uses SQLite and auto-launches the project. For production, consider PostgreSQL or MySQL.

Step 2: Set Up Your Admin Account

account

Once the server is up, you’ll be redirected to the admin panel. Create your admin user by entering your:

  • Full name
  • Email
  • Password

👉 After this, you’ll enter the Strapi dashboard.

Step 3: Create Your First Content Type

content-type

Strapi lets you define your own models (content types) easily.

Allow:

  • Go to Content-Type Builder
  • Click Create new collection type
  • Name it (e.g., Article)
  • Add fields like:
    • Title (Text)
    • Body (Rich Text)
    • Published (Boolean)
    • Cover Image (Media)

Save the content type and allow Strapi to restart the server.

Step 4: Add Some Content

content builder

Now that your content type is ready:

  • Go to Content Manager
  • Select Article
  • Click Create new entry
  • Fill in the fields and save

This content will now be available via the API.

Step 5: Access the API

image-name

By default, Strapi provides REST APIs. To fetch articles:

GET http://localhost:1337/api/articles

If you want to use GraphQL, install the plugin:

npm install @strapi/plugin-graphql

Then enable it in config/plugins.js.

Step 6: Set API Permissions

image-name

By default, public access to content is restricted.

To allow access:

  • Go to Settings > Roles > Public
  • Scroll down to your collection type (e.g., Article)
  • Enable find and findOne
  • Save

Now your API will return content publicly.

Step 7: Connect to a Frontend

Strapi works great with frontends like:

  • Next.js: Use getStaticProps to pull data at build time
  • React: Use fetch or Axios to get data on mount
  • Gatsby: There’s a dedicated plugin for sourcing from Strapi
function App() {
  const [showData, setShowData] = useState(null);

  useEffect(() => {
    const fetchData = async () => {
      try {
        const data = await fetch(
          "http://localhost:1337/api/authors",
          {
            method: "GET",
          }
        );
        const result = await data.json();
        setShowData(result);
      } catch (error) {
        console.error("Error fetching data:", error);
      }
    };

    fetchData();
  }, []);
}

Optional: Deploy Strapi

To deploy your Strapi project:

  • Heroku / Render / Railway (for free options)
  • Use PostgreSQL for production DB
  • Store environment variables securely (DB URL, JWT secret, etc.)

Bonus: Explore Plugins

Strapi has a growing plugin ecosystem. Some must-try plugins include:

  • GraphQL – Add a GraphQL API
  • i18n – Internationalization support
  • Email – Send emails from your app
  • Documentation – Auto-generate Swagger/OpenAPI docs

Conclusion

Strapi makes backend development fast, fun, and flexible. Whether you’re building a blog, marketplace, or mobile app backend, Strapi gives you full control over content and APIs with minimal setup.

Now that you’re up and running, go explore! Add more content types, customize your admin panel, or build relationships between models. The possibilities are endless.

cta

Share this

whatsapp
whatsapp
whatsapp
whatsapp
whatsapp

Keep Reading

Stay up to date with all news & articles.

Email address

Copyright @2025. All rights reserved | Radial Code