Skip to the guide

Design nearby places (like Yelp or Google Maps places)

IntermediateCase study12 pages

A user opens the app, types "coffee" or just looks at the map, and sees the good places around her, each with its hours, its rating and what people wrote about it. It's a city guidebook that rewrites itself every time someone eats out.

It's also asked as "design Yelp", "design a proximity service" or "find restaurants near me". The closest case study is Ride hailing, where the things on the map move. Interviewers like it because one index must answer by area at 20,000 searches a second, and pages are read hundreds of times for every review. A new rating or a closed café also has to reach every copy within a minute.

Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.

Step 1 · Clarify the features and cut the scope

Minutes 0–5 · How this step works

Interviewer: Design a service for finding places nearby, like Yelp.

You: A few questions first. What does a search look like: a category, free text, filters?

Interviewer: Text or a category, near the user or in the area the map shows. Filters for open now, rating and price.

You: What's on a place's page?

Interviewer: Details, opening hours, the star rating and its reviews. Photos exist, but leave uploads out.

You: Who writes reviews, and can someone review a place twice?

Interviewer: Signed-in users, one review per place, which they can edit.

You: Where do places come from, and how often do they change?

Interviewer: Owners and our staff add and edit them, and places close.

You: Then I'll cover search with filters, place pages, reviews with the rating, and owners' edits. Out: bookings, ordering, ads, photo uploads and personal recommendations. OK?

Interviewer: Good.

Each answer shapes the design: text and filters mean a search engine beside the geo index, and one review per place means a unique key. The rating needs a total kept with the reviews, and edits and closures need a way to reach every copy.

Step 2 · Non-functional requirements

Minutes 5–8 · How this step works

You: Say 100 million daily users and 10 million places worldwide. Searches and place pages answer within 100 ms at our servers for 99% of requests and are 99.99% available, while writing a review is 99.9%. A posted review is never lost, though losing a whole region may cost its last second. An edit, a closure or a new review reaches everyone within about a minute, and its author sees her own review at once on the phone she wrote it on.