{"id":17217716,"url":"https://github.com/poulad/event-sourced-counter","last_synced_at":"2026-04-09T11:10:00.470Z","repository":{"id":75242524,"uuid":"162663147","full_name":"poulad/Event-Sourced-Counter","owner":"poulad","description":"Trying out Event Sourcing design","archived":false,"fork":false,"pushed_at":"2019-01-03T05:08:54.000Z","size":1303,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T12:47:10.294Z","etag":null,"topics":["angular","asp-net-core","blazor","cqrs","event-driven","event-sourcing","eventstore","mongodb","redis"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poulad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-21T03:54:06.000Z","updated_at":"2020-05-05T09:11:04.000Z","dependencies_parsed_at":"2023-06-05T20:15:15.203Z","dependency_job_id":null,"html_url":"https://github.com/poulad/Event-Sourced-Counter","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/poulad%2FEvent-Sourced-Counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poulad%2FEvent-Sourced-Counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poulad%2FEvent-Sourced-Counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poulad%2FEvent-Sourced-Counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poulad","download_url":"https://codeload.github.com/poulad/Event-Sourced-Counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245476718,"owners_count":20621698,"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":["angular","asp-net-core","blazor","cqrs","event-driven","event-sourcing","eventstore","mongodb","redis"],"created_at":"2024-10-15T03:44:35.684Z","updated_at":"2025-12-30T22:48:25.020Z","avatar_url":"https://github.com/poulad.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Sourced Counter\n\nTrying out [Event Sourcing] design\n\n## Design\n\n![Diagram](./design-diagram.png)\n\n## Run\n\n```sh\n# run an instance of Event Store in the background\ndocker run --detach --name esc-eventstore --publish 2113:2113 --publish 1113:1113 eventstore/eventstore\n\n# run an instance of Mongo in the background\ndocker run --detach --name esc-mongo --publish 27017:27017 mongo\n\n# docker rm -fv esc-eventstore esc-mongo\n```\n\n```sh\n# run the web API\ncd ./EventSourcedCounter/\ndotnet run\n```\n\n```sh\n# start a new counter \"foo\"\ncurl -X POST --data '' \"http://localhost:5005/api/counters/foo\"\n\n# get value for counter \"foo\"\ncurl -X GET \"http://localhost:5005/api/counters/foo\"\n\n# increment it by 1 and then by 3\ncurl -X PATCH \"http://localhost:5005/api/counters/foo\"\ncurl -X PATCH \"http://localhost:5005/api/counters/foo?count=3\"\n\n# get value for counter \"foo\" again\ncurl -X GET \"http://localhost:5005/api/counters/foo\"\n```\n\n```sh\n# run services\ndocker start esc-eventstore esc-mongo\n```\n\n```sh\n# create 100 counters\nfor i in {1..100}\ndo\n    curl -X POST --data '' \"http://localhost:5005/api/counters/foo$i\"\ndone\n```\n\n```sh\ndocker run --detach --name esc-couchdb --publish 5984:5984 -d couchdb\n```\n\n## Roadmap\n\n- [X] [Event Store]\n- [X] Read Model: [Redis]\n- [ ] Read Model: [Postgres]\n- [X] Read Model: [Mongo]\n- [ ] Read Model: [Neo4j]\n- [ ] Events Replay Tests\n- [ ] Event Store Snapshots\n- [ ] [CQRS] Pattern\n- [ ] [DDD] Pattern\n- [X] Counter Service\n- [X] [ULID]\n- [X] [Identicon] Service\n- [ ] [OpenAPI] Specs Generator\n- [ ] [Swagger UI]\n- [ ] [DocFX] Docs Generator\n- [ ] Code Coverage Report\n- [ ] Code Quality Report\n- [X] [Angular] SPA\n- [X] [Angular Material]\n- [ ] [Docker]ized Services\n- [ ] [Travis-CI] multi-staged builds\n- [ ] Event Store cluster with 3 nodes\n- [ ] [Heroku] Deployments\n- [ ] Performance Tests\n- [ ] [Cucumber] Definitions\n- [ ] System Design Diagrams\n- [ ] Try [PouchDB] in the SPA\n- [ ] Try [Push Notifications] in the SPA\n- [ ] Try [Web Socket] in the SPA\n- [ ] Try [ReactiveX] for Event Handlers\n- [X] Try [Blazor]\n\n[Event Sourcing]: https://www.erikheemskerk.nl/event-sourcing-awesome-powerful-different/\n[Event Store]: https://eventstore.org/\n[Redis]: https://redis.io/\n[Postgres]: https://www.postgresql.org/\n[Mongo]: https://www.mongodb.com/\n[Neo4j]: https://neo4j.com/\n[CQRS]: https://www.martinfowler.com/bliki/CQRS.html\n[DDD]: https://airbrake.io/blog/software-design/domain-driven-design\n[ULID]: https://github.com/ulid/spec\n[Identicon]: https://jdenticon.com/\n[OpenAPI]: https://swagger.io/\n[Swagger UI]: https://swagger.io/tools/swagger-ui/\n[DocFX]: https://dotnet.github.io/docfx/\n[Angular]: https://angular.io/\n[Angular Material]: https://material.angular.io/\n[Docker]: https://www.docker.com/\n[Travis-CI]: https://travis-ci.org/\n[Heroku]: https://www.heroku.com/\n[Cucumber]: http://docs.cucumber.io/\n[PouchDB]: https://github.com/pouchdb/pouchdb\n[Push Notifications]: https://developers.google.com/drive/api/v3/push\n[Web Socket]: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API\n[ReactiveX]: http://reactivex.io/\n[Blazor]: https://blazor.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoulad%2Fevent-sourced-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoulad%2Fevent-sourced-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoulad%2Fevent-sourced-counter/lists"}