cadot-eu / base
Template Symfony moderne avec dashboard automatique, prêt à l'emploi, pour démarrer rapidement vos nouveaux projets avec une base solide et personnalisable.
Requires
- php: >=8.1
- symfony/symfony: ^6.0
This package is auto-updated.
Last update: 2026-03-29 01:13:21 UTC
README
This repository is a modern Symfony project template, ready to use, with an automatic dashboard to quickly start your new projects.
Main Features
- Built-in automatic admin dashboard
- Simple dashboard configuration: just add a method in your entities
- Command-line tool to help with dashboard setup and updates
- Customizable Symfony base
- Ready-to-develop project structure
Automatic Dashboard and Entity Management
The admin dashboard is generated automatically from your entities using the dedicated command:
php bin/console app:configure-cruds
This command scans your entities and configures the necessary CRUDs for the admin panel. It helps you install, update, or reconfigure the dashboard easily.
cruds() Method in Your Entities
To customize the dashboard behavior, simply add a public static cruds() method in each entity:
public static function cruds(): array { return [ // Example: 'fields' => ['name', 'email', 'createdAt'], 'labels' => ['name' => 'Name', 'email' => 'E-mail'], // ... ]; }
No extra configuration is needed: the dashboard adapts automatically to your entities. This makes dashboard setup and maintenance extremely simple.
Security and Role Management
Dashboard routes are protected by default:
/adminis accessible only to users with theROLE_ADMINrole./superadmin(if used) is reserved forROLE_SUPERADMIN.
The security configuration is already set in config/security.yaml: just assign roles to your users, no need to change code or routes.
Creating Secured Controllers
To add an admin controller, simply create it with a route starting with /admin:
#[Route('/admin/my-module', name: 'admin_my_module')]
It will automatically be protected by the role system.
Fixtures for Fast Prototyping
Fixtures are provided to pre-fill the database with sample data and speed up development:
php bin/console doctrine:fixtures:load
Docker & Development Environment
The project uses an optimized Docker image, automatically generated via generate_docker_image_symfony. The compose.yaml file is ready to launch the full environment (PHP, PostgreSQL, etc.):
docker compose up -d
Project Repository
https://github.com/cadot-eu/base
Usage with Composer
To create a new project based on this template:
composer create-project cadot-eu/base your-project-name --repository='{"type":"vcs","url":"git@github.com:cadot-eu/base.git"}' dev-main
Customization
- Edit configuration files as needed.
- See the Symfony documentation for more options.
License
MIT