{"id":19656767,"url":"https://github.com/daggerok/event-sourced-user-management","last_synced_at":"2026-04-15T12:36:47.293Z","repository":{"id":151041538,"uuid":"202914843","full_name":"daggerok/event-sourced-user-management","owner":"daggerok","description":"Status: IN PROGRESS. CQRS and event sourcing using plain embedded into jdk com.sun.net.httpserver with dynamic groovy spock tests","archived":false,"fork":false,"pushed_at":"2019-08-18T23:56:28.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T14:41:21.874Z","etag":null,"topics":["cqrs","cqrs-es","es","event-sourcing","eventsourcing","eventstore","fatjar","gradle-groovy-dsl","groovy","spock","spock-framework","spock-groovy","spock-tests"],"latest_commit_sha":null,"homepage":"","language":"Java","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/daggerok.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":"2019-08-17T17:52:35.000Z","updated_at":"2019-11-26T00:16:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"d17f774b-4fda-48f3-9b4d-d7fd7614c722","html_url":"https://github.com/daggerok/event-sourced-user-management","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daggerok/event-sourced-user-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fevent-sourced-user-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fevent-sourced-user-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fevent-sourced-user-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fevent-sourced-user-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/event-sourced-user-management/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fevent-sourced-user-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T11:29:19.690Z","status":"ssl_error","status_checked_at":"2026-04-15T11:29:19.171Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","cqrs-es","es","event-sourcing","eventsourcing","eventstore","fatjar","gradle-groovy-dsl","groovy","spock","spock-framework","spock-groovy","spock-tests"],"created_at":"2024-11-11T15:28:50.311Z","updated_at":"2026-04-15T12:36:47.249Z","avatar_url":"https://github.com/daggerok.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CQRS and event sourcing app [![Build Status](https://travis-ci.org/daggerok/event-sourced-user-management.svg?branch=master)](https://travis-ci.org/daggerok/event-sourced-user-management)\nCQRS and event sourcing using plain embedded into jdk `com.sun.net.httpserver` with dynamic groovy spock tests\n\n## TL;DR\nthis is an example of event sourced system I'm using for teaching my students, so please, don't even try \nuse it in production: Also read: [Why Developers Should Not Write Programs That Call 'sun' Packages](https://www.oracle.com/technetwork/java/faq-sun-packages-142232.html)\n\nStatus: in progress...\n\nRoadMap:\n- ~~Setup Gradle / Groovy repository with Spring IoC dependency injection and Spock test framework~~\n- ~~Implement REST API with plain java embedded http server~~\n- ~~Implement basic REST API info and shutdown endpoints~~\n- ~~Implement and cover with tests User Account aggregate functionality~~\n- ~~Implement and cover with tests User Account aggregate repository functionality~~\n- ~~Implement user-account REST API endpoints~~\n- ~~Implement Friend Request aggregate functionality~~\n- ~~Implement Friend Request aggregate repository functionality~~\n- Implement friend-request REST API endpoints\n- Implement messenger aggregate functionality\n- Implement messenger aggregate repository functionality\n- Implement messenger REST API endpoints\n- Implement async PubSub / Queue functionality to decouple direct REST API calls from aggregate repository\n- Introduce read (query) side to avoid non efficient event sourcing repository querying\n- Split current REST API into CQRS for eventual consistency and projections efficiency\n- Implement CLI interface which is going to be interact with REST API by using CQRS\n- Prepare future RoadMap for EventStore persistence introduction:\n  - MapDB\n  - JDBC\n  - JPA\n  - Spring Data\n  - NoSQL\n  - etc...\n- Prepare future RoadMap for PubSub introduction:\n  - plain pub-sub patter implementation\n  - simple im-memory pub-sub solution from Google or Android library\n  - Using spring application events\n  - Kafka\n\n\u003c!--\n\n_run kafka_\n\n```bash\nrm -rf /tmp/c ; git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git /tmp/c\ndocker-compose -f /tmp/c/examples/kafka-single-node/docker-compose.yml up -d\ndocker-compose -f /tmp/c/examples/kafka-single-node/docker-compose.yml down -v --rmi local\n```\n\n_run app and test_\n\n```bash\n./gradlew run\n\nhttp :8080/api/v1/messages message=hello\nhttp :8080/api/v1/messages message=world\nhttp :8080/api/v1/messages\nhttp :8080\n```\n\n--\u003e\n\n**NOTE:** _For better developer experience during testing, use idea cURL integration tests from `rest-client*` files. Read more: https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html_\n\n## why?\n\njust see how everything is clear in next analitics:\n\n```yaml\nevents:\n- OrderCreated(id=123)\n- ItemAdded(product=Bose Headphones, price=400)\n- FollowSimilarItemsLink(product=Sony Headphones)\n- AccessReviews()\n- VoteReviewHelpful(answer=5/5)\n- ItemAdded(product=Sony Headphones, price=450)\n- ItemRemoved(product=Bose Headphones, price=400)\n- OrderConfirmed()\n- OrderShipped()\n```\n\nresources:\n\n* [@Log4l2](https://logging.apache.org/log4j/2.x/maven-artifacts.html)\n\n\u003c!--\n\n* [YouTube: Building Event Driven Systems with Spring Cloud Stream](https://www.youtube.com/watch?v=LvmPa7YKgqM\u0026t=2673s)\n* [YouTube: 2018-10 Advanced Microservices Patterns: CQRS and Event Sourcing](https://www.youtube.com/watch?v=W_wySQ0lTI4\u0026t=1448s)\n\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fevent-sourced-user-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fevent-sourced-user-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fevent-sourced-user-management/lists"}