tavy315 / symfony-5-es-cqrs-boilerplate

Symfony 4 DDD ES CQRS backend boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symfony 5 ES CQRS Boilerplate

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

pr Coverage Status

Symfony 4 still available in symfony-4 branch

Documentation

Buses

Creating an Application Use Case

Adding Projections

Async executions

UI workflow

Xdebug configuration

Kubernetes Deployment

Architecture

Architecture

Implementations

  • Environment in Docker
  • Symfony Messenger
  • 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.4
  • Mysql 8.0
  • Elastic & Kibana 7.6
  • RabbitMQ 3

Project Setup

Action Command
Setup make start
Run Tests make phpunit
Static Analisys make style
Code Style make cs
Code style check make cs-check
PHP Shell make s=php sh
Xdebug make xoff/xon
Build Artifacts 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 is way slower and I don't want. For that reason I use ssh connection.

IMPORTANT

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

Click here for the detailed instructions about how to setup the PHP remote interpreter in PHPStorm.

If you're already familiar with it, here a quick configuration reference:

Host Direction
Docker 4 mac localhost
Dinghy $ dinghy ip

Port: 2323

Filesystem mapping: {PROJECT_PATH} -> /app

About

Symfony 4 DDD ES CQRS backend boilerplate

License:MIT License


Languages

Language:PHP 92.1%Language:HTML 4.1%Language:Makefile 1.9%Language:Smarty 0.9%Language:Shell 0.6%Language:Dockerfile 0.4%