-
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Truong Le Vinh Phuc edited this page Jun 21, 2025
·
1 revision
This page provides an overview of the Cloud-Native E-commerce Platform architecture.
The platform follows a microservices architecture with clean separation of concerns. Each microservice is built using Clean Architecture principles and is deployed as a containerized application in Kubernetes.
- Angular Frontend: Modern responsive UI built with Angular
- Single Page Application: Communicates with backend through API Gateway
- Ocelot API Gateway: Routes client requests to appropriate microservices
- Authentication & Authorization: Centralized security policies
- Request Aggregation: Combines multiple service responses
- Rate Limiting & Load Balancing: Traffic management
Each microservice follows Clean Architecture with these layers:
- API Layer: Controllers and external interfaces
- Application Layer: Business workflows and application logic
- Core/Domain Layer: Business entities and rules
- Infrastructure Layer: Technical implementations and external concerns
- Purpose: Product catalog management
- Database: MongoDB (document store)
- Key Features: Product CRUD, category management, search
- Purpose: Shopping cart management
- Database: Redis (in-memory)
- Key Features: Cart persistence, item management
- Purpose: Product discount management
- Database: PostgreSQL
- Key Features: Discount rules, coupon codes
- Purpose: Order processing and management
- Database: SQL Server
- Key Features: Order creation, status tracking, history
- RabbitMQ: Event-driven communication between services
- Event Types: BasketCheckout, OrderCreated, etc.
- MongoDB: Document database for catalog
- Redis: In-memory database for basket
- PostgreSQL: Relational database for discounts
- SQL Server: Relational database for orders
- Elasticsearch: Log aggregation
- Kibana: Log visualization
- Prometheus: Metrics collection
- Grafana: Metrics visualization
- Jaeger: Distributed tracing
- REST APIs: Service-to-service direct HTTP calls
- gRPC: High-performance RPC for specific services
- Event-Driven: Services publish and subscribe to events
- Message Broker: RabbitMQ handles message distribution
- Docker: All components packaged as containers
- Docker Compose: Local development environment
- Kubernetes: Container orchestration platform
- Helm Charts: Package management for Kubernetes
- Istio: Service mesh for advanced networking
- GitHub Actions: Continuous Integration
- Automated Tests: Unit, integration, and end-to-end tests
- Deployment Automation: Automated deployment to Kubernetes
- Clean Architecture: Separation of concerns
- CQRS: Command Query Responsibility Segregation
- Repository Pattern: Data access abstraction
- Mediator Pattern: Request/response handling
- Circuit Breaker: Fault tolerance
- Saga Pattern: Distributed transactions
- Authentication: JWT-based authentication
- Authorization: Role-based access control
- API Security: Rate limiting, input validation
- Network Security: Service mesh encryption
- Data Protection: Encrypted storage
- Horizontal Scaling: Each microservice can scale independently
- Stateless Design: Services designed for horizontal scaling
- Database Scaling: Appropriate database choices for each service
- Caching Strategy: Redis for high-performance caching