On this page
Tracks

Frontend System Design — Framework

Last reviewed 14 Oct 2026

Part of the system design series. Frontend problems: News Feed UI · Autocomplete Widget · Chat App UI · Offline-First App · E-commerce Product & Checkout.

1. How it differs from backend system design

In a frontend round, the server is a black box behind an API you get to design. The interviewer wants to see you reason about what happens in the browser: component boundaries, where state lives, how data is fetched and cached, how it performs on a mid-range phone on 4G, and whether a keyboard or screen-reader user can use it.

Backend roundFrontend round
Databases, sharding, queuesComponent tree, state ownership, client cache
Throughput, p99 latencyCore Web Vitals, bundle size, perceived speed
Replication, failoverOffline, retries, optimistic UI, flaky networks
API between servicesAPI between client and server (shape, pagination, real-time)

It’s distinct from machine coding (build a working widget in 60–90 minutes — see the Machine Coding track). System design is a whiteboard discussion of architecture and trade-offs, usually with little or no code.

2. The framework — RADIO

Spend roughly: Requirements ~10%, Architecture ~15%, Data model ~10%, Interface ~15%, Optimizations ~50%. Most of the signal is in the last step.

R — Requirements. Functional (what the user can do) and non-functional (devices, network, scale of data on screen, SEO, accessibility, i18n, offline). Ask: mobile and desktop? Logged in? How many items? Real-time? Which browsers?

A — Architecture. Draw the main components and their responsibilities: view components, a client store/cache, a data-fetching layer, and the server. Say which parts are server-rendered.

flowchart LR
subgraph Browser
  V[View components] --> CTRL[Controllers / hooks<br/>user intent]
  CTRL --> STORE[(Client store / cache<br/>normalized entities)]
  STORE --> V
  CTRL --> DL[Data layer<br/>fetch, retry, dedupe]
  DL --> STORE
  SW[Service worker<br/>offline cache] -.-> DL
end
DL -->|HTTP / WebSocket| API[Server API]
A typical client architecture — views read from a client store; a data layer talks to the server

D — Data model. The client-side entities and where each piece of state lives:

  • Server state (posts, users) — cached copies of server data; needs invalidation, pagination, staleness rules. Libraries like TanStack Query, SWR, Apollo/Relay handle this.
  • Client/UI state (open modal, input text, selected tab) — local to components when possible.
  • URL state (filters, page, search query) — anything that should survive refresh or be shareable.
  • Normalize server entities by id (users[id], posts[id]) so one user’s updated avatar shows everywhere without refetching.

I — Interface (API). Design the client–server contract: endpoints or GraphQL queries, request/response shape, cursor-based pagination, error format, and real-time channel (polling, SSE, WebSocket). Also the component API for reusable widgets (props, events, slots).

O — Optimizations and deep dives. Pick the ones that matter for this product — don’t list all of them.

3. The optimization menu

Rendering strategy

StrategyGood forTrade-off
CSR (client-side rendering)Logged-in apps, dashboardsSlow first paint, poor SEO without extra work
SSR (per request)Personalized pages needing SEO and fast first paintServer cost, TTFB
SSG / ISR (build-time, revalidated)Marketing, docs, product pagesStaleness, rebuild strategy
Streaming SSR + server componentsLarge pages with slow data partsFramework complexity
Islands / partial hydrationMostly static pages with a few interactive partsLess fitting for highly interactive apps

Performance — measured as Core Web Vitals: LCP (largest content visible, target ≤ 2.5 s), INP (responsiveness to input, ≤ 200 ms; replaced FID in 2024), CLS (layout shift, ≤ 0.1).

  • Code splitting by route and by interaction (load the editor when the user clicks Edit); tree shaking; avoid shipping large libraries for small features.
  • Images: right size per device (srcset), modern formats (AVIF/WebP), lazy-load below the fold, explicit width/height to prevent layout shift, fetchpriority="high" on the LCP image.
  • Long lists: virtualization (render only visible rows).
  • Keep the main thread free: debounce/throttle handlers, break up long tasks, move heavy work to Web Workers.
  • Network: HTTP caching, CDN, preconnect/preload critical assets, prefetch likely next routes.

Perceived performance — skeletons, optimistic updates, instant feedback on taps, keeping previous data visible while refetching.

Accessibility — semantic HTML first, keyboard operability, visible focus, ARIA patterns for custom widgets (combobox, dialog, tabs), live regions for dynamic updates, color contrast, respecting prefers-reduced-motion.

Network resilience — retries with backoff for idempotent requests, request deduplication, cancellation of stale requests (AbortController), offline detection and queues.

Security — XSS (escape by default, sanitize user HTML, Content Security Policy), CSRF (SameSite cookies, tokens), tokens in httpOnly cookies rather than localStorage, clickjacking (frame-ancestors).

i18n — text externalized, plural rules, RTL layouts, locale-aware dates/numbers.

4. Common problems by theme

ThemeProblems
Lists and feedsNews feed, Pinterest grid, infinite scroll, data table with 100k rows
Input-drivenAutocomplete, rich text editor, form builder
Real-timeChat, collaborative editor, live comments, stock ticker
MediaImage carousel, photo gallery, video player
CommerceProduct page, checkout, cart
App-levelOffline-first app, design system/component library, analytics dashboard

Interview follow-ups

  • “Where should this piece of state live?” — Server cache vs local UI state vs URL; lift only as high as needed.
  • “SSR or CSR?” — Depends on SEO, first-paint requirements and personalization; justify with the requirement.
  • “How do you know it’s fast?” — Field data (RUM) for Core Web Vitals, plus lab tools (Lighthouse, WebPageTest) for debugging; budgets enforced in CI.
  • “How would a screen-reader user use this?” — Semantic elements, ARIA pattern for the widget, focus management, live regions.
  • “The API is slow.” — Skeletons, caching, prefetch, optimistic updates, pagination; don’t block render on non-critical data.

Further reading: web.dev articles on Core Web Vitals (LCP, INP, CLS) · WAI-ARIA Authoring Practices Guide (patterns for custom widgets) · patterns.dev (rendering and performance patterns) · GreatFrontEnd’s system design guide (the RADIO framework).