Commerce, payments and delivery · senior
Case study: travel booking (Airbnb / MakeMyTrip)
A strong booking design keeps search parameters in the URL, syncs a results list with a map, treats prices and availability as quotes that can expire, holds inventory for a limited time shown with a server-based countdown, and books with an idempotent request that handles 'sold out' at the last step.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Search form: destination autocomplete, accessible date-range picker, guests; all in the URL; SEO landing pages ('Hotels in Goa') server-rendered and cached.
- Results: virtualised list + map; hovering a card highlights its marker; markers clustered; moving the map triggers a debounced bounding-box search; load the map SDK on demand (it is heavy).
- Freshness: prices and availability change; show prices as quotes with an expiry, re-check on the detail page and at booking, explain 'price changed' clearly.
- Booking: hold the room/seat on the server with an expiry (e.g. 10 minutes); show a countdown computed from server time, not the device clock; an idempotent booking request; graceful 'sold out' with alternatives.
- Seat maps (flights, buses): a grid model with available/held/booked states, live updates, keyboard navigation and labels ('Seat 12C, window, ₹450').
- Dates: check-in dates are date-only values in the property's local zone; avoid new Date('YYYY-MM-DD') (UTC midnight shifts the day in other zones).
- Currency and locale formatting; cancellation policy shown before payment; payments as in the payment case study.
The red pen
Common traps: mistake → fix
Mistake: Trust the client clock for the hold timer
Fix: wrong if the device clock is off; use the server's expiry and offset.
Mistake: Treat a search result price as final
Fix: it can change before booking.
Mistake: Parse '2026-11-13' with new Date()
Fix: shows the 12th for users west of UTC.
Mistake: Load the map for everyone on first paint
Fix: large JS cost on phones.
Easy to hard
Questions interviewers ask, easy to hard
- Design the search and booking flow for a hotel site.
- How do the list and the map stay in sync?
- The price changes between search and payment. What does the user see?
- How do you show a 10-minute hold timer that can't be cheated?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.