Skip to content
Symfony 4 DDD ES CQRS backend boilerplate
Branch: master
Clone or download
Latest commit 3ce65f2 Mar 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Fix #97 Mar 2, 2019
config Fix #97 Mar 2, 2019
doc Change example to the last code. Mar 11, 2019
etc Fix #97 Mar 2, 2019
public Fix #97 Mar 2, 2019
src Remove Session from domain layer Mar 10, 2019
tests Remove User Factory in favour of Specification pattern Mar 4, 2019
.covertalls.yml
.dockerignore
.env.dist
.gitignore
.php_cs Added CS Fixer to CI build Aug 2, 2018
.styleci.yml
.travis.yml Fix #97 Mar 2, 2019
LICENSE Create LICENSE May 29, 2018
README.md
composer.json Fix #97 Mar 2, 2019
composer.lock
depfile.yml
docker-compose.prod.yml Helm chart deployment Dec 16, 2018
docker-compose.yml
makefile
phpstan.neon
phpunit.xml.dist
symfony.lock

README.md

Symfony 4 ES CQRS Boilerplate

A boilerplate for DDD, CQRS, Event Sourcing applications using Symfony as framework and running with php7

Build Status Coverage Status StyleCI

Documentation

Buses

Creating an Application Use Case

Adding Projections

Async executions

UI workflow

Xdebug configuration

Kubernetes Deployment

Architecture

Architecture

Implementations

  • Environment in Docker
  • Command Bus, Query Bus, Event Bus
  • Event Store
  • Read Model
  • Async Event subscribers
  • Rest API
  • Web UI (A Terrible UX/UI)
  • Event Store Rest API
  • Swagger API Doc

Use Cases

User

  • Sign up
  • Change Email
  • Sign in
  • Logout

API Doc

Stack

  • PHP 7.2
  • Mysql 5.7
  • Elastic & Kibana 6.3
  • RabbitMQ 3

Project Setup

Up environment:

make start

Execute tests:

make phpunit

Static code analysis:

make style

Code style fixer:

make cs

Code style checker:

make cs-check

Enter in php container:

make s=php sh

Disable\Enable Xdebug:

make xoff

make xon

Build image to deploy

make artifact

PHPStorm integration

PHPSTORM has native integration with Docker compose. That's nice but will stop your php container after run the test scenario. That's not nice when using fpm. A solution could be use another container just for that purpose. But I don't want. For that reason I use ssh connection.

IMPORTANT

ssh in the container it's ONLY for that reason, if you've ssh installed in your production container, you're doing it wrong...

Use ssh remote connection.

Host:

  • Docker 4 Mac: localhost
  • docker machine OR dinghy: 192.168.99.100

Port:

  • 2323

Filesystem mapping:

  • {PROJECT_PATH} -> /app
You can’t perform that action at this time.