How chinh00/cshop works
Main Components
• API/Gateway Layer: Represent YARP as your reverse proxy/gateway component which stands at the entry point for external client requests.
• Microservices: Each of the services (Catalog, Basket, Order, Identity, Notification, Payment, Shipping, Comment, UserManager, Search, and Proxy/AppGateway) should be drawn as individual bounded contexts.
• Shared/Building Blocks: Include an infrastructure or “BuildingBlock” layer that holds shared contracts, domain components, repository abstractions, and integration event definitions.
• Communication Infrastructure: Show Kafka as the central event bus. Include Debezium for CDC and the Schema Registry to indicate how messages are versioned and validated.
• Data Stores: Represent the SQL Server (and possibly MongoDB in some services like Notification or Comment) as the prevalent persistent storage. Note any separate database contexts, outbox tables, migration services etc.
• Caching: Include Redis as the caching layer visible to services that require fast data retrieval.
• Internal Communication: Include gRPC channels (and Minimal APIs) between services handling internal or real-time communication.
Relationships and Interactions
• That each microservice both exposes its own HTTP endpoints (via Minimal Web APIs or gRPC) and communicates asynchronously via Kafka.
• That CDC (Debezium) taps into the SQL Server to publish events into Kafka for other services to consume.
Architectural Patterns and Design Principles
• Use of the Mediator pattern (via MediatR) within services to decouple command/query handling from controllers/services.
• That FluentValidation is plugged into the pipeline for input verification.
• Microservices architecture with a focus on domain-driven design (several services have “Domain”, “Application”, “Infrastructure” folders) as well as integration using event-driven patterns.
Relevant Technologies & Frameworks
• Technologies (Kafka, Debezium, Schema Registry, Redis, YARP, gRPC, Minimal API, Docker Compose).
• For each microservice, if space allows, you might note that they use containerized deployments (Dockerfiles are present) and that they have distinct project structures (separation between Application, Domain, and Infrastructure folders).