This e-commerce platform is designed with a microservice architecture to ensure scalability, flexibility, and maintainability. Each service focuses on a specific domain, including user authentication, product management, shopping cart, orders, coupons, and rewards. Services communicate asynchronously using RabbitMQ or Azure Service Bus. Ocelot serves as the API Gateway for routing, and Stripe handles secure payment processing. The system is built using ASP.NET Core and SQL Server for data storage, with integration for rewarding users post-purchase.
The Front end repo can be found at: https://github.com/anhdo1896/ecommerce-reactjs
Backend Framework
: ASP.NET CoreMessage Queue
: RabbitMQ, Azure Service Bus (for message-driven communication)API Gateway
: OcelotPayment Gateway
: Stripe (for payment processing)Database
: SQL Server
Each microservice will have its own SQL Server database to ensure that each domain is separated for better scalability and maintainability.
AuthAPI
: Stores user accounts, roles, and tokens.ProductAPI
: Stores product, category, and brand data.CouponAPI
: Stores coupon codes and discount information.CartAPI
: Stores user-specific cart data.OrderAPI
: Tracks orders, payments, and statuses.RewardAPI
: Tracks rewards and user-specific points or discounts.
Responsibilities:
- User authentication and role management.
- JWT token generation for secure API access.
- Controllers: Handle login, registration, and role assignment.
- Identity Framework: For managing user roles and secure password hashing.
Responsibilities: Manage products, categories, brands, and product photos.
Responsibilities:
- Manage discount coupons that users can apply to orders.
Responsibilities:
- Manage shopping carts for users, allowing them to add, update, and remove items.
Responsibilities:
- Handle the creation of orders and manage payments via Stripe.
Responsibilities:
- Reward users for successful purchases by giving them points or discounts.
Responsibilities:
- Send email notifications to users for account actions, order confirmations, and reward updates.
Controllers: Queue and send emails for various events. RabbitMQ or Azure Service Bus: For asynchronous email processing.
Responsibilities:
- Facilitate communication between services through RabbitMQ or Azure Service Bus.
- Ensure services are decoupled and operate asynchronously.
Responsibilities:
- Serve as the entry point for all API requests and route them to the appropriate microservice.
- Secure all routes using JWT tokens.
Live Demo
: Demo