Commerce, payments and delivery · senior
Case study: e-commerce listing, cart and checkout
A strong e-commerce design renders listing and product pages from cached, SEO-friendly HTML with fresh price and stock streamed in, keeps filters in the URL, syncs the cart with the server, runs checkout as a state machine with server-computed totals and an idempotent 'place order', and plans for sale-day spikes.
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
- Rendering: listing and product pages as a static shell + cached product data (SEO, LCP); price, stock and personalisation fresh (streamed); cart and checkout dynamic and never shared-cached.
- Listing: search, sort, filters and page in the URL; server-side search with facet counts; crawlable page links for SEO; restore scroll and filters on Back.
- Images and JS on low-end Android: image CDN with srcset, first row eager, rest lazy; a strict JS budget for listing pages; hydrate filters and 'add to cart' only.
- Cart: server cart for logged-in users (synced across devices); a local guest cart merged at login; optimistic add with reconciliation; stock and price re-checked at checkout.
- Checkout as a state machine: address → delivery slot → payment → review → placing → success | failure; one idempotency key for 'Place order'; disable double submit; handle 'price changed' and 'out of stock' errors.
- Money: the server computes totals, taxes and discounts; the client only displays; use integer paise, not floats; format with Intl.NumberFormat('en-IN', { style: 'currency', currency: 'INR' }).
- Sale day (Big Billion Days): CDN for everything static, a waiting room/queue, feature flags to turn off heavy widgets (recommendations), graceful degradation when a service is slow.
- Analytics funnel and A/B tests on listing layouts; accessibility of filters and forms; regional languages.
The red pen
Common traps: mistake → fix
Mistake: Client-render the product page
Fix: poor SEO and LCP.
Mistake: Compute prices on the client
Fix: wrong totals and tampering.
Mistake: Keep a logged-in cart only in localStorage
Fix: lost across devices.
Mistake: Allow double-clicks on 'Place order'
Fix: duplicate orders and charges.
Easy to hard
Questions interviewers ask, easy to hard
- Design the frontend from listing to checkout for a sale day.
- Do filters survive going to a product and back?
- Product details are slow or failing. What renders?
- The network drops after 'Place order'. What happens?
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.