As developers, we’re always looking for the perfect balance between functionality, security, and developer experience. Today, I’m excited to share an inside look at KrateCMS, a modern content management system built with Laravel 11. Let’s dive into the technical decisions and architecture that make this project tick.
Why Laravel 11?
At the heart of KrateCMS lies Laravel 11, the latest version of PHP’s most elegant framework. We’re running on PHP 8.2+, taking full advantage of modern PHP features while maintaining rock-solid stability. The decision to use Laravel 11 wasn’t just about staying current – it’s about leveraging the framework’s robust ecosystem and developer-friendly features.
The Technology Stack: Breaking It Down
Core Dependencies That Power Our CMS
The foundation of KrateCMS is built on carefully selected packages that each serve a specific purpose:
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"spatie/laravel-permission": "^6.17",
"graham-campbell/markdown": "^16.0",
// ... and more
}
Let’s talk about why each piece matters:
-
Content Management
- Graham Campbell’s Markdown package (^16.0) handles our content processing needs, making it a breeze to work with markdown content
- Built-in support for complex content structures and relationships
-
Security & Authentication
- Laravel Sanctum (^4.1) manages our API authentication
- Spatie’s Permission package (^6.17) provides flexible role and permission management
- Laravel Breeze (^2.3) gives us a clean, minimal authentication starter
-
Communication & Integration
- Symfony’s HTTP Client for robust external API interactions
- Postmark integration for reliable email delivery
Developer Experience: Tools That Make Life Easier
One thing I’m particularly proud of is our development setup. We’ve included tools that make the development process smooth and maintainable:
- Laravel Sail (^1.26): Spin up your dev environment with Docker in seconds
- Laravel Pint (^1.13): Keep code style consistent across the team
- Laravel Tinker (^2.9): Debug and experiment in an interactive shell
- PHPUnit (^11.0.1): Comprehensive testing suite for peace of mind
The Secret Sauce: Automated Workflows
What sets KrateCMS apart is its automated setup and workflow. When you first clone the project, our Composer scripts handle:
- Environment setup
- Key generation
- Database initialization
- Asset publishing
- Package discovery
Here’s what the initial setup looks like:
git clone [repository]
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
Security: No Compromises
Security isn’t an afterthought – it’s baked into the architecture:
- Role-based access control through Spatie Permissions
- API token authentication with Sanctum
- Environment-based configuration
- Secure email handling through Postmark
Database & Testing: Built for Scale
We’ve set up a robust database layer with:
- Database factories for realistic test data
- Comprehensive seeding capabilities
- SQLite support for local development
- PSR-4 compliant autoloading structure
What’s Next?
KrateCMS is continuously evolving. Our current stack provides a solid foundation for:
- Building complex content management systems
- Handling authentication and authorization at scale
- Managing user roles and permissions
- Processing and serving markdown content
- Maintaining high code quality standards
Getting Started
Want to try it out? Here’s how to get up and running:
- Ensure you have PHP 8.2+ installed
- Clone the repository
- Run
composer install
- Copy
.env.example
to.env
- Generate your application key
- Run migrations
- Start building!
Conclusion
Building KrateCMS with Laravel 11 has been an exciting journey in creating a modern, secure, and developer-friendly CMS. The combination of Laravel’s elegant architecture, carefully chosen packages, and automated workflows makes it a powerful foundation for content management needs.
Have questions about our tech stack or want to contribute? Feel free to reach out or check out our repository. I’d love to hear your thoughts and experiences with similar setups!
This post is part of my series on modern Laravel application development. Stay tuned for deep dives into specific features and implementation details of KrateCMS.