Content Management System with Strapi backend and Next.js blog frontend.
This is a monorepo containing two projects:
cms/
├── cms/ # Strapi headless CMS
├── blog/ # Next.js blog frontend
├── docker-compose.cms.yml
└── docker-compose.blog.yml
Headless CMS for content management.
- Tech Stack: Strapi 5, Node.js, SQLite/PostgreSQL
- Port: 1337
- Admin: http://localhost:1337/admin
cd cms
cp .env.example .env
npm install
npm run developNext.js-based blog that consumes content from Strapi.
- Tech Stack: Next.js 15, React, TypeScript, Tailwind CSS
- Port: 3001
cd blog
cp .env.example .env
npm install
npm run dev# Start Strapi CMS
docker-compose -f docker-compose.cms.yml up -d
# Start Blog
docker-compose -f docker-compose.blog.yml up -d
# Or start both together
docker-compose -f docker-compose.cms.yml -f docker-compose.blog.yml up -d# Terminal 1: Start Strapi CMS
cd cms
cp .env.example .env
npm install
npm run develop
# Terminal 2: Start Blog
cd blog
cp .env.example .env
npm install
npm run dev┌─────────────────────────────────────────────────────────┐
│ Blog Frontend (:3001) │
│ (Next.js) │
└─────────────────────────┬───────────────────────────────┘
│ GraphQL/REST
▼
┌─────────────────────────────────────────────────────────┐
│ Strapi CMS (:1337) │
├─────────────────────────────────────────────────────────┤
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │Articles │ │ Media │ │ Users │ │ Tags │ │
│ │ │ │ Library │ │ & Roles │ │ Cats │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
└─────────────────────────┬───────────────────────────────┘
│
▼
┌───────────┐
│ PostgreSQL│
│ /SQLite │
└───────────┘
- Title, slug, content (Rich Text)
- Featured image
- Author reference
- Categories and tags
- SEO metadata
- Publication date
- Status (draft/published)
- Name, slug
- Description
- Parent category (hierarchical)
- Name, slug
- Name, bio, avatar
- Social links
| Variable | Description | Default |
|---|---|---|
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 1337 |
DATABASE_CLIENT |
Database type | sqlite |
DATABASE_URL |
PostgreSQL URL | - |
APP_KEYS |
Security keys | Required |
API_TOKEN_SALT |
API token salt | Required |
ADMIN_JWT_SECRET |
Admin JWT secret | Required |
| Variable | Description |
|---|---|
NEXT_PUBLIC_STRAPI_URL |
Strapi API URL |
STRAPI_API_TOKEN |
API token for SSR |
| Endpoint | Description |
|---|---|
GET /api/articles |
List articles |
GET /api/articles/:slug |
Get article |
GET /api/categories |
List categories |
GET /api/tags |
List tags |
GET /api/authors |
List authors |
GraphQL playground available at: http://localhost:1337/graphql
query {
articles {
data {
id
attributes {
title
slug
content
publishedAt
}
}
}
}# Build Strapi
cd cms
npm run build
# Start production server
npm start# Build Next.js
cd blog
npm run build
# Start production server
npm start# Strapi
docker build -t minisource/cms:latest ./cms
# Blog
docker build -t minisource/blog:latest ./blog- Visual content editor
- Media library
- Role-based access
- API tokens
- Webhooks
- Internationalization
- Static site generation (SSG)
- Server-side rendering (SSR)
- SEO optimization
- Responsive design
- Dark mode
- RSS feed
- Sitemap
- Node.js 20+
- Docker & Docker Compose (optional)
cd cms
# Install dependencies
npm install
# Start development server
npm run develop
# Build for production
npm run build
# Start production server
npm startcd blog
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm startMIT