How abdelrahmanmohy98/e-commerce-microservices works
This repository is an ASP.NET Core e-commerce microservices system. Its principal workflow routes a shopper’s API request through the gateway to a service that performs a domain operation and returns a response; order, inventory, and payment capabilities also support asynchronous processing. The graph preserves the major documented service areas and shared messaging/cross-cutting layer. Several service interactions are described only in the README, so those links are dashed; sampled source confirms selected query, persistence, and HTTP call paths.
Main entry points: Program.cs API Gateway · InventoryController.cs Stock management · PaymentsController.cs Payments · ResponseHandler.cs Shared responses
Components 22
API entry
- API Gateway
src/ApiGateWay/ApiGateWay.Api/Program.cs
Commerce services
- Product catalog
src/ProductService/ProductService.Api/Controllers/ProductsController.cs - Product queries
src/ProductService/ProductService.Application/Handlers/ProductQueryHandler.cs - Stock management
src/InventoryService/InventoryService.Api/Controllers/InventoryController.cs - Stock queries
src/InventoryService/InventoryService.Application/Handlers/InventoryQueryHandler.cs - Shopping cart
src/CartService/CartService.Api/Controllers/CartsController.cs - Cart queries
src/CartService/CartService.Application/Handlers/CartQueryHandler.cs - Order processing
src/OrderService/OrderService.Api/Controllers/OrdersController.cs - Payments
src/PaymentService/Payment.Api/Controllers/PaymentsController.cs - Wishlists
src/WishListService/WishlistService.Api/Controllers/WishlistsController.cs - Wishlist queries
src/WishListService/WishlistService.Application/Handlers/WishlistQueryHandler.cs
Identity service
- Authentication
src/AuthService/Auth.Api/Controllers/AccountController.cs - Identity workflows
src/AuthService/Auth.Application/Handlers/AuthHandler.cs - Auth integrations
src/AuthService/Auth.Infrastructure/Services/JwtService.cs
Shared platform
- Message broker
src/SharedService/Shared/Messaging/RabbitMQMessageBroker.cs - Shared responses
src/SharedService/Shared/Bases/ResponseHandler.cs - Redis cache
src/SharedService/Shared/RedisCache/CacheService.cs - Service databases
src/SharedService/Shared/BaseDbContext.cs
Other components
- Client
- Google login
- Email service
- Payment provider
Connections 29
- Client → API Gateway: sends requests
- API Gateway → Product catalog: routes requests
- API Gateway → Shopping cart: routes requests
- API Gateway → Order processing: routes requests
- API Gateway → Stock management: routes requests
- API Gateway → Payments: routes requests
- API Gateway → Wishlists: routes requests
- API Gateway → Authentication: routes requests
- Product catalog → Product queries: dispatches queries
- Product queries → Stock management: requests stock
src/ProductService/ProductService.Application/Handlers/ProductQueryHandler.cs - Stock management → Stock queries: dispatches queries
- Stock queries → Service databases: reads stock
- Shopping cart → Cart queries: dispatches queries
- Cart queries → Service databases: reads carts
- Order processing → Payments: validates payment
- Order processing → Message broker: publishes events
- Payments → Message broker: publishes results
- Payments → Payment provider: processes transactions
- Stock management → Message broker: subscribes events
- Wishlists → Wishlist queries: dispatches queries
src/WishListService/WishlistService.Api/Controllers/WishlistsController.cs - Wishlist queries → Service databases: reads wishlists
- Wishlists → Redis cache: uses cache
- Authentication → Identity workflows: dispatches commands
src/AuthService/Auth.Api/Controllers/AccountController.cs - Identity workflows → Auth integrations: uses auth services
- Identity workflows → Email service: sends email
- Google login → Authentication: authenticates
- Shared responses → Product queries: formats responses
src/ProductService/ProductService.Application/Handlers/ProductQueryHandler.cs - Shared responses → Stock queries: formats responses
src/InventoryService/InventoryService.Application/Handlers/InventoryQueryHandler.cs - Shared responses → Wishlist queries: formats responses
src/WishListService/WishlistService.Application/Handlers/WishlistQueryHandler.cs