Admin dashboard plugin for CakePHP 5 with Bootstrap UI integration.
- PHP 8.1 or higher
- CakePHP 5.0 or higher
- CakePHP Authentication plugin 3.0 or higher
Install via Composer:
composer require brammo/adminLoad the plugin in your application's src/Application.php:
public function bootstrap(): void
{
parent::bootstrap();
$this->addPlugin('Brammo/Admin');
}The plugin provides several view helpers to simplify UI development:
- ButtonHelper - Generate Bootstrap-styled buttons with icons
See docs/HELPERS.md for detailed documentation and examples.
Provides user profile management:
profile()- View and edit user profile
Built-in file and image manager with upload, browse, and management capabilities.
See docs/FILEMANAGER.md for detailed documentation.
The plugin integrates with CakePHP Authentication and Brammo Auth plugin for user management and authentication.
All configuration options are documented in docs/CONFIGURATION.md, including:
- Internationalization
- Brand customization
- Home link
- Sidebar menu
- Layout assets (CSS, JavaScript, fonts)
# Run all tests
composer test
# Run with verbose output
vendor/bin/phpunit --testdoxThe project uses both PHPStan and Psalm for static code analysis:
# Run PHPStan (level 8)
composer stan
# Run Psalm (level 1)
composer psalm
# Run all checks (tests + static analysis)
composer checkSee docs/PHPSTAN.md and docs/PSALM.md for detailed documentation.
- PHPStan Level: 8 (strictest)
- Psalm Level: 1 (strictest)
- Test Coverage: 45 tests, 120 assertions
- PHP Version: 8.1+
brammo/admin/
├── config/ # Plugin configuration
├── docs/ # Documentation
├── resources/ # Resources (translations, etc.)
│ └── locales/ # Translation files
├── src/ # Source code
│ ├── Controller/ # Controllers
│ ├── Model/ # Models (Entity, Table)
│ ├── View/ # View classes and helpers
│ │ └── Helper/ # View helpers
│ └── Plugin.php # Plugin bootstrap
├── templates/ # Templates
│ ├── element/ # Template elements
│ ├── layout/ # Layouts
│ └── User/ # User views
├── tests/ # Test suite
│ ├── Fixture/ # Test fixtures
│ └── TestCase/ # Test cases
└── webroot/ # Public assets
├── css/ # Stylesheets
└── js/ # JavaScript files
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and static analysis (
composer check) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
- Follow PSR-12 coding standards
- Write tests for new features
- Ensure all tests pass
- Maintain PHPStan level 8 and Psalm level 1 compliance
- Add type hints to all methods
This project is licensed under the MIT License - see the LICENSE file for details.
Roman Sidorkin
- Email: roman.sidorkin@gmail.com
- GitHub: @brammo
- brammo/auth - Authentication plugin for CakePHP