🔥 STRAPI – @repo/strapi
A fully configured Strapi v5 backend designed for scalable, production-ready CMS-driven applications. Built with TypeScript, Docker support, and PostgreSQL, it integrates seamlessly with the Next.js frontend starter.
Tech Stack
- Strapi 5
- TypeScript
- Docker
- PostgreSQL 16 (Alpine – local Docker container)
- Node.js (via nvm)
- pnpm workspace (Turborepo monorepo)
Included Plugins & Packages
- @strapi/plugin-users-permissions
- @strapi/plugin-i18n
- @strapi/plugin-sentry
- @strapi/plugin-color-picker
- @strapi/provider-email-mailgun
- @strapi/provider-email-nodemailer
- @strapi/provider-upload-aws-s3
- strapi-plugin-config-sync
- qs, lodash, pg
Environment Configuration
Copy .env.example to .env and adjust values according to your environment. Most defaults are preconfigured for local development.
The project supports runtime configuration injection into the Strapi Admin panel without requiring the STRAPI_ADMIN_ prefix.
- Set ADMIN_PANEL_CONFIG_API_AUTH_TOKEN to enable runtime injection
- Values are injected into the Admin HTML page via script tag
- Accessible via
window.STRAPI_ADMIN_CONFIG - Custom CSS, JS, or config variables can be injected via internal endpoint
Local Development
Recommended approach: run PostgreSQL in Docker and Strapi locally with hot reload.
- Strapi: http://localhost:1337
- Admin Panel: http://localhost:1337/admin
- Postgres: localhost:5432
Initial database data can be imported from strapi-export.tar.gz using:
pnpm run import
Alternatively, manually create:
- Homepage (Page collection, slug "/")
- Navbar (single type)
- Footer (single type)
- Enable languages: en and cs
Production Docker Setup
Production Dockerfile is optimized for Turborepo monorepo structure. Build must be executed from the monorepo root.
- Standalone production build
- Custom APP_URL build argument
- Environment-driven runtime configuration
- Supports external Postgres connection
Strapi container requires a running Postgres database before startup.
Core Features
Pages Hierarchy
Structured page tree system documented in project docs. Supports dynamic routing and fullPath-based page resolution.
Unified Link Component
- Internal links via relation fields
- External links via URL string
- Prevents broken links when page fullPath changes
- Consistent integration with frontend design system
Rich Text Editors
- CKEditor (HTML-based)
- Tiptap (JSON-based, ProseMirror format)
- Custom frontend renderers prepared for both
- Plugin-level customization available
Strapi Live Preview
- Embedded frontend iframe inside admin editor
- Shared secret authentication
- Environment-controlled activation
Upload & Media Storage
AWS S3 provider is preconfigured for production deployments.
- Requires AWS credentials (ACCESS_KEY, SECRET, REGION, BUCKET)
- Prevents file loss in non-persistent environments (e.g., Heroku)
- S3 URL must be whitelisted in CSP configuration
Email Providers
- Mailgun – recommended for production
- Mailtrap (Nodemailer) – recommended for development
Email provider is automatically selected based on available ENV variables.
Authentication & OAuth
- Users & Permissions plugin enabled
- JWT-based authentication
- OAuth providers (GitHub, Google, Facebook, Discord, etc.)
- Frontend handles OAuth callback synchronization
Supports ngrok-based local OAuth testing when providers do not accept localhost URLs.
Config Sync
strapi-plugin-config-sync allows configuration synchronization between environments.
- Import/export configuration via Admin panel
- Version-controlled configuration files
Advanced Relation Population
Custom document middleware controls dynamic zone population to prevent oversized query strings and performance issues.
- Middleware registered in
src/index.ts - Custom populate rules per collection
- Avoids unsafe deep-populate strategies
- Requires maintenance when models change
TypeScript Support
- Automatic schema type generation
- Types stored in
types/generated - Shared via workspace package to frontend
- Do not modify generated files manually
Lifecycle Hooks
- Optional registration email hooks
- afterCreate hook prepared but disabled by default
- Requires email provider configuration before enabling
Data Management
- Export/import scripts (export:all, export:content, import)
- Transfer data between environments
- Official Strapi data management compatibility
Cron Jobs
- Defined in
config/cron-tasks.ts - Enabled via CRON_ENABLED=true
Monitoring & Health
- Sentry integration for error logging
- Automatic capture of uncaught exceptions
- Health check endpoint:
/api/health
Summary
This Strapi backend provides a production-ready, TypeScript-first CMS foundation with advanced plugin integrations, secure authentication, flexible content modeling, Docker deployment support, and seamless integration with the Next.js frontend starter.