Git Product home page Git Product logo

symfony-6-es-cqrs-boilerplate's Introduction

Symfony 6 ES CQRS Boilerplate

All Contributors

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

push Coverage Status

This is a long living repository that started at v4 and was upgraded to each mayor since then. You can find v4 and v5 versions at the following branches:

symfony-5 branch

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 8+
  • Mysql 8.0
  • Elastic & Kibana 7.11.0
  • 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

Xdebug

To ease your development process, you can use Xdebug with PHPSTORM.

  1. Add a Docker interpreter

    Docker PHP interpreter

  2. Enable Xdebug listenning. Don't forget to also activate Xdebug helper from your browser.

    Xdebug activation

    Additionally, you can check Break at first line in PHP scripts to ensure your debug is working.

  3. Make a request from you API at http://127.0.0.1/api/doc for example. You should see this popup:

    Xdebug mapping

    Click on Accept and you should be ready to debug ! Start placing breakpoints on your code and enjoy debugging !

Note for Windows users:

You might need to update docker-os= to docker-os=windows in Makefile or specify its value on command line like $ make start docker-os=windows.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Luis

💻

Kajetan

💻

Krzysztof Kowalski

💻

Patryk Woziński

💻

jon-ht

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

symfony-6-es-cqrs-boilerplate's People

Contributors

jorge07 avatar cv65kr avatar lutacon avatar dependabot[bot] avatar allcontributors[bot] avatar patrykwozinski avatar jon-ht avatar kowalk avatar warguns avatar andrew-demb avatar ipehov avatar cobak78 avatar aliance avatar n-e-m-a-nj-a avatar pascal08 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.