Comfony is a comfortable, production-ready Symfony 7.3 boilerplate featuring daisyUI (Tailwind CSS 4), Hotwire Turbo, Stimulus, and UX Live Components for real-time reactive UIs.
Want to see Comfony in action? Try this prompt with GitHub Copilot:
Create a Note entity and its CRUD.
Copilot will generate a fully integrated Note entity, including real-time updates, LiveComponent forms, search, and daisyUI-powered templates—following all Comfony conventions.
docker compose upyarn watch
# or
npm run watch- Extract English translations:
symfony console translation:extract --force --format=yaml en
- Extract Turkish translations:
symfony console translation:extract --force --format=yaml tr
- List scheduled commands:
symfony console schedule:list
- Run scheduler:
symfony console schedule:run
To secure your staging environment with HTTP Basic Auth:
In your public directory:
htpasswd -c .htpasswd <username>
# Enter your password when promptedAdd to your .htaccess:
<If "%{ENV:APP_ENV} == 'staging'">
AuthType Basic
AuthName "Restricted"
AuthUserFile <absolute path to .htpasswd>
Require valid-user
</If>Add to your server block:
location / {
auth_basic "Restricted";
auth_basic_user_file <absolute path to .htpasswd>;
}Replace <absolute path to .htpasswd> with the full path to your .htpasswd file.
Run the following to fix and check code standards:
phpcbf && phpcsComfony manages your database schema automatically. Do not create migration files manually for structure changes.
Apply all schema changes with:
symfony console config:importThis command wraps doctrine:migrations:migrate, doctrine:schema:update, and config:dump-import. Use migration files only for custom operations.
When using Comfony's configuration dump system, you define your data export/import structure in YAML. Each section describes an entity, which fields to import, filter, and how to handle relations. Here’s how the structure works:
-
configuration:
entity: The fully qualified class name of the entity (e.g.,App\Entity\Main\Configuration\Configuration).importFields: List of fields to import/export (e.g.,configKey,value).filterFields: Fields used for filtering during import (e.g.,configKey).
-
permissions:
entity: The entity class for permissions.importFields: Fields to import/export (e.g.,name,description).filterFields: Fields used for filtering (e.g.,name).relations: Nested relations, such as translations.{relation_name}: (e.g,translations)entity: Related entity class (e.g.,App\Entity\Main\PermissionTranslation).fields: Fields to import/export for the relation (e.g.,locale,field,content).
This structure allows you to precisely control which data is exported or imported, and how related entities (like translations) are handled. You can extend this pattern for other entities as needed.
- Options available
- Using Symfony Docker with an existing project
- Support for extra services
- Deploying in production
- Debugging with Xdebug
- TLS Certificates
- Using MySQL instead of PostgreSQL
- Using Alpine Linux instead of Debian
- Using a Makefile
- Updating the template
- Troubleshooting
Comfony is available under the MIT License.
Created by Murat Baki Yücel.