{"id":21694257,"url":"https://github.com/kadirdemirkaya/saga-pattern","last_synced_at":"2026-05-19T02:56:11.469Z","repository":{"id":217533182,"uuid":"701486448","full_name":"kadirdemirkaya/Saga-Pattern","owner":"kadirdemirkaya","description":"Saga pattern is an event-based sample project for a microservice in this project.","archived":false,"fork":false,"pushed_at":"2024-02-26T14:26:30.000Z","size":13153,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T13:41:55.934Z","etag":null,"topics":["masstransit","saga-choreograph-pattern","saga-orchestration","saga-pattern","sqlserver"],"latest_commit_sha":null,"homepage":"","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/kadirdemirkaya.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":"2023-10-06T18:34:05.000Z","updated_at":"2025-01-09T14:26:10.000Z","dependencies_parsed_at":"2024-11-25T18:45:48.862Z","dependency_job_id":null,"html_url":"https://github.com/kadirdemirkaya/Saga-Pattern","commit_stats":null,"previous_names":["kadirdemirkaya/sagapattern","kadirdemirkaya/saga-pattern"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FSaga-Pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FSaga-Pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FSaga-Pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FSaga-Pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadirdemirkaya","download_url":"https://codeload.github.com/kadirdemirkaya/Saga-Pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244628930,"owners_count":20484080,"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":["masstransit","saga-choreograph-pattern","saga-orchestration","saga-pattern","sqlserver"],"created_at":"2024-11-25T18:27:33.330Z","updated_at":"2026-05-19T02:56:11.434Z","avatar_url":"https://github.com/kadirdemirkaya.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saga Pattern\n\nThis project was done by using two different types (EventChoreography, Orchestration) in accordance with the saga pattern rules.\n\n## EventChoreography\n\n###### Event choreography is a model that describes the interaction of individual services in a system. Services use events to communicate with each other and coordinate operations.\n\n- Projects inside\n    - BasketAPI\n    - OrderAPI\n    - PaymentAPI\n    - StockAPI\n    - SharedLIBRARY\n\n## Orchestration\n\n###### Orchestration is a model that centrally manages and coordinates operations in a system. A master service or orchestrator directs other services and performs operations in a specified order and according to rules\n\n- Projects inside\n    - BasketAPI\n    - OrderAPI\n    - PaymentAPI\n    - SharedLIBRARY\n    - StateMachineWorkerService\n    - StockAPI\n\n## Run on Your Computer\n\nClone the project\n\n```bash\n  git clone https://github.com/kadirdemirkaya/SagaPattern.git\n```\n\nMake your own changes to the .json file\n\n```bash\n  appsettings.json\n  appsettings.Development.json\n```\n\nGo to the project directory of the API projects and create a migration\n\n```bash\n  cd BasketAPI\n  cd OrderAPI\n  ...\n```\n\nThen enter the directory of all api projects and stand up the server\n\n```bash\n  dotnet run\n```\n\n## Features\n\n- Basket is created and data is sent in BasketAPI\n- OrderAPI receives cart data and, depending on the situation, cancels or sends data for stock control\n- If the stock is sufficient, data will be sent again for payment or canceled\n- If the payment is made successfully in PaymentPI, the data is confirmed in the database or canceled in all services.\n- The common library contains the data that all API services will use.\n- MSSQL was used for all these operations\n- The same events are handled in two different ways (EventChoreography and Orchestration)\n\n## Project Template\n\n![orchestration](https://github.com/kadirdemirkaya/SagaPattern/assets/126807887/7acd7f90-324e-47c3-8ce3-f7a0178b581f)\n\n![Choreography](https://github.com/kadirdemirkaya/SagaPattern/assets/126807887/4aec6b76-2093-460b-bd7d-5d641347680d)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fsaga-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadirdemirkaya%2Fsaga-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fsaga-pattern/lists"}