The Code Architecture

If you are searching for :

  • organizing your own app code, see symfony good practices or look at the demo app
  • organizing the code for a pushword extension : see create an extension

Else, you are at the good place.

Here, we will speak about :

  • code organisation for Pushword core and officially maintained extensions
  • how to prepare a development environment to be able to contribue

Code Architecture

The code for all officially maintained extension and the core is kept in an unique repository.

It's a mono-repository.

It's kind of majestic monolith.

The core contain the minimum features, then everything is done via extensions.

The core code follow as much as it can the symfony good practices and have a special folder named componenent for bigger thing (components will may have their own independant package one day).

Each extension are facultative.

Keeping all this extensions in one repository permit to test everything is working easily, to understand the code faster and to refactor much quicker.

The skeleton isn't a real skeleton (copy and install).

It's used for testing, demo, using for generating the docs and a few class from skeleton are extracted by the default installer.

On top of Symfony

Each package (except skeleton, installer and js-helper) is built as a symfony bundle.

The core package required a symfony app instaled to be functionnal.

Want a particular details about the way the code is organized ?

Feel free to ask (github or mail), I will list my answer here.

Development environement

This is only for contribution, if you are searching to developp a new application with Pushword, see installation.

  1. Check you have installed all the required dependencies.

  2. (Fork and) Clone the repository

  3. Install dependencies and initialize default app

composer update && composer reset

Useful commands

# php-cs-fixer
composer format

# run rector, format and tests
composer rector

# run phpstan
composer stan

# run psalm
composer psalm

# to play with default app console (skeleton)
composer console