vegas0250/blackcap-bundle

Tree-like modular architecture in the style of a bundle approach

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.1.9 2025-07-12 07:51 UTC

This package is auto-updated.

Last update: 2025-08-12 08:06:36 UTC


README

πŸ‡ΊπŸ‡Έ English | πŸ‡·πŸ‡Ί Русский

A tree-like modular architecture in the style of the bundle approach

(in development)

What is it?

This is a structure with a hierarchy of modules, each of which has the structure of a Symfony Bundle, but is not registered as a full-fledged bundle, but is integrated into the project via the blackcap:compile command.

They:

  • Are located in app/,
  • Can include each other recursively (nested modules),
  • services.yaml, routes.yaml, twig-paths, psr-4, etc. are automatically registered in the main project.

That is, a recursively pluggable modular architecture with elements of the bundle structure, but with custom registration logic.

Even simpler, each module is a mini-"symfony project" with arbitrary nesting and registered key folders such as:

  • /assets
  • /config
  • /public
  • /src
  • /templates
  • /translations
  • /tests

The console integration command reads all folders that are registered in the module hierarchy and simply integrates everything into the basic symfony project using configuration and writing psr-4 in composer.json.

Folder structure and naming

β”œβ”€β”€ app
β”‚Β Β  β”œβ”€β”€ migrations
β”‚Β Β  β”œβ”€β”€ public
β”‚Β Β  β”œβ”€β”€ src
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Controller
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── DefaultController.php
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Entity
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Repository
β”‚Β Β  β”‚Β Β  └── Kernel.php
β”‚Β Β  β”œβ”€β”€ templates
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ layouts
β”‚   β”‚Β Β  β”‚Β Β  └── base.html.twig
β”‚Β Β  β”‚Β Β  └── pages
β”‚Β Β  β”‚Β Β  └── default
β”‚Β Β  β”‚Β Β  └── index.html.twig
β”‚Β Β  └── translations
β”œβ”€β”€bin
β”‚Β Β  β”œβ”€β”€ console
β”‚Β Β  └── phpunit
β”œβ”€β”€config
β”‚Β Β  β”œβ”€β”€ bundles.php
β”‚Β Β  β”œβ”€β”€ packages
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ cache.yaml
β”‚Β Β  β”‚   β”œβ”€β”€ debug.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ doctrine_migrations.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ doctrine.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ framework.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ mailer.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ messenger.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ monolog.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ notifier.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ routing.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ security.yaml
β”‚Β Β  β”‚   β”œβ”€β”€ translation.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ twig.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ validator.yaml
β”‚Β Β  β”‚Β Β  └── web_profiler.yaml
β”‚Β Β  β”œβ”€β”€ preload.php
β”‚Β Β  β”œβ”€β”€ routes
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ annotations.yaml
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ framework.yaml
β”‚Β Β  β”‚Β Β  └── web_profiler.yaml
β”‚Β Β  β”œβ”€β”€ routes.yaml
β”‚Β Β  └── services.yaml
β”œβ”€β”€ public
β”‚Β Β  └── index.php
β”œβ”€β”€ var
β”œβ”€β”€ vendor
β”œβ”€β”€ phpunit.xml.dist
β”œβ”€β”€ composer.json
β”œβ”€β”€ composer.lock
└── symfony.lock