{"id":27341439,"url":"https://github.com/hemmatiali/ordermanagementsystem","last_synced_at":"2026-05-16T08:04:52.584Z","repository":{"id":287543024,"uuid":"939928415","full_name":"Hemmatiali/OrderManagementSystem","owner":"Hemmatiali","description":"A simple .NET 8 implementation of the Pub/Sub design pattern using MediatR, following Clean Architecture and CQRS principles. Demonstrates event publishing with one event and three consumers. Includes solid software practices such as validation, error handling, and a generic repository pattern.","archived":false,"fork":false,"pushed_at":"2025-04-12T12:33:51.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T16:13:13.237Z","etag":null,"topics":["api-rest","clean-architecture","cqrs","csharp","dotnet","event-driven","events","mediatr","publisher-subscriber-pattern","solid"],"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/Hemmatiali.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,"zenodo":null}},"created_at":"2025-02-27T10:39:32.000Z","updated_at":"2025-04-12T12:33:54.000Z","dependencies_parsed_at":"2025-04-12T11:51:39.608Z","dependency_job_id":null,"html_url":"https://github.com/Hemmatiali/OrderManagementSystem","commit_stats":null,"previous_names":["hemmatiali/ordermanagementsystem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hemmatiali/OrderManagementSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOrderManagementSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOrderManagementSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOrderManagementSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOrderManagementSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hemmatiali","download_url":"https://codeload.github.com/Hemmatiali/OrderManagementSystem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOrderManagementSystem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273649060,"owners_count":25143631,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-rest","clean-architecture","cqrs","csharp","dotnet","event-driven","events","mediatr","publisher-subscriber-pattern","solid"],"created_at":"2025-04-12T16:08:22.835Z","updated_at":"2026-05-16T08:04:52.515Z","avatar_url":"https://github.com/Hemmatiali.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📨 Simple Pub/Sub Event Pattern with MediatR (.NET 8, Clean Architecture)\n\nThis project is a **simple implementation of the Pub/Sub design pattern using MediatR** in a clean and modular way. It demonstrates how to raise and handle domain events within a **Clean Architecture** structure using **CQRS** and **.NET 8**.\n\n---\n\n## 🛠 Tech Stack\n\n- **.NET 8**\n- **Entity Framework Core**\n- **SQL Server**\n- **MediatR**\n- **Clean Architecture** (Domain, Application, Infrastructure, Presentation)\n- **CQRS Pattern**\n\n---\n\n## 📚 Project Structure\n\nThis solution follows the Clean Architecture principles and is divided into the following layers:\n\n- **Domain** – Contains core entities and shared items.\n- **Application** – Handles features related items, events, business logic, MediatR handlers, validators.\n- **Infrastructure** – Implements generic repository and database context using EF Core.\n- **Presentation (API)** – Exposes endpoints and coordinates requests.\n\n---\n\n## ✨ Features\n\n- ✅ Simple **Event Publishing** using MediatR (In memory events).\n- ✅ **One event** and **three separate consumers** (handlers).\n- ✅ **CQRS pattern** for separation of command and query responsibilities.\n- ✅ **Client-side caching** (to be integrated optionally).\n- ✅ **Generic repository** pattern implementation for DB operations.\n- ✅ **Proper error handling** for APIs.\n- ✅ **SOLID principles**, clean code practices, and **inheritance** used across layers.\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- .NET 8 SDK\n- SQL Server\n\n### Run the Project\n\n```bash\ngit clone https://github.com/Hemmatiali/OrderManagementSystem\ncd OrderManagementSystem\ndotnet ef database update\ndotnet run --project Presentation\n\n' 🤝 Contributing\n' Feel free to fork the repo, open issues, and submit pull requests to help improve this simple yet powerful pattern demonstration.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemmatiali%2Fordermanagementsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemmatiali%2Fordermanagementsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemmatiali%2Fordermanagementsystem/lists"}