Home
← All questions

Design e-commerce product listing page | Frontend System Design

HardPremiumSystem Design

Asked at Amazon · Shopify · Walmart

Frontend System Design interview practice: Frontend system design for PLP with filters, sort, skeleton loading, and SEO.

Problem

Design the frontend of an e-commerce product listing page (PLP): a category such as "Running shoes" shown as a grid of product cards that shoppers narrow down with filters (brand, size, colour, price, rating) and sorting, then add to the cart without leaving the page.

It looks like a simple grid, but interviewers use it to test rendering for search engines and speed, URL and state design, filter behaviour under fast clicking, caching a public page that also shows personal data, Core Web Vitals, and getting the cart exactly right.

Functional requirements

  • Browse a category as a grid of product cards, with sorting and more products on demand.
  • Filter by brand, size, colour, price and rating, with counts on every option and a URL that can be shared.
  • Quick add a product to the cart from its card (pick a size, see the mini cart update).
  • Open a product and come back to the same place in the list.

Constraints

  • Categories from 50 to about 5,000 products, and sales that bring tens of thousands of shoppers to one category at once.
  • About 60% of visitors arrive from search engines and ads, mostly on mid-range phones: the first product image must show within 2.5 seconds.
  • Nothing may jump while the page loads or filters apply, and every click must respond within 200 ms.
  • Prices and stock may be a minute old on the listing, but the cart must always be exact.
  • Accessible to WCAG 2.2 AA: keyboard, screen reader and touch, including every filter.

Discussion areas

  • Core entities and key actions: what the category, the query, a results page, a product summary, a facet and the cart are, and which shopper actions shape the design.
  • Rendering and caching: where the page should be rendered, how to cache a public page that also shows a personal cart, and how fresh it must be.
  • URL and state: where filter, sort and page state should live, and how links, refresh and the Back button should behave.
  • SEO: which listing URLs search engines should crawl and index, and which they shouldn't.
  • Filters and counts: how option counts should behave when several options are selected, and what to do with options that have no results.
  • Loading more: pagination, infinite scroll or "Load more", and their effect on search engines, the footer and the shopper's place.
  • Fast filtering: keeping the page responsive and correct when shoppers click filters quickly.
  • API: the endpoints for results, filters and the cart, and whether the page needs live updates.
  • Quick add and errors: making add to cart feel instant without ever being wrong, and which failures to retry.
  • Performance, analytics and accessibility: stable cards, the first image, measuring what shoppers saw, A/B tests, and using the filters without a mouse.

Follow-up questions interviewers ask

  • Why server-render instead of a client-side app?
  • Should every filter combination be indexable?
  • Pagination, infinite scroll or "Load more"?
  • Why write the URL parameters in a fixed order?
  • What if two responses arrive out of order?
  • How do facet counts work when two brands are selected?
  • How do you show a cart count on a CDN-cached page?
  • How does Back from a product page restore the list?
Premium question

Unlock the full model solution for this question with Mentoxis Premium.

Unlock with Premium