PHPackages                             ecotone-examples/php-ddd-cqrs-event-sourcing-ecotone - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ecotone-examples/php-ddd-cqrs-event-sourcing-ecotone

ActiveProject

ecotone-examples/php-ddd-cqrs-event-sourcing-ecotone
====================================================

109024[1 issues](https://github.com/ecotoneframework/php-ddd-cqrs-event-sourcing-symfony-laravel-ecotone/issues)PHP

Since Feb 12Pushed 4mo ago8 watchersCompare

[ Source](https://github.com/ecotoneframework/php-ddd-cqrs-event-sourcing-symfony-laravel-ecotone)[ Packagist](https://packagist.org/packages/ecotone-examples/php-ddd-cqrs-event-sourcing-ecotone)[ RSS](/packages/ecotone-examples-php-ddd-cqrs-event-sourcing-ecotone/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ecotone Framework Demo Application
==================================

[](#ecotone-framework-demo-application)

Objectives
==========

[](#objectives)

- To provide a simple example of how to implement `Domain Driven Design` and `Messaging Architecture` in PHP.
- To show how to implement `CQRS`, `Event Sourcing` and `Hexagonal Architecture` in PHP.
- To show how to implement `Resilient`amd `Observable` `Microservices` in PHP.

Playing with the demo
=====================

[](#playing-with-the-demo)

Run `docker-compose build --pull && docker-compose up -d` to start all services, and wait for them to start `docker-compose logs -f`.

This Demo provides two integrated Applications.

- Customer Service - which allows for reporting issues by customers
- Backoffice Service - which allows for working on tickets by employees

Services communicate with each other using `RabbitMQ` with `Ecotone's Distributed Bus`.

### If you do have problems running example, possibly you may need to fix file permissions

[](#if-you-do-have-problems-running-example-possibly-you-may-need-to-fix-file-permissions)

> sudo chown -R YOUR\_GROUP:YOUR\_USER .

### Quickstart

[](#quickstart)

- To report issue as a customer, go to [Customer Service](http://localhost:3000/)
- From [Backoffice Service](http://localhost:3001/prepared-tickets) you may start working on ticket, that was correlated with issue reported by customer.
- You may also check [Jaeger](http://localhost:3007/) to get full overview of how communication looks like and how each component behave and what is happening.

Additionaly you may check:

- Whenever issue is reported, confirming email will be sent to the customer, which can be found [Mailbox](http://localhost:3004/).
- First time email is sent it's set up for failing, so you can get feeling of working with system that can recover from error messages using [Ecotone Pulse](http://localhost:3006/service/customer_service).

Stack
=====

[](#stack)

- [Ecotone](https://docs.ecotone.tech/) - PHP Framework for building resilient, business oriented system in PHP
- [Symfony](https://symfony.com/) - PHP Framework for building web applications
- [Laravel](https://laravel.com/) - PHP Framework for building web applications
- [RabbitMQ](https://www.rabbitmq.com/) - Message Broker for asynchronous communication
- [Ecotone Pulse](https://docs.ecotone.tech/modules/ecotone-pulse) - Monitor for any processing errors and recover from failed messages.
- [OpenTelemetry with Jaeger](https://www.jaegertracing.io/) - Distributed Tracing for monitoring and troubleshooting microservices-based distributed systems

Business Domain
===============

[](#business-domain)

Customer Service
----------------

[](#customer-service)

- `Customer Service` is `Laravel+Ecotone application`, where customers can report issues. This happens using `CQRS` combined with `Eloquent Models`.

[![Laravel CQRS](documentation/customer-service.png "Laravel CQRS")](documentation/customer-service.png)

---

- Whenever new issue is reported, email is send to the with confirmation. This happens using `Asynchronous Event Handlers`, which are backed by `RabbitMQ`.

[![Laravel asynchronous event handling](documentation/issue-reported.png "Laravel asynchronous events")](documentation/issue-reported.png)

Backoffice Service
------------------

[](#backoffice-service)

- `Backoffice Service` is `Symfony+Ecotone application`, where employees can be registered and work on the tickets.
    All issues reported by customers are synchronized to `Backoffice Service` and are correlated with tickets.
    The synchronization between `Customer Service` and `Backoffice Service` is done using `Events` and `Distributed Bus` for cross service communication via `RabbitMQ`.

[![Symfony Microservice](documentation/ddd-cqrs-event-sourcing-php-hexagonal-architecture.png "Symfony Microservice")](documentation/ddd-cqrs-event-sourcing-php-hexagonal-architecture.png)

---

- Employees can work on the tickets provides information about the status. As we want to know full history, Tickets are `Event-Sourced`.
    From Event Sourced tickets we build different `Read Model Projections`, which are used to display information about the ticket.

Tracing and Monitoring
----------------------

[](#tracing-and-monitoring)

- The whole communication between Services is monitored and traced using [OpenTelemetry](https://opentelemetry.io/) with `Jaeger`.
    [![OpenTelemetry Jaeger](documentation/tracing_jaeger_php.png "OpenTelemetry Tracing in PHP with Jaeger")](documentation/tracing_jaeger_php.png)

---

- Any issue that happens in the system is reported to `Ecotone Pulse`, which is used to recover from failed messages.
    [![Ecotone Pulse](documentation/ecotone_pulse.png "Ecotone Pulse")](documentation/ecotone_pulse.png)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance51

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b6139b0dc15c550b22c76954ec6a96ac6c46b4c19b4a3c1e93c2146481e109e?d=identicon)[dgafka](/maintainers/dgafka)

---

Top Contributors

[![dgafka](https://avatars.githubusercontent.com/u/6060791?v=4)](https://github.com/dgafka "dgafka (94 commits)")[![jclaveau](https://avatars.githubusercontent.com/u/1556489?v=4)](https://github.com/jclaveau "jclaveau (1 commits)")[![jeijei4](https://avatars.githubusercontent.com/u/21228328?v=4)](https://github.com/jeijei4 "jeijei4 (1 commits)")[![lifinsky](https://avatars.githubusercontent.com/u/1822412?v=4)](https://github.com/lifinsky "lifinsky (1 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (1 commits)")

---

Tags

cqrsddddomain-driven-designecotoneevent-sourcinglaravelphpsymfony

### Embed Badge

![Health badge](/badges/ecotone-examples-php-ddd-cqrs-event-sourcing-ecotone/health.svg)

```
[![Health](https://phpackages.com/badges/ecotone-examples-php-ddd-cqrs-event-sourcing-ecotone/health.svg)](https://phpackages.com/packages/ecotone-examples-php-ddd-cqrs-event-sourcing-ecotone)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
