yntech / domain-forge
Hexagonal architecture generator for Laravel. Provides Artisan commands for structuring domains following the principles of DDD and Screaming Architecture.
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yntech/domain-forge
Requires
- php: ^8.2
- illuminate/console: ^12.2
- illuminate/support: ^12.2
README
Domain Forge is a Laravel package that allows you to easily generate domain modules following the hexagonal architecture.
Installation
Run the following command to install the package:
composer require yntech/domain-forge
Configuration
After installing the package, run the following command to configure the base structure:
php artisan domain-forge:install
Then, add the following configuration to the composer.json file in the autoload.psr-4 section to ensure that all classes are loaded correctly:
"autoload": { "psr-4": { "Src\\": "src/" } }
After making this modification, run the following command to update the autoload configuration:
composer dump-autoload
Domain Generation
To generate a new domain module, use the following command:
php artisan domain-forge:domain <domain>
Replace <domain> with the name of the domain you want to create.
Generate Domain with Props
You can generate a domain with properties using the --props option.
Example:
php artisan domain-forge:domain <domain> --props=prop1:type1,prop2:type2
Contributions
If you want to contribute to this project, please open an issue or submit a pull request in the official repository.
License
This project is under the MIT license.