What Strapi Does
Strapi provides a complete content management solution:
- Content-Type Builder: Visual interface to define content models with fields, relations, and components
- Auto-generated APIs: REST and GraphQL APIs created automatically from your content types
- Media Library: Upload, organize, and transform images and files with built-in asset management
- Authentication & RBAC: User management with role-based permissions at field and content-type level
- Internationalization (i18n): Built-in multi-language content management
- Content Versioning: Draft/publish workflow with content history
- Marketplace: 100+ community plugins for SEO, email, search, and more
- Customization: Extend with custom controllers, services, middlewares, and policies
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Your App │────▶│ Strapi │────▶│ SQLite / │
│ (Next.js / │ │ Server │ │ PostgreSQL /│
│ Nuxt / etc) │ │ (Koa.js) │ │ MySQL │
└──────────────┘ └──────┬───────┘ └──────────────┘
│
┌──────┴───────┐
│ Admin Panel │
│ (React) │
└──────────────┘Getting Started
Create a Project
npx create-strapi@latest my-project
# Choose database: SQLite (default), PostgreSQL, or MySQL
# Choose TypeScript or JavaScriptContent Types via UI
The Content-Type Builder lets you visually create:
- Collection Types: Repeatable content (Articles, Products, Users)
- Single Types: Unique content (Homepage, Settings, About Page)
- Components: Reusable field groups (SEO, Address, Social Links)
Content Types via Code
// src/api/article/content-types/article/schema.json
{
"kind": "collectionType",
"collectionName": "articles",
"info": {
"singularName": "article",
"pluralName": "articles",
"displayName": "Article"
},
"attributes": {
"title": {
"type": "string",
"required": true
},
"content": {
"type": "richtext"
},
"slug": {
"type": "uid",
"targetField": "title"
},
"cover": {
"type": "media",
"allowedTypes": ["images"]
},
"category": {
"type": "relation",
"relation": "manyToOne",
"target": "api::category.category"
},
"author": {
"type": "relation",
"relation": "manyToOne",
"target": "plugin::users-permissions.user"
}
}
}API Usage
REST API
# List articles
curl http://localhost:1337/api/articles?populate=*
# Get single article
curl http://localhost:1337/api/articles/1?populate=cover,category
# Create article (authenticated)
curl -X POST http://localhost:1337/api/articles
-H "Authorization: Bearer YOUR_JWT"
-H "Content-Type: application/json"
-d '{"data": {"title": "My Post", "content": "Hello World"}}'
# Filter and sort
curl "http://localhost:1337/api/articles?filters[category][name][$eq]=tech&sort=publishedAt:desc&pagination[limit]=10"GraphQL API
query {
articles(
filters: { category: { name: { eq: "tech" } } }
sort: "publishedAt:desc"
pagination: { limit: 10 }
) {
data {
id
attributes {
title
content
slug
cover {
data {
attributes {
url
}
}
}
}
}
}
}Self-Hosting
Docker Compose
services:
strapi:
image: strapi/strapi:latest
ports:
- "1337:1337"
environment:
DATABASE_CLIENT: postgres
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_NAME: strapi
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi
JWT_SECRET: your-jwt-secret
ADMIN_JWT_SECRET: your-admin-jwt-secret
APP_KEYS: key1,key2,key3,key4
depends_on:
- postgres
volumes:
- strapi-data:/opt/app
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: strapi
POSTGRES_PASSWORD: strapi
POSTGRES_DB: strapi
volumes:
- pg-data:/var/lib/postgresql/data
volumes:
strapi-data:
pg-data:Strapi vs Alternatives
| Feature | Strapi | Payload | Directus | Contentful |
|---|---|---|---|---|
| Open Source | Yes | Yes (MIT) | Yes | No |
| GitHub Stars | 71.8K | 41.7K | 34.7K | N/A |
| Config | GUI + code | Code-first | GUI | GUI |
| Language | JavaScript/TS | TypeScript | JavaScript | N/A |
| Database | SQLite/PG/MySQL | MongoDB/PG | Any SQL | Hosted |
| Plugin marketplace | 100+ | Growing | Extensions | Apps |
| Community | Very large | Growing fast | Large | Large |
FAQ
Q: Is Strapi suitable for large enterprise projects? A: Yes. Strapi v5 strengthens enterprise features including audit logs, SSO, approval flows, and content publishing workflows. Many enterprises run Strapi in production.
Q: What's different between Strapi v5 and v4? A: v5 improves the API response format (flatter), introduces the Document Service API, improves TypeScript support, and optimizes database query performance. Migrating from v4 requires updating API call patterns.
Q: Does the content editor support Markdown? A: The default rich text editor is WYSIWYG. Community plugins can swap it for a Markdown editor, or you can use the CKEditor 5 plugin for a more powerful editing experience.