Git Product home page Git Product logo

php-ddd-cqrs-event-sourcing-symfony-laravel-ecotone's Introduction

PHP Applications using DDD CQRS Event Sourcing Symfony, Laravel powered by Ecotone

alt text

Demo provides two PHP Microservices collaborating with each over RabbitMQ.
First Microservice is using Symfony CQRS DDD Aggregates with Doctrine ORM and Event Sourcing backed by Prooph, modeled in Hexagonal Architecture.
Second Microservice is using Laravel, DDD Aggregates with Eloquent and asynchronous event handling.
Each service is powered by Ecotone Framework

Business usage

Laravel application is Customer Service, where customers can report issues.
Laravel CQRS Whenever new issue is reported, email is send to the customer confirming, that Customer Service is now working on it.
Laravel asynchronous event handling

Symfony application provides Backoffice, where we may register employees. In Backoffice customer issues are correlated with tickets and employees are responsible for handling them.
Symfony Microservice Employee that works on the tickets provides information about the status. When ticket is finished, it's closed with summary.

After ticket is closed, correlated issue from Customer Service is also closed and summary email is sent to the customer.

Playing with the demo

Go to customer_service (laravel application) http://localhost:3000/ to report issue as a customer. After reporting the issue as the customer it will be synchronized to backoffice_service (symfony application) http://localhost:3001/prepared-tickets.
Whenever issue is reported, confirming email will be sent to the customer http://localhost:3004/.
First time email is send however, it's set up for failing, so you may retry it directly from Ecotone Pulse http://localhost:3006/service/customer_service

Access applications

Quick start to get familiar with concepts

Run using docker-compose

Run docker-compose up -d

Shell:

make start  # Starts the containers. `make docker_up_detached` would run it in detached (-d) mode.
make help   # To see the available usage command
make [tab]  # For autocomplete
make sh     # to login to the bash of the app container
# Inside the container
console [tab] # To get all the Symfony's available commands including Ecotone ones
exit
# Outside the container
make db_sql # To access the PostgreSQL command CLI on the database container
make stop   # To stop the containers and their networks (keep their volumes and images)
make reset  # To remove the containers, their networks, their volumes for then restarting from scratch
make clean  # To remove everything from Docker and let your computer as if you never used this repo

php-ddd-cqrs-event-sourcing-symfony-laravel-ecotone's People

Contributors

dgafka avatar jclaveau 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.