0%
Product Architecture Interviews: User Flows, APIs, Data Models, Feeds, Real Time and Privacy
Walkthrough: A Local Marketplace
This walkthrough designs a local marketplace: people list used items such as bikes, sofas and phones, other people nearby search and browse, the two sides message each other, make offers and arrange a sale. It is a classic product architecture prompt because it has two kinds of users with different needs, a search problem with geography and filters, a conversation system, money or at least commitments between strangers, and a constant stream of fraud attempts. We will use the six step framework from the start of the course: requirements and flows, data model, APIs, architecture, product deep dives, and trade offs with a wrap up.
As with every walkthrough in this course, the goal is to show a strong answer, not to describe how any specific company built its marketplace. Interviewers commonly look for clear scoping, a data model that supports the screens, sensible APIs, an architecture that keeps search fresh, and deep dives that show you understand what can go wrong between buyers and sellers.
Restate and pick the core
Restate the prompt: sellers create listings with photos, a price, a category and a location; buyers find listings by searching and filtering near them, view a listing, message the seller and make an offer; a listing ends up sold or removed. Then ask the scoping questions that change the architecture. Is payment handled in the app, or do people meet and pay in person? Is it local only, or can items ship? Are there professional sellers with many listings, or mostly individuals? Is there a review or rating system? For this walkthrough, assume local pickup with optional in app payment, mostly individual sellers, and ratings after a sale. Say you will treat in app payment as one deep dive rather than designing a payment processor, since a payments provider handles card details.
Core user stories
- As a seller, I create a listing with photos, title, price, category, condition and pickup area, and it appears in search within seconds.
- As a buyer, I search by keywords and filter by distance, price range, category and condition, sorted by relevance, newest or distance.
- As a buyer, I open a listing, see photos, price, seller rating and approximate location, and save it.
- As a buyer, I message the seller about a listing, and the conversation stays attached to that listing.
- As a buyer, I make an offer; the seller accepts, declines or counters; an accepted offer reserves the item for me.
- As a seller, I mark the item sold, or the sale completes through in app payment, and the listing leaves search.
- As a buyer, I save a search and get alerted when new matching listings appear.
Name and park: shipping labels, auctions, promoted listings, seller storefronts, price suggestions and a recommendation feed. Each is a reasonable extension, and you can mention later how the design would accommodate it.
Personas and their conflicts
A marketplace has personas whose interests pull against each other, and naming the tension is good product sense. Sellers want reach: more people seeing the listing, fewer steps to publish. Buyers want trust and relevance: real items, accurate prices, sellers who reply. Trust and safety teams want friction for risky actors, which sellers experience as delay. The business wants liquidity, meaning that most listings sell and most searches find something. Many design decisions in this walkthrough, such as holding a risky listing for review or hiding reserved items, are choices about whose experience to favour in a specific case.
Edge cases that shape the design
- A listing is sold while three other buyers are mid conversation with the seller. They should learn it is gone, kindly.
- Two buyers try to buy or reserve the same item at the same moment.
- A seller edits the price after a buyer made an offer at the old price.
- A seller deletes their account with active conversations and pending offers.
- A buyer blocks a seller; the seller's listings should stop appearing to them.
- A listing is posted from a location that does not match the seller's usual area, or with photos copied from elsewhere.
- A saved search matches hundreds of new listings a day, which would make instant alerts spam.
Non functional needs as product promises
Freshness: a new listing appears in search within about five seconds; a sold listing disappears within the same window, because buyers who message about sold items feel misled. Search latency: results in a few hundred milliseconds, since search is the main entry point. Correctness: an item can be reserved by at most one buyer at a time; an accepted offer is never lost. Privacy: a seller's exact address is never shown; buyers see an approximate area until the seller shares more in conversation. Safety: risky listings and messages are caught before most buyers see them. Availability: search and browse should survive the failure of messaging, and messaging should survive the failure of search.
Rough numbers
Assume fifty million monthly users, twenty million active listings at any time, and two million new listings a day, about twenty five per second on average and perhaps a hundred per second at the evening peak. Listings are small rows plus several photos each, so photo storage dominates; the media lesson covered how photos are uploaded and served, and you can point to it. Searches are the heavy read path: say two hundred million searches a day, a few thousand per second on average and maybe ten thousand at peak. Messages: about thirty million a day. Saved searches: perhaps fifteen million stored queries.
What these numbers tell you is useful. Writes to listings are modest and fit a relational database comfortably. Search is read heavy with geographic and faceted filtering, which calls for a dedicated search index, not queries on the primary database. Saved searches are numerous enough that running each one on a timer would be wasteful, which hints at matching new listings against stored queries instead. Say these conclusions explicitly; the numbers exist to drive them.
Screens to sketch
A quick sketch of four screens keeps the rest of the interview grounded. The search results screen is a grid or list of cards with a photo, price, title and distance, a filter bar at the top and a save this search button. The listing screen has a photo carousel, price, description, seller card with rating and response time, an approximate map circle, and two actions: message and make offer. The create listing screen is a short form, ideally with photos first, because photos are what make listings sell, and suggestions for category and price. The inbox lists conversations with the listing thumbnail and state, and a conversation screen shows messages and offer cards inline.
Sketching these screens takes two minutes and pays off three times. It tells you which data each read must return, which becomes the read models in step three. It reveals actions you might have missed, such as save this search, which becomes a flow with its own backend. And it lets the interviewer see the product you are designing, which matters in a round that scores product sense. You do not need boxes and arrows here, only a few labelled rectangles and the actions on each.
When you sketch, notice what each screen shows about state. The listing screen must show reserved or sold clearly. The inbox must show when a conversation's listing is no longer available. The search card might show a price drop badge. These small state indicators are where the listing state machine from the next step becomes visible to users, and pointing them out early makes the transition to the data model natural.
What not to design
It is just as useful to say what you will not design. The photo pipeline, push delivery and the payment processor are generic building blocks covered elsewhere in this course or handled by providers, so you will treat them as boxes with clear contracts. That leaves your time for the parts that are specific to a marketplace: the listing lifecycle, local search, buyer and seller conversations, the reservation rule and trust and safety. Interviewers appreciate a candidate who spends minutes where the product is unusual.
Check in
Summarise the seven flows, the four personas, the freshness promise for new and sold listings, the one buyer reservation rule and the conclusion that search needs its own index. Ask whether the interviewer wants to focus on search, on the offer and reservation flow, or on trust and safety. Each leads to a different deep dive, and knowing their preference lets you budget the remaining thirty minutes.
Marketplace decisions usually favour one side at the other's expense: review holds slow sellers to protect buyers, hiding reserved items protects buyers from disappointment but reduces seller reach. Saying which side you favour and why is product sense the interviewer can score.