statamic/cms
Statamic is a flat-file-first CMS for Laravel, powered by Git. Install this core Composer package into an existing Laravel app to build fast, beautiful, easy-to-manage websites with a flexible content model and control panel.
Statamic CMS is a Laravel-first, Git-powered flat-file CMS designed to integrate seamlessly with existing Laravel applications. Its architecture leverages Laravel’s ecosystem (Blade, Eloquent, Events, Service Providers, etc.) while introducing a flat-file content model (YAML/JSON) stored in Git. This makes it ideal for:
Key architectural strengths:
statamic/cms, statamic/fields, statamic/navigation), allowing selective adoption.asset.saved, entry.published).Potential conflicts:
| Integration Aspect | Feasibility | Notes |
|---|---|---|
| Laravel Compatibility | High | Designed for Laravel; minimal boilerplate required. |
| Existing Laravel Apps | Medium-High | Can be added to existing apps via composer require statamic/cms, but may need config tweaks. |
| Custom Fieldtypes | High | Leverage Laravel’s service providers and Blade for custom fields. |
| Authentication | High | Integrates with Laravel’s auth (Breeze/Jetstream) or custom providers. |
| Routing | Medium | Uses Laravel’s routing but may require conflict resolution with existing routes. |
| Database Schemas | Low-Medium | Mostly file-based, but some metadata (users, permissions) uses DB. |
| Asset Handling | High | Replaces Laravel’s default storage with a file-based system (configurable). |
| Multi-Tenancy | Medium | Possible with Laravel’s multi-tenancy patterns but requires custom setup. |
| Third-Party Packages | Medium | Some Laravel packages may conflict; Statamic provides alternatives (e.g., its own cache). |
Key integration considerations:
app() helper replaces Laravel’s app() in some contexts (e.g., app('statamic')->content()).Statamic\Providers\StatamicServiceProvider), which may override or extend Laravel’s defaults.statamic::check) for CP access control.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Laravel Version Mismatch | High | Upgrade Laravel to 9.x/10.x or use Statamic’s legacy branch if necessary. |
| Git Workflow Overhead | Medium | Educate teams on Git-based content workflows; use Statamic’s statamic:publish commands. |
| Route Conflicts | Medium | Audit existing routes; use Statamic’s route prefix (statamic::) or middleware to isolate. |
| Custom Fieldtype Complexity | Medium | Start with built-in fieldtypes; use Statamic’s fieldtype docs for custom dev. |
| Performance Overhead | Low-Medium | Monitor file I/O for large content volumes; use caching (Statamic has built-in Redis support). |
| Migration from Legacy CMS | High | Use Statamic’s Migrator for WordPress/other CMS imports. |
| Security Hardening | Medium | Review Statamic’s security docs and audit custom fieldtypes. |
| Dependency Bloat | Low | Statamic bundles some JS/CSS; optimize via Vite’s build tools. |
Critical Questions for TPM:
Statamic is optimized for Laravel-centric stacks and integrates well with:
Stack Compatibility Matrix:
| Stack Component | Compatibility | Notes |
|---|---|---|
| Laravel 9/10 | Native | Core dependency; Statamic 6.x is built for these versions. |
| Laravel 8 | Possible | Use Statamic 5.x or backport patches. |
| PHP 8.1+ | Required | Statamic drops PHP 8.0 support. |
| Node.js 16+ | Required | For Vite asset compilation. |
| Composer | Native | Installed via composer require statamic/cms. |
| Nginx/Apache | Native | Standard Laravel server requirements. |
| Redis | Recommended | For caching (Statamic has built-in Redis support). |
| Docker | Native | Statamic provides Docker examples. |
| Tailwind CSS | Native | Statamic’s UI uses Tailwind; integrates seamlessly with Laravel’s Tailwind setup. |
| Alpine.js | Native | Used in Statamic’s frontend; works with Laravel’s frontend stacks. |
| GraphQL | Native | Built-in GraphQL API with authentication support. |
| WebSockets | Possible | Requires custom Laravel Echo/Pusher setup for real-time features. |
Scaffold a Laravel App with Statamic:
composer create-project statamic/statamic my-project
Customize the Prebuilt App:
app/Statamic/ directory for custom fieldtypes, blueprints, or themes.resources/views.Migrate Content:
composer require statamic/cms
config/app.php providers and aliases.How can I help you explore Laravel packages today?