Skip to the page

Classic case studies · senior

Case study: analytics dashboard

A strong dashboard design keeps filters in the URL, makes each widget independent with its own query, skeleton and error boundary, protects rate-limited APIs with debouncing, caching, batching and a request queue, renders big data with server-side tables, virtualisation and downsampled canvas charts, and handles time zones explicitly.

The notes

What you must know

  • Filters (date range, segment, merchant) live in the URL so views are shareable; debounce filter changes.
  • Widgets: independent queries keyed by filters, each with Suspense skeleton + error boundary + Retry; one slow widget never blocks the page.
  • Fewer calls: an aggregate/BFF endpoint for the page instead of 12 calls; a query cache with staleTime; dedupe identical requests.
  • Rate limits (Razorpay SDE-2, Nov 2025: '10 requests/min'): cache, batch, queue with a limiter, honour 429 + Retry-After, show 'data as of 10:42'.
  • Tables: server-side sort, filter and pagination for large data; virtualised rows; sticky header; export CSV on the server.
  • Charts: downsample to about the pixel width (keep min and max per bucket so peaks survive); canvas instead of SVG for many thousands of points; aggregate in a Web Worker.
  • Real-time: SSE/WS with sequence numbers; buffer and flush once per frame or per second; pause when the tab is hidden; bounded memory for rolling windows.
  • Time zones, permissions and a11y: store UTC, show the user's zone with Intl.DateTimeFormat and say which zone 'today' means; check permissions per widget; give charts a text summary or data table.

The red pen

Common traps: mistake → fix

  • Mistake: One giant request blocks the whole page

    Fix: independent widgets with their own loading states.

  • Mistake: Re-render every chart on every real-time tick

    Fix: batch and memoise.

  • Mistake: Average the points to downsample

    Fix: spikes disappear; keep min/max per bucket.

  • Mistake: Ignore time zones

    Fix: 'today' differs between the merchant and the server.

Easy to hard

Questions interviewers ask, easy to hard

  1. Design an analytics dashboard with filters, charts and a large table.
  2. The API allows 10 requests per minute and users change filters quickly. What do you do?
  3. A chart has 2 million points. How do you render it?
  4. Make it real-time for 10,000 concurrent users.

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview