{"id":26213003,"url":"https://github.com/mnzcrsh/microservices-gunstock-processing","last_synced_at":"2026-05-25T10:31:54.551Z","repository":{"id":272048258,"uuid":"915374652","full_name":"MnzCrsh/microservices-gunstock-processing","owner":"MnzCrsh","description":"Sorrowful attempts at distributed system with event-driven design and plug-in based microservices","archived":false,"fork":false,"pushed_at":"2025-02-17T22:10:45.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T09:16:12.533Z","etag":null,"topics":["cqrs","event-sourcing","kafka","postgresql","redis-cache","saga-pattern"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/MnzCrsh.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":"2025-01-11T17:22:21.000Z","updated_at":"2025-02-22T19:50:27.000Z","dependencies_parsed_at":"2025-01-11T18:30:47.951Z","dependency_job_id":"c001e548-862a-4cb6-82d7-0a9f9e260404","html_url":"https://github.com/MnzCrsh/microservices-gunstock-processing","commit_stats":null,"previous_names":["mnzcrsh/microservices-order-organstock-processing","mnzcrsh/microservices-gunstock-processing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MnzCrsh%2Fmicroservices-gunstock-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MnzCrsh%2Fmicroservices-gunstock-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MnzCrsh%2Fmicroservices-gunstock-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MnzCrsh%2Fmicroservices-gunstock-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MnzCrsh","download_url":"https://codeload.github.com/MnzCrsh/microservices-gunstock-processing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243188236,"owners_count":20250457,"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","event-sourcing","kafka","postgresql","redis-cache","saga-pattern"],"created_at":"2025-03-12T09:16:14.296Z","updated_at":"2025-12-25T10:18:00.664Z","avatar_url":"https://github.com/MnzCrsh.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices Architecture with CQRS, Event Sourcing, and Saga Pattern\n\n[![order-service-pipeline](https://github.com/MnzCrsh/microservices-order-organstock-processing/actions/workflows/order-service-pipeline.yml/badge.svg)](https://github.com/MnzCrsh/microservices-order-organstock-processing/actions/workflows/order-service-pipeline.yml) [![order-service-deployment](https://github.com/MnzCrsh/microservices-order-organstock-processing/actions/workflows/order-service-deployment.yml/badge.svg?branch=master)](https://github.com/MnzCrsh/microservices-order-organstock-processing/actions/workflows/order-service-deployment.yml)\n\nThis project demonstrates a microservices architecture using CQRS, Event Sourcing, Apache Kafka, and the Saga pattern. It simulates a simple order processing system with payment handling, event-driven architecture, and compensating transactions in case of failures.\n\n## High-Level Architecture\n\nThe diagram below shows the interaction between services in the system:\n\n```mermaid\ngraph TD\n    subgraph Client\n        A[Client] --\u003e|Create Order Command| B[Order Service]\n        A --\u003e|Fetch Order Query| B\n    end\n\n    subgraph Order\n        B[Order Service] --\u003e|OrderCreatedEvent| C[Payment Service]\n        B --\u003e|OrderPaidEvent| A\n    end\n\n    subgraph Payment\n        C[Payment Service] --\u003e|Process Payment Command| D[Payment Gateway]\n        D[Payment Gateway] --\u003e|PaymentProcessedEvent| C\n        C --\u003e|PaymentProcessedEvent| B\n    end\n\n    subgraph Saga Orchestrator\n        E[Cancel Order Command] --\u003e|OrderCancelledEvent| B\n        F[Cancel Payment Command] --\u003e|PaymentCancelledEvent| C\n    end\n\n    subgraph Kafka_Event_Bus\n        B -.-\u003e|OrderCreatedEvent| Kafka[Kafka]\n        C -.-\u003e|PaymentProcessedEvent| Kafka\n        D -.-\u003e|PaymentProcessedEvent| Kafka\n        Kafka -.-\u003e|OrderPaidEvent| A\n        Kafka -.-\u003e|PaymentCancelledEvent| C\n        Kafka -.-\u003e|OrderCancelledEvent| B\n    end\n\n    subgraph Event storage\n        G[Event Store] --\u003e|OrderCreatedEvent| B\n        G --\u003e|PaymentProcessedEvent| C\n    end\n\n    subgraph Integration\n        A -.-\u003e|Send Events| Kafka\n        Kafka -.-\u003e|Events| B\n        Kafka -.-\u003e|Events| C\n    end\n\n    B -.-\u003e|Handle Events| E\n    C -.-\u003e|Handle Events| F\n\n    %% Event refs\n    B --\u003e|OrderCreatedEvent| G\n    C --\u003e|PaymentProcessedEvent| G\n    B --\u003e|OrderPaidEvent| Kafka\n    C --\u003e|PaymentProcessedEvent| Kafka\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnzcrsh%2Fmicroservices-gunstock-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnzcrsh%2Fmicroservices-gunstock-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnzcrsh%2Fmicroservices-gunstock-processing/lists"}