How zehraseren/multishopproject works
Project type and purpose
• This is a .NET-based, microservices e-commerce platform (“MultiShopProject”) that uses:
• An API Gateway (Ocelot)
• A federated IdentityServer for authentication/authorization
• Multiple bounded-context microservices (Basket, Cargo, Catalog, Comment, Discount, Image, Message, Order, Payment, RabbitMQ messaging API, SignalR real-time API)
• A monolithic Web UI (MS.WebUI) and a DTO layer for client-server models
High-level architectural components
a. Client/UI layer
• MS.WebUI: ASP.NET Core MVC Razor front-end
• RapidApi/MS.RapidApiWebUI: sample Razor UI calling public endpoints
b. API Gateway
• MS.OcelotGateway: single entry point, routes incoming requests
c. Identity & Security
• MS.IdentityServer: issues and validates JWT tokens
d. Microservices
• Basket (uses Redis)
• Cargo (SQL via EF Core)
• Catalog (MongoDB)
• Comment (SQL via EF Core)
• Discount (Dapper/SQL)
• Image (CloudStorage: e.g. Google Cloud Storage)
• Message (SQL via EF Core)
• Order (CQRS + Mediator + SQL)
• Payment (placeholder service)
• RabbitMQMessageApi (RabbitMQ producer/consumer)
• SignalRRealTimeApi (SignalR hubs for comments/messages)
e. Data stores & external systems
• Redis for basket caching
• MongoDB for catalog data
• SQL databases for most services
• RabbitMQ message broker
• Cloud storage (GCS) for images
Relationships and interactions
• All clients → HTTP(S) → API Gateway → downstream microservices
• MS.WebUI attaches JWT token to outbound requests via DelegatingHandlers
• Gateway forwards to IdentityServer for /connect/token or to services for business APIs
• Microservices validate tokens against IdentityServer’s JWKS endpoint
• Basket service caches state in Redis
• Catalog service uses MongoDB collections
• Order service implements internal CQRS/Mediator, persists in SQL DB
• Discount, Cargo, Comment, Message each own their SQL schema/migration
• RabbitMQMessageApi publishes/subscribes to RabbitMQ for async events
• SignalR hub pushes real-time updates to clients over WebSockets
Architectural patterns / principles
• Microservices (bounded contexts)
• API Gateway
• Token-based security (OAuth2/OIDC)
• CQRS + Mediator (Order service)
• Repository/Unit-of-Work via EF Core / Dapper / MongoDB abstractions
• DTO layers in UI to decouple client models
• Pub/Sub messaging (RabbitMQ)
• Real-time push (SignalR)