An Online Shopping System is a large-scale e-commerce platform that enables users to browse, search, and purchase products from a wide range of categories, all from the convenience of a digital interface.
Products are often sold by multiple sellers, with the platform acting as a central hub for managing listings, payments, logistics, and order fulfillment.
In this chapter, we will explore the low-level design of online shopping system like Amazon in detail.
Let's start by clarifying the requirements:
Before starting the design, it's important to ask thoughtful questions to uncover hidden assumptions and better define the scope of the system.
Here is an example of how a conversation between the candidate and the interviewer might unfold:
Candidate: Should the system support both buyers and sellers, or are we focusing only on the customer-facing side for now?
Interviewer: Let’s focus on the customer-facing side. You can assume that the product catalog is already populated by sellers.
Candidate: Should we support product categories, filters, and search functionality for browsing the catalog?
Interviewer: Yes, users should be able to search products by name and apply filters such as category, price range, brand, and rating.
Candidate: Do we need to support features like cart management and order history?
Interviewer: Yes, customers should be able to add products to their cart, remove them, and view past orders.
Candidate: Should we handle real-time inventory updates and stock validation during checkout?
Interviewer: Yes, the system should validate inventory before confirming an order and update it accordingly after the purchase.
Candidate: Are we implementing payment processing and delivery tracking?
Interviewer: For this version, assume payment is handled externally and is always successful. Delivery tracking is not required.
Candidate: Should we allow users to leave reviews and ratings for products?
Interviewer: Not in this version. Let’s skip reviews and focus on browsing, ordering, and cart management.
After gathering the details, we can summarize the key system requirements.