AlgoMaster Logo

Design Online Shopping System like Amazon

Ashish

Ashish Pratap Singh

hard

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.

Amazon

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:

1. Clarifying 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:

After gathering the details, we can summarize the key system requirements.

1.1 Functional Requirements

  • Allow users to browse and search products by name and category
  • Enable users to view product details (title, description, price, availability)
  • Support adding and removing items in a shopping cart
  • Allow users to place orders from items in the cart
  • Validate inventory before confirming orders and update stock upon purchase
  • Allow users to view past orders
  • Support integration with multiple payment gateways (assume payment is always successful in this version)

1.2 Non-Functional Requirements

  • Modularity: The system should consist of well-separated components
  • Extensibility: The design should allow for future features like seller dashboards, product reviews, wishlists, and delivery tracking
  • Consistency: Inventory and order placement should be transactionally consistent to avoid overselling
  • Maintainability: The code should be organized, testable, and easy to extend

2. Identifying Core Entities

Premium Content

This content is for premium members only.