{"id":27219982,"url":"https://github.com/maysam-m-mousa/simpleecommerce","last_synced_at":"2026-05-10T02:48:40.549Z","repository":{"id":281421595,"uuid":"945228410","full_name":"MaysaM-M-Mousa/SimpleECommerce","owner":"MaysaM-M-Mousa","description":"A side project that is meant to build a microservices Event-Driven E-Commerce application and applies Domain-Driven Design whenever possible.","archived":false,"fork":false,"pushed_at":"2025-04-06T15:34:13.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T16:31:10.238Z","etag":null,"topics":["ddd","dotnet","ecommerce","eda","efcore","event-driven","inbox-pattern","masstransit","microservice","outbox","outbox-pattern","postgres","rabbitmq","saga","sagas"],"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/MaysaM-M-Mousa.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":"2025-03-09T00:11:09.000Z","updated_at":"2025-04-05T12:37:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"006b86ab-a9da-4744-a0ee-c9af04eef2e3","html_url":"https://github.com/MaysaM-M-Mousa/SimpleECommerce","commit_stats":null,"previous_names":["maysam-m-mousa/simpleecommerce"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaysaM-M-Mousa%2FSimpleECommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaysaM-M-Mousa%2FSimpleECommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaysaM-M-Mousa%2FSimpleECommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaysaM-M-Mousa%2FSimpleECommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaysaM-M-Mousa","download_url":"https://codeload.github.com/MaysaM-M-Mousa/SimpleECommerce/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248173852,"owners_count":21059595,"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":["ddd","dotnet","ecommerce","eda","efcore","event-driven","inbox-pattern","masstransit","microservice","outbox","outbox-pattern","postgres","rabbitmq","saga","sagas"],"created_at":"2025-04-10T06:50:22.813Z","updated_at":"2026-05-10T02:48:40.508Z","avatar_url":"https://github.com/MaysaM-M-Mousa.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleECommerce\n\n## Introduction\n**SimpleECommerce** is a side project designed to explore Event-Driven Microservices architecture while incorporating Domain-Driven Design (DDD) principles where applicable.\n\n## Services\n\n### Order Service\nThe **Order Service** manages customer orders and their lifecycle. It follows best practices for software architecture and distributed systems:\n* **Architecture**: Implements Clean Architecture for maintainability and separation of concerns.\n* **Domain-Driven Design**:\n  * Defines an **Order** aggregate that manages:\n    *  Creating new orders\n    *  Adding and removing line items\n    *  Cancelling and placing orders\n*  **Event-Driven**: Publishes domain events upon state changes to ensure consistency across services.\n*  **Transactional Outbox Pattern**: Ensures reliable event publishing in distributed environments.\n*  **Integration Events**: Uses integration events for external communication with other services.\n*  **Messaging**: Utilizes **RabbitMQ** for inter-service communication.\n* **Testing**: Implements robust unit testing to ensure service reliability.\n\n### Inventory Service\nThe **Inventory Service** is responsible for stock management and ensuring product availability. It adheres to the following principles:\n* **Architecture**: Implements Clean Architecture for structured and maintainable code.\n* **Domain-Driven Design**:\n  * Defines a **Product** aggregate responsible for:\n    * Reserving stock\n    * Releasing stock\n    * Deducting stock\n* **Event-Driven**: Publishes domain events to notify other services of stock changes.\n* **Transactional Outbox Pattern**: Guarantees reliable event publication.\n* **Integration Events**: Uses integration events for external communication with other services.\n* **Messaging**: Leverages **RabbitMQ** for asynchronous communication.\n* **Testing**: Implements robust unit testing to ensure service reliability.\n* **Saga Pattern**: Implements saga/process managers for handling long-running workflows:\n  * Currently supports the `ReserveStock` saga for coordinated stock reservations.\n* **Inbox Pattern**: Leverages MassTransit's built-in support for inbox pattern for all consumer types (Consumers, Sagas, etc ..)\n\n## Deployment \u0026 Infrastructure\nThe project includes a **Docker Compos**e configuration to simplify local development and deployment. The key components of the system include:\n\n### Microservices\nThe system consists of two containerized services that expose relevant ports for communication:\n* **Inventory Service**\n  * Swagger UI: https://localhost:5000/swagger/index.html\n* **Order Service**\n  * Swagger UI: https://localhost:5003/swagger/index.html\n\n### Database\n* **PostgreSQL**: The primary database for both services, with persistent volume storage to ensure data durability.\n\n### Database Management\n* **PgAdmin**: A web-based interface for managing the PostgreSQL database.\n  * **Access**: http://localhost:5050\n  * **Login Credentials**:\n    * **Email**: `admin@pgadmin.com`\n    * **Password**: `MyStrong!Passw0rd`\n\n### Message Broker\n* **RabbitMQ**: Acts as the message broker for event-driven communication between services.\n  * **Management UI**: http://localhost:15672/\n  * **Login Credentials**\n    * **Username**: `guest`\n    * **Password**: `guest`\n\nWith this setup, all services are containerized and ready for communication within a Dockerized environment, simplifying development and testing workflows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaysam-m-mousa%2Fsimpleecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaysam-m-mousa%2Fsimpleecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaysam-m-mousa%2Fsimpleecommerce/lists"}