gacela-project / gacela
Gacela helps you separate your project into modules
Fund package maintenance!
chemaclass.com/sponsor
Installs: 25 368
Dependents: 12
Suggesters: 2
Security: 0
Stars: 131
Watchers: 8
Forks: 7
Open Issues: 5
Requires
- php: >=8.1
- gacela-project/container: ^0.6
Requires (Dev)
- ergebnis/composer-normalize: ^2.43
- friendsofphp/php-cs-fixer: ^3.56
- infection/infection: ^0.26
- phpbench/phpbench: ^1.3
- phpmetrics/phpmetrics: ^2.8
- phpstan/phpstan: ^1.11
- phpstan/phpstan-strict-rules: ^1.6
- phpunit/phpunit: ^10.5
- psalm/plugin-phpunit: ^0.19
- rector/rector: ^1.2
- symfony/console: ^6.4
- symfony/var-dumper: ^6.4
- vimeo/psalm: ^5.25
Suggests
- gacela-project/gacela-env-config-reader: Allows to read .env config files
- gacela-project/gacela-yaml-config-reader: Allows to read yml/yaml config files
- gacela-project/phpstan-extension: A set of phpstan rules for Gacela
- symfony/console: Allows to use vendor/bin/gacela script
- dev-main
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.32.0
- 0.31.0
- 0.30.1
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.1
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.1
- 0.18.0
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-feat/test-bash-tools
- dev-fix/solve-windows-ci
- dev-add-with-all-to-modules-list
This package is auto-updated.
Last update: 2024-10-19 20:27:18 UTC
README
Gacela helps you build modular applications
VISION: Simplify the communication of your different modules in your web application.
MISSION: Normalize the entry point of a module, without interfering with your domain-business logic.
Splitting your project into different modules help in terms of maintainability and scalability. It encourages your modules to interact with each other in a unified way by following these rules:
- Modules interact with each other only via their Facade
- The Facade is the entry point of a module
- The Factory manage the intra-dependencies the module
- The Provider resolves the extra-dependencies of the module
- The Config access the project's config files
Installation
composer require gacela-project/gacela
Module structure
You can prefix gacela classes with the module name to improve readability. See more about gacela.
An example of an application structure using gacela modules:
application-name
├── gacela.php
├── config
│ └── ...
│
├── src
│ ├── ModuleA
│ │ ├── Domain
│ │ │ └── ...
│ │ ├── Application
│ │ │ └── ...
│ │ ├── Infrastructure
│ │ │ └── ...
│ │ │ # These are the 4 "gacela classes":
│ │ ├── Facade.php
│ │ ├── Factory.php
│ │ ├── Provider.php
│ │ └── Config.php
│ │
│ └── ModuleB
│ └── ...
│
├── tests
│ └── ...
└── vendor
└── ...
Documentation
You can check the full documentation in the official website.
Examples
You can see examples using gacela in this repository.
Contribute
You are more than welcome to contribute reporting issues, sharing ideas, or contributing with your Pull Requests.
Inspired by Spryker Framework: https://github.com/spryker