Design a Parts Compatibility
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.
- 1What counts as a vehicle?
- 2Where does fitment data come from?
- 3How exact must answers be?
- 4Do shoppers need accounts?
- 5How fresh must changes be?
- 6Do we handle conditions like wheel size or trim?
- 7Is this only for cars?
- 8Do we rank results?
How to spend the 45 minutes
- 5minPart 1: Requirements and scope
- 5minPart 2: Estimates
- 5minPart 3: API
- 15minPart 4: Architecture, stage by stage
- 15minPart 5: Deep dives and trade-offs