feat(core): Implement DDD, CQRS, and Event Sourcing architecture

- Add project README and Composer configuration with PSR-4 autoloading
- Implement domain layer with AggregateRoot base class for event sourcing
- Create Carrier aggregate with CarrierRegistered domain event
- Add application layer with RegisterCarrierCommand and RegisterCarrierHandler
- Implement infrastructure layer with EventStore interface and CassandraEventStore
- Add CommandBus and Router for request handling and routing
- Create demo test file to showcase carrier registration workflow
- Establish foundation for event-driven architecture with Cassandra persistence
This commit is contained in:
m.jalmoudy
2025-12-02 14:58:22 +03:30
parent d963da40e1
commit 6b5222ad84
13 changed files with 406 additions and 0 deletions

20
composer.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "mamad/distributing-carriers",
"description": "Distributing Carriers Application with DDD, CQRS, and Event Sourcing",
"type": "project",
"require": {
"php": "^8.0",
"ext-cassandra": "*"
},
"autoload": {
"psr-4": {
"DistributingCarriers\\": "src/"
}
},
"authors": [
{
"name": "Mamad",
"email": "mamad@example.com"
}
]
}