{"id":13712059,"url":"https://github.com/OKTAYKIR/EventFlow.Example","last_synced_at":"2025-05-06T21:33:05.125Z","repository":{"id":65948569,"uuid":"222979230","full_name":"OKTAYKIR/EventFlow.Example","owner":"OKTAYKIR","description":"DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.","archived":false,"fork":false,"pushed_at":"2023-03-03T23:28:21.000Z","size":136,"stargazers_count":201,"open_issues_count":2,"forks_count":42,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-13T22:35:27.625Z","etag":null,"topics":["command-handler","cqrs","cqrs-es-architecture","ddd","domain-driven-design","dotnet-core","dotnetcore","event-driven","event-driven-architecture","event-handler","event-sourcing","eventflow","eventsource","eventsourcing","eventstore","ges","mongodb","rabbitmq","sagas","snapshot-store"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OKTAYKIR.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}},"created_at":"2019-11-20T16:21:57.000Z","updated_at":"2024-10-28T08:40:26.000Z","dependencies_parsed_at":"2023-02-17T22:25:16.897Z","dependency_job_id":"e5d07d16-2d31-40e2-9ebf-c91b12827c78","html_url":"https://github.com/OKTAYKIR/EventFlow.Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OKTAYKIR%2FEventFlow.Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OKTAYKIR%2FEventFlow.Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OKTAYKIR%2FEventFlow.Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OKTAYKIR%2FEventFlow.Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OKTAYKIR","download_url":"https://codeload.github.com/OKTAYKIR/EventFlow.Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772276,"owners_count":21801897,"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":["command-handler","cqrs","cqrs-es-architecture","ddd","domain-driven-design","dotnet-core","dotnetcore","event-driven","event-driven-architecture","event-handler","event-sourcing","eventflow","eventsource","eventsourcing","eventstore","ges","mongodb","rabbitmq","sagas","snapshot-store"],"created_at":"2024-08-02T23:01:14.468Z","updated_at":"2025-05-06T21:33:04.870Z","avatar_url":"https://github.com/OKTAYKIR.png","language":"C#","readme":"# EventFlow.Example\n![Hits](https://hitcounter.pythonanywhere.com/count/tag.svg?url=https://github.com/OKTAYKIR/EventFlow.Example)\n![GitHub issues](https://img.shields.io/github/issues/OKTAYKIR/EventFlow.Example)\n![Build Status](https://github.com/OKTAYKIR/EventFlow.Example/workflows/CI/badge.svg)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#contributing)\n\nDDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include [docker compose file](/build/docker-compose.yml).\n\n## Event Sourcing/CQRS Architecture\nThe most common CQRS/ES architecture would look like following diagram\n![OverallArchitecture](https://github.com/OKTAYKIR/EventFlow.Example/blob/master/Images/architecture_diagram.png)\n\nThe example consists of the following concepts, each shown below\n\n- Aggregates\n- Command bus and commands\n- Synchronous subscriber\n- Event store ([GES](https://eventstore.com/))\n- In-memory read model.\n- Snapshots ([MongoDb](https://www.mongodb.com/))\n- Sagas\n- Event publising (In-memory, [RabbitMq](https://www.rabbitmq.com/))\n- Metadata\n- Command bus decorator, custom value object, custom execution result, ...\n\n## Configuration\n```csharp\nvar resolver = EventFlowOptions.New\n    .UseAutofacContainerBuilder(new ContainerBuilder())\n    .Configure(c =\u003e c.ThrowSubscriberExceptions = true)\n    .AddEvents(typeof(ExampleEvent))\n    .AddEvents(typeof(ResetEvent))\n    .AddCommands(typeof(ExampleCommand))\n    .AddCommands(typeof(ResetCommand))\n    .AddCommandHandlers(typeof(ExampleCommandHandler))\n    .AddCommandHandlers(typeof(ResetCommandHandler))\n    .ConfigureEventStore()\n    .ConfigureMongoDb(client, SNAPSHOT_CONTAINER_NAME)\n    .AddSnapshots(typeof(ExampleSnaphost))\n    .UseMongoDbSnapshotStore()\n    .RegisterServices(sr =\u003e sr.Register(i =\u003e SnapshotEveryFewVersionsStrategy.Default))\n    .RegisterServices(DecorateCommandBus)\n    .PublishToRabbitMq(RabbitMqConfiguration.With(new Uri(@\"amqp://test:test@localhost:5672\"), true, 4, \"eventflow\"))\n    .UseInMemoryReadStoreFor\u003cAggregates.ReadModels.ExampleReadModel\u003e()\n    .AddJobs(typeof(ExampleJob))\n    .CreateResolver());\n```\n\n## 📦 Stack\n* [EventFlow](https://github.com/eventflow/EventFlow)\n* [EventStore](https://eventstore.com)\n* [RabbitMQ](https://www.rabbitmq.com)\n* [MongoDB](https://www.mongodb.com)\n* [PostgreSQL](https://www.postgresql.org)\n* [Docker](https://www.docker.com)\n\n## 🤝 Contributing\n1. Fork it ( https://github.com/OKTAYKIR/EventFlow.Example/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request \n\n## ✨ Contributors\n![GitHub Contributors Image](https://contrib.rocks/image?repo=OKTAYKIR/EventFlow.Example)\n\n## Show your support\nPlease ⭐️ this repository if this project helped you!\n\n## 📝 License\nApache-2.0 © [Oktay Kır](https://www.linkedin.com/in/oktay-kır-phd-9402955a)\n","funding_links":[],"categories":["Sample Projects","Sample \u0026 Reference Applications"],"sub_categories":[".NET (C#/F#)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOKTAYKIR%2FEventFlow.Example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOKTAYKIR%2FEventFlow.Example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOKTAYKIR%2FEventFlow.Example/lists"}