How lateef10/infyshopmicroservice works
Main Components
• Web Front-End – Represented by the InfShop.Web project, which provides the user interface (MVC controllers, views, static assets) and interacts with the backend.
• API Gateway – Represented by InfyShop.GatewaySolution (likely using Ocelot) to centrally route requests from the web application to the various microservices.
• Microservices – Each service should be shown as an independent component:
– CouponAPI (InfyShop.CouponAPI): Handles coupon validation and related logic.
– OrderAPI (InfyShop.OrderAPI): Manages orders and messages for checkout.
– PaymentAPI (InfyShop.PaymentAPI): Processes payments (with integration to payment processing components such as InfyShop.PaymentProcessor).
– ProductAPI (InfyShop.ProductAPI): Manages product data.
– ShoppingCartAPI (InfyShop.ShoppingCartAPI): Handles shopping cart operations.
– Identity Service (InfyShop.Identity): Provides authentication and authorization, along with identity management (including IdentityServer configuration and related views/controllers).
• Message Bus – Shown via the InfyShop.MessageBus and messaging components in OrderAPI and PaymentAPI that use Azure Service Bus and RabbitMQ. This illustrates the asynchronous communication (publishing/subscribing patterns) between microservices.
• Shared Libraries – Components like InfyShop.Common and parts of the messaging libraries should be noted as shared or common infrastructural pieces.
• Databases – Although not a separate “service” in the file tree, each API includes its own DbContexts and Migrations. Indicate individual persistence stores or denote a shared database strategy if applicable.
• Deployment Infrastructure – Represent Docker (Dockerfiles per project), Kubernetes manifests (YAML files in AzureKubernetes, Kubernetes Local, and manifests folders), and CI/CD pipelines (the Pipelines folder and build status badges in the README).
Relationships and Interactions
• The API Gateway then routes requests to the corresponding backend microservices (Coupon API, Order API, etc.).
• Authentication and Authorization requests flow from the front-end (and perhaps from the Gateway as well) to the Identity Service.
Architectural Patterns and Technologies
• Microservices Architecture – Emphasize that each microservice (with its own codebase, database context, and Dockerfile) is independently deployed.
• API Gateway Pattern – InfyShop.GatewaySolution stands as the single entry point for client requests.
• Domain-Driven Design – The project is partitioned by business capabilities (coupons, orders, products, etc.).
• Messaging/Asynchronous Communication – Use of a dedicated Message Bus (Azure Service Bus or RabbitMQ implementations) to decouple services.
• Containerization and Orchestration – Docker, Kubernetes, and deployment manifests are used for scalability and resilient deployment.
• CI/CD Integration – Pipelines defined in the Pipelines directory show build and deployment automation.