{"id":20681180,"url":"https://github.com/gemberphp/example-event-sourcing-dcb","last_synced_at":"2025-03-10T20:42:12.302Z","repository":{"id":261495789,"uuid":"871181186","full_name":"GemberPHP/example-event-sourcing-dcb","owner":"GemberPHP","description":"Example project (Proof of Concept) with Event Sourcing in PHP using the Dynamic Consistency Boundary (DCB) pattern. ","archived":false,"fork":false,"pushed_at":"2025-01-08T05:57:38.000Z","size":470,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T15:51:08.409Z","etag":null,"topics":["cqrs","dcb","ddd","domain-driven-design","dynamic-consistency-boundary","event-sourcing","gember"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GemberPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T12:37:02.000Z","updated_at":"2024-12-20T08:42:53.000Z","dependencies_parsed_at":"2024-12-11T19:38:13.491Z","dependency_job_id":"c88811cd-6633-4ae0-9152-47b56b588c08","html_url":"https://github.com/GemberPHP/example-event-sourcing-dcb","commit_stats":null,"previous_names":["gemberphp/example-event-sourcing-dcb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fexample-event-sourcing-dcb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fexample-event-sourcing-dcb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fexample-event-sourcing-dcb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fexample-event-sourcing-dcb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GemberPHP","download_url":"https://codeload.github.com/GemberPHP/example-event-sourcing-dcb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242926225,"owners_count":20207754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cqrs","dcb","ddd","domain-driven-design","dynamic-consistency-boundary","event-sourcing","gember"],"created_at":"2024-11-16T22:10:01.326Z","updated_at":"2025-03-10T20:42:12.275Z","avatar_url":"https://github.com/GemberPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Sourcing with DCB in PHP\nExample project (Proof of Concept) with Event Sourcing in PHP using the 'Dynamic Consistency Boundary' (DCB) pattern.\n\nMore about the library and the DCB pattern, see [Gember Event Sourcing](https://github.com/GemberPHP/event-sourcing).\n\n## This example project\n_The DCB pattern is an interesting concept, but this does not advocate to remove aggregates completely.\nInstead, a hybrid solution with aggregates and business decision models is probably more likely, depending on your domain._\n\nThis example project is using a fictive domain (taken from Sara Pellegrini's blog) where students can subscribe to courses (of any kind).\nDeliberately this is all what is defined for this domain, to focus on how this could be implemented when using Event Sourcing with the DCB pattern in mind.\n\nIt contains both classic aggregates (e.g. [Course](src/Domain/Course/Course.php), [Student](src/Domain/Student/Student.php)) as well as business decision models (e.g. [ChangeCourseCapacity](src/Domain/Course/ChangeCourseCapacity.php), [SubscribeStudentToCourse](src/Domain/StudentToCourseSubscription/SubscribeStudentToCourse.php), [UnsubscribeStudentFromCourse](src/Domain/StudentToCourseSubscription/UnsubscribeStudentFromCourse.php)).\n\nInspired by other PHP libraries such as [Broadway](https://github.com/broadway), [EventSauce](https://github.com/EventSaucePHP), [Prooph](https://github.com/prooph) and [Ecotone](https://github.com/ecotoneframework) as well as [Axon Framework](https://github.com/AxonFramework) for Java.\n\n### How to run\nRun database with Docker compose:\n```\ndocker compose up\n```\n\nRun migrations:\n```\nbin/console doctrine:migrations:migrate\n```\n\nYou're all set, see what commands you can run:\n```\nbin/console gember\n```\n\nOr run the demo command to run random sets of commands automatically:\n```\nbin/console gember:demo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemberphp%2Fexample-event-sourcing-dcb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemberphp%2Fexample-event-sourcing-dcb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemberphp%2Fexample-event-sourcing-dcb/lists"}