Skip to content
SD-53 · System design

Design a Parts Compatibility

Asked at Mid level45 minutes
Our answers stay hidden until you reveal them.

Design the parts compatibility feature of an online store that sells car parts. A shopper picks their vehicle once, by year, make, model and engine or by typing its VIN, and saves it to a garage. From then on, search and category pages show only parts that fit that vehicle, and every product page says clearly whether the part fits, does not fit, or fits with a condition such as “only with 16-inch wheels”.

The catalogue has 50 million parts and 150,000 vehicle configurations. Suppliers describe which vehicles a part fits with about 300 million rules, such as “2015 to 2019, 1.5 L and 2.0 L engines, except hybrid”, which expand to about 2 billion part–vehicle pairs. 20 million shoppers a day make 10,000 requests a second at peak and 30,000 at a holiday sale. The hard parts: the many-to-many data is huge, supplier feeds change daily and are often wrong, and every wrong “it fits” becomes a return.

Good questions to ask first

Decide what you would assume for each before you look at ours.

  1. 1What counts as a vehicle?
  2. 2Where does fitment data come from?
  3. 3How exact must answers be?
  4. 4Do shoppers need accounts?
  5. 5How fresh must changes be?
  6. 6Do we handle conditions like wheel size or trim?
  7. 7Is this only for cars?
  8. 8Do we rank results?

How to spend the 45 minutes

  1. 5minPart 1: Requirements and scope
  2. 5minPart 2: Estimates
  3. 5minPart 3: API
  4. 15minPart 4: Architecture, stage by stage
  5. 15minPart 5: Deep dives and trade-offs
Sketch your own design: boxes, arrows and the numbers that matter. Then compare it with ours.Break it in the labVisual walkthrough