{"id":19100226,"url":"https://github.com/charlessolar/TodoMVC-DDD-CQRS-EventSourcing","last_synced_at":"2025-04-18T17:33:04.085Z","repository":{"id":39554232,"uuid":"127932700","full_name":"charlessolar/TodoMVC-DDD-CQRS-EventSourcing","owner":"charlessolar","description":"Implementation of basic Todo app via tastejs/todomvc in C#/Typescript with eventsourcing, cqrs, and domain driven design","archived":false,"fork":false,"pushed_at":"2023-01-08T23:00:16.000Z","size":2007,"stargazers_count":251,"open_issues_count":2,"forks_count":31,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-07-23T15:32:25.835Z","etag":null,"topics":["backend","cqrs","cqrs-es","ddd","domain-driven-design","eventsourcing","eventstore","example","frontend","microservices","netstandard","nservicebus","todomvc","typescript"],"latest_commit_sha":null,"homepage":"","language":"C#","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/charlessolar.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}},"created_at":"2018-04-03T15:54:58.000Z","updated_at":"2024-07-23T14:34:24.000Z","dependencies_parsed_at":"2023-02-08T07:45:32.775Z","dependency_job_id":null,"html_url":"https://github.com/charlessolar/TodoMVC-DDD-CQRS-EventSourcing","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/charlessolar%2FTodoMVC-DDD-CQRS-EventSourcing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlessolar%2FTodoMVC-DDD-CQRS-EventSourcing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlessolar%2FTodoMVC-DDD-CQRS-EventSourcing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlessolar%2FTodoMVC-DDD-CQRS-EventSourcing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlessolar","download_url":"https://codeload.github.com/charlessolar/TodoMVC-DDD-CQRS-EventSourcing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783092,"owners_count":17201903,"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":["backend","cqrs","cqrs-es","ddd","domain-driven-design","eventsourcing","eventstore","example","frontend","microservices","netstandard","nservicebus","todomvc","typescript"],"created_at":"2024-11-09T03:52:35.716Z","updated_at":"2024-11-09T03:53:21.843Z","avatar_url":"https://github.com/charlessolar.png","language":"C#","funding_links":[],"categories":["frontend","typescript"],"sub_categories":[],"readme":"# Instructions\n\n**Start**\n\n```\ndocker compose build\ndocker compose up\n```\n\n# Source Code!\n\nBeing this project has such a small domain context there are only a couple source files which contain real logic.  Other files are helpers, extensions, or setup.  \n\n### Important backend files:\n\n* [Domain Command Handler](src/Domain/Todo/Handler.cs)\n* [Domain Todo Aggregate](src/Domain/Todo/Todo.cs)\n* [Read Model Projector](src/Application/Todo/Handler.cs)\n* [Web Request Handler](src/Web/Controllers/TodoController.cs)\n* [Domain Handler Tests](src/Test/DomainHandler.cs)\n* [Event Handler Tests](src/Test/EventHandler.cs)\n\nWeb frontend from [TodoMVC-React](https://github.com/blacksonic/todomvc-react)\n\n### What is EventSourcing?\n\nEventSourcing is a process of representing domain objects (Orders, Invoices, Accounts, etc) as a series of separate events.\n\nYour application ends up being 1 long audit log which records every state-changing event that occurs.  The advantage of this approach is other processes can read this event log and generate models that contain only the information the process cares about.  There is also additional information available that other services perhaps don't record themselves.\n\nImagine a shoppign cart which fills with items to buy.  The warehouse only cares about the final order of the stuff the customer actually agreed to purchase -\n\n\u003cimg src=\"img/eventsourcing.png\" height=\"400px\"\u003e\n\nbut the marketing team might care more about the items the customer removed from their cart **without** buying.  \n\nUsing eventsourcing correctly you can generate models which contain both sets of information to satisfy both departments with only 1 set of data.\n\n### What is CQRS\n\nCQRS stands for **Command and Query Responsibility Segregation**\n\n\u003cimg src=\"img/cqrs-logical.svg\" height=\"400px\"\u003e\n\nIn a nut shell - commands are everything that want to change the application state.  Queries are anything that want to read application state.  **There is no overlap**\n\nCommands do not return any data other than if they were *Accepted* or *Rejected*. Accepted meaning the change was saved and read models will be updated.  Rejected meaning the command failed validation or was not valid to be run at this time.  (One example would be trying to invoice a sales order which has already been invoiced)\n\n## Architecture Overview\n\n\u003cimg src=\"img/overview.png\" height=\"400px\"\u003e\n\n## Commands Processing\n\n\u003cimg src=\"img/commands.png\" height=\"400px\"\u003e\n\n### Good reads\n\n* [Microsoft's CQRS architecture guide](https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/cqrs)\n* [Microsoft's eventsourcing architecture guide](https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing)\n\n### EventStore Management\n\n{host}:2113\n\n### RabbitMq Management\n\n{host}:15672\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlessolar%2FTodoMVC-DDD-CQRS-EventSourcing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlessolar%2FTodoMVC-DDD-CQRS-EventSourcing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlessolar%2FTodoMVC-DDD-CQRS-EventSourcing/lists"}