skip to content

Frontend System Design

Designing one browser application end to end: component boundaries, where state lives, the API contract, caching, live updates and rendering per page. Rounds grade trade-offs, not framework recall.

on this pageshow

explore

questions

70 · 12 sections

In a frontend system design round, what does each stage of the RADIO frame produce when the product runs in a browser?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Requirements give a list of functional and non-functional needs; architecture, a client diagram with the server as one box; data model, entities tagged by origin; interface, HTTP calls plus component inputs and events; deep dives, one or two key areas.

open as a page

In a frontend design round for a hotel-booking web app, which clarifying questions change the design, and how does each answer change it?

level: middleimportance: must knowfreq 66%
basics
~10 s

Ask what forks the design: device mix, network quality, search-engine traffic, languages and right-to-left, accessibility, data volume per screen, offline needs. Each answer moves a decision: first-response content, script weight, layout mirroring, paging, scope.

open as a page

In a frontend design round for a hotel-booking web app, how do you turn 'it must be fast and accessible' into requirements that change the design?

level: middleimportance: should knowfreq 57%
basics
~20 s

Make each one measurable for the real users: Core Web Vitals targets at the 75th percentile on mobile, and a commitment that keyboard and screen-reader users can book. Then trace each target to a concrete choice in the design.

open as a page

With about twenty minutes left in a hotel-booking web app's frontend design round, which one or two deep dives would you open, and why?

level: seniorimportance: should knowfreq 50%
basics
~20 s

Open the areas the stated requirements make hardest: how the results and hotel pages reach crawlers and low-end phones quickly, then the booking form on flaky networks. Skip styling, tooling and framework debates, and say why you chose.

open as a page

Twenty minutes into a hotel-booking web app's frontend design round, you've named a framework, drawn load balancers and debated button styles. How do you recover?

level: seniorimportance: should knowfreq 44%
basics
~20 s

Say you are bringing it back to the client, redraw the client diagram with the server as one box, catch up the data model and interface, then open one deep dive, stating a trade-off for every choice from here on.

open as a page

In a B2B web admin console's orders screen — grid, filter bar, bulk-actions bar, side panel — which components should own data, and which only render?

level: middleimportance: must knowfreq 58%
basics
~20 s

A few region-level owners hold the data: the orders page owns filters, sort, selection and the list query, and a side-panel container fetches the selected order. The grid, filter bar, bulk-actions bar and panel body only render inputs and report intent.

open as a page

On a B2B admin console's orders grid, should sort, filters and row selection be owned by the grid, by the page, or by the URL?

level: middleimportance: should knowfreq 50%
basics
~20 s

Decide per value: sort and filters go in the URL because links, reload and Back must reproduce the view; the page holds the selection that the bulk-actions bar reads; open menus and focus stay inside the grid.

open as a page

In a B2B web console, an order-summary panel reused on checkout review, the order page and account history has grown eleven per-screen flags; what went wrong, and what would you change?

level: seniorimportance: should knowfreq 42%
basics
~20 s

The shared panel learned about its callers: teams added flags instead of composing, leaving untested combinations and no owner. Keep a core that renders lines and totals, and let each screen compose its own data mapping and actions.

open as a page

For a 40-engineer web admin console, how would you layer components from design-system primitives to pages, and where does the design system's edge sit?

level: seniorimportance: should knowfreq 38%
basics
~20 s

Four layers, imports pointing down: design-system primitives know no domain, app-shared composites know app conventions, feature components know their domain and data, pages own routes and the URL. Wrap the system for real defaults; never restyle its internals.

open as a page

In one web admin console codebase shared by five feature teams of 40 engineers, how would you draw feature-module seams and keep them from eroding?

level: principalimportance: should knowfreq 32%
basics
~20 s

Group code by feature, give each feature one public entry as its only importable surface, keep a small owned shared kernel, and enforce the seams with an import-boundary build rule whose baseline of old violations only shrinks.

open as a page

In a frontend design round for a web email client, how do you decide where each piece of state lives?

level: middleimportance: must knowfreq 68%
basics
~20 s

Cut server data from client-only state first: mail, counts and labels live in a client cache of server data; folder, thread and filters go in the URL; one-widget state stays local; shared UI state in an app store; preferences persist.

open as a page

When a web email client is open in several tabs, which state should sync between them, which must not, and how would you carry it?

level: middleimportance: should knowfreq 46%
basics
~20 s

Sync what describes the account, not the tab: sign-out, read flags and unread counts, preferences. Never sync the open draft, selection or filters. Post small change notices on a BroadcastChannel, treat them as hints, and revalidate from the server.

open as a page

In a web email client, how do you decide which state is tied to the current route and which the app shell holds across navigation?

level: middleimportance: should knowfreq 44%
basics
~20 s

Ask what the user expects after navigating away, pressing Back, reloading or sharing a link. The open thread and filters are route-keyed, in the address; a minimised draft, a sent notice and the layout preference are shell-held.

open as a page

In a web email client, opening a thread marks it read, yet the list row stays bold and the folder count is unchanged; how would you redesign the state so every view agrees?

level: seniorimportance: should knowfreq 50%
basics
~20 s

Keep one record per conversation, keyed by id, that the list row and thread header both read; carry the folder count from the server with a local delta applied alongside the flag. A failed write then reverts every view at once.

open as a page

In a single-user kanban board web app, what should enter the undo history, where should it live, and how does undo meet changes the server already saved?

level: seniorimportance: should knowfreq 36%
basics
~20 s

Record intents that change the board, such as moving, creating or editing a card, never selection or filters. Keep one board-scoped history in shell-held memory, leave typing to the field's own undo, and reverse saved changes with a new write.

open as a page

In a retail-banking web app, how should the API's error envelope map onto the transfer form's field errors, page failures, retries and expired sessions?

level: middleimportance: must knowfreq 58%
basics
~20 s

Use one envelope everywhere, problem details with a stable type and per-field errors, and map by status and type: 422 field errors inline, 401 to re-authentication keeping the draft, 503 or a lost response to a retry, the rest to a page-level state.

open as a page

In a frontend design round for a retail-banking web app, how would you choose REST, GraphQL or RPC for its overview, transactions and transfer screens?

level: middleimportance: must knowfreq 62%
basics
~20 s

Argue it from the screens: the transactions list is a filtered, paged resource (REST), the transfer is a command (an action endpoint), and the overview's three-source fan-in decides whether GraphQL or one screen-shaped endpoint earns its cost.

open as a page

For a retail-banking web app's transactions list and detail panel, how would you shape the payloads and page envelope against over- and under-fetching?

level: middleimportance: should knowfreq 54%
basics
~20 s

Give list rows a summary representation that already carries the labels they display, fetch the detail when a row opens, and return a page envelope of cursor and has-more, adding a total count only if the screen shows it.

open as a page

For a retail-banking web app whose overview combines balances, cards and offers from three back-end services, should the frontend team build a BFF, and what would it own?

level: seniorimportance: should knowfreq 40%
basics
~20 s

Yes for this overview: three services with their own auth and error shapes, fanned in over phone networks. A frontend-owned BFF composes one screen-shaped payload and one error envelope; business rules stay in the services. Skip it if the API already serves that endpoint.

open as a page

In a retail-banking web app, the offers service behind the accounts overview is down; what should the overview's API response carry, and what should the screen render?

level: seniorimportance: should knowfreq 43%
basics
~20 s

Return the overview with balances and cards, and mark the offers section unavailable and retryable, rather than failing the whole response or sending an empty list. The screen renders what arrived and degrades the offers slot; a balances failure justifies a page-level error.

open as a page

For a gradebook web app on patchy school Wi-Fi, which caching strategy should its timetable, rosters, photos, grade history and parent messages each get?

level: middleimportance: must knowfreq 58%
basics
~20 s

Argue each resource from tolerable staleness, privacy and whether the lesson can go on without it: timetable and grade history stale-while-revalidate, rosters network-first with a short timeout, photos cache-first on versioned URLs, parent messages network-only and never stored.

open as a page

In a gradebook web app open in several tabs, how would you design the offline write queue's ordering and idempotent replay, and which tab replays it?

level: seniorimportance: must knowfreq 44%
basics
~20 s

Store each write durably before showing it, ordered per target, carrying an idempotency key minted at creation; one context replays under a named Web Lock, triggered from the page whether or not Background Sync exists.

open as a page

When a gradebook web app loses school Wi-Fi mid-lesson, what should the teacher see, and which actions should stay available or be disabled?

level: middleimportance: should knowfreq 47%
basics
~20 s

Keep the lesson going: attendance and grades still save, each marked as not yet sent; cached rosters show their age; only live-only features such as parent messages are disabled with a reason. Treat navigator.onLine as a hint, never a gate.

open as a page

In a gradebook web app, a grade entered offline replays after a colleague changed that grade; how should the server reject it, and what should the teacher see?

level: seniorimportance: should knowfreq 36%
basics
~20 s

The queued grade carries the revision the teacher saw; the server refuses it once the record has moved on, returning the current value. The app parks that entry and shows both versions: keep theirs, apply mine, or edit.

open as a page

When a teacher signs out of a gradebook web app on a shared classroom laptop, what must be wiped, and how do you make sure it happened?

level: seniorimportance: should knowfreq 33%
basics
~20 s

Every copy of the teacher's data: IndexedDB, the worker's caches, Web Storage, the HTTP cache and every tab's memory. Settle unsent work first, wipe locally without the network, send Clear-Site-Data as a backstop, and test it.

open as a page

In an online auction web app, what transport should the bid ladder, watchlist, watch count, bidding and announcements use, and should they share one connection?

level: middleimportance: must knowfreq 62%
basics
~20 s

Everything the server pushes - ladder, watchlist prices, watch count, alerts, announcements - shares one live connection per tab, subscribed by topic. Placing a bid stays an HTTP POST with an idempotency key, because it needs a definitive answer.

open as a page

On an online auction's lot page, the live connection drops for twenty seconds near closing; how should the browser client detect it, reconnect, resubscribe and catch up, and what should the bidder see meanwhile?

level: seniorimportance: must knowfreq 48%
basics
~20 s

Treat missed heartbeats as a dead connection and label the price stale. Reconnect with capped, jittered backoff, resubscribe only the lots on screen, read each lot's current state with its sequence number, then apply buffered events newer than it.

open as a page

When bids on an online auction's lot page burst to dozens a second, how should the page paint the ladder, price and watch count?

level: middleimportance: should knowfreq 45%
basics
~20 s

Fold events into pending state where the latest value per field wins and the ladder keeps its top entries, then paint once per animation frame. Show watchers as a throttled, rounded number; announce only what the bidder must act on.

open as a page

When an online auction's watchlist page sits in a hidden browser tab for an hour, what should its live connection do, and what must happen when the user returns?

level: seniorimportance: should knowfreq 40%
basics
~20 s

Keep the connection through a short grace period, then close it: hidden pages are throttled and may be frozen or discarded. On return, mark rows updating, reconnect, resubscribe the visible lots and read their state in one request.

open as a page

On an online auction's lot page, bid events arrive duplicated, out of order or with a sequence number missing; how should the browser client handle each case?

level: seniorimportance: should knowfreq 42%
basics
~20 s

Track the last applied sequence per lot: drop events at or below it, apply the next one and drain held successors, hold later ones briefly, and if the gap persists, resync from a state read.

open as a page

For a team wiki's page editor where up to thirty people edit at once and some work offline on trains for an hour, would you merge edits with OT or a sequence CRDT?

level: seniorimportance: must knowfreq 46%
basics
~20 s

A sequence CRDT: hour-long offline edits merge without a central server transforming every operation, at the cost of per-character metadata the page must load, so snapshot it. Always-online editing would make OT the lighter choice. Whiteboard objects need only per-property merge.

open as a page

In a team wiki's collaborative page editor, how would you show each collaborator's cursor and selection so they stay on the right characters while others type?

level: middleimportance: should knowfreq 36%
basics
~20 s

Treat cursors as ephemeral presence, not edits: send selections as anchors tied to characters (transformed offsets in OT, character identities in a CRDT), re-resolve them after every edit, throttle sends, and draw named carets that fade when idle.

open as a page

A team wiki editor merges an hour of offline train edits cleanly, but two people rewrote the same paragraph; what should the page show them, and how does it know?

level: seniorimportance: should knowfreq 38%
basics
~20 s

Converged is not correct: the paragraph now holds both rewrites. After syncing, find blocks where your offline edits and others' concurrent edits overlap, mark them in place with who else edited, and offer both versions to compare, without blocking editing.

open as a page

A two-year-old team wiki page opens slowly because the browser replays its whole operation log; how would snapshots fix that, and what happens to a laptop offline longer than the log is kept?

level: seniorimportance: should knowfreq 30%
basics
~20 s

Open from a recent snapshot plus only the operations after it, cache that snapshot locally, and compact the log on a schedule. A laptop whose base predates the kept log cannot merge automatically: keep its edits and offer a guided reapply.

open as a page

In a team wiki's collaborative editor, how should undo revert only your own changes when a colleague has since edited the same paragraph?

level: seniorimportance: should knowfreq 33%
basics
~20 s

Keep an undo stack of only your own operations; undo builds the inverse of your latest group, adjusted for every edit applied since, and sends it as a new operation, so colleagues' later work survives and nobody's document rewinds.

open as a page

When designing an online store's frontend, which rendering mode would you give the home, category, product, search, cart, checkout and order-history pages, and why?

level: middleimportance: must knowfreq 68%
basics
~20 s

Assign a mode per page type from four inputs: freshness, personalisation, indexing and latency. Home, category and product pages get prerendered HTML regenerated on change; search renders per request; cart, checkout and order history render in the browser.

open as a page

Why might an online store's client-rendered product pages reach one search engine's index late and another's not at all, and what would you change?

level: middleimportance: should knowfreq 52%
basics
~20 s

The first response is an empty shell, so content appears only after the crawler's deferred render succeeds, and crawlers that run no script never see it. Server-render or prerender the indexable page types; keep client rendering for personal ones.

open as a page

When designing an online store's frontend, which page types would you ship as server HTML with a few hydrated islands, and which need the whole page hydrated or client-rendered?

level: seniorimportance: should knowfreq 41%
basics
~20 s

Mostly static pages with local interactivity, such as product detail and help articles, become server HTML with islands, cutting their script. Checkout and the seller dashboard, one interactive surface with shared state, keep full hydration or client rendering.

open as a page

An online store prerenders its catalogue and help pages but client-renders cart, checkout and order history; what seams does that mix create, and how would you design them?

level: seniorimportance: should knowfreq 38%
basics
~10 s

Mixing modes creates seams: shopper data on shared pages, navigation between render paths, status codes from a client-rendered area, protection of account data, and builds of different ages. Each seam needs an explicit design.

open as a page

An online store's product page moved from client rendering to per-request server rendering: LCP fell from 3.8 s to 2.3 s, but TTFB rose from 0.2 s to 1.1 s. Is that a good trade, and what next?

level: seniorimportance: should knowfreq 46%
basics
~20 s

Mostly yes: LCP is what shoppers feel and TTFB is not a Core Web Vital, but 1.1 s leaves little margin under the 2.5 s LCP target. Shared product HTML should be prerendered and regenerated to win both.

open as a page

In a community-board web app's infinite home feed, how would you design loading older posts, and what should happen when new posts arrive meanwhile?

level: middleimportance: must knowfreq 66%
basics
~20 s

Fetch older posts a screen or two before the end, one request at a time, with the server's cursor; drop repeated ids; show retry and end rows; and announce new posts with a banner, never inserting them above the reader.

open as a page

For a community-board web app's mixed home feed on phones, would you window it, use content-visibility, or plain pages, and at what cost?

level: middleimportance: must knowfreq 72%
basics
~20 s

Start with appended pages and content-visibility: auto, which skips rendering off-screen posts yet keeps them findable and readable by screen readers; it does not cap memory, so past a measured ceiling, window or drop far pages.

open as a page

When a community-board web app's feed has loaded several hundred posts on a phone, why is keeping every post in the page a problem?

level: juniorimportance: should knowfreq 52%
basics
~20 s

Every loaded post stays as DOM nodes, media and listeners, so memory keeps growing and each update or tap makes the browser restyle and lay out a bigger tree; on a phone that means late taps and janky scrolling.

open as a page

In a community-board web app, a reader opens a post two hundred items down and presses Back; how do you return them to the same place?

level: seniorimportance: should knowfreq 55%
basics
~20 s

If the post is a separate document, keep the feed eligible for the back/forward cache, which restores it whole. Otherwise the app restores itself from saved post ids, cursor, heights and an anchor post with its offset, then refreshes counts.

open as a page

In a community-board web app's windowed feed on phones, how would you keep the reader's place steady when heights change — a photo above loading, a post edited or deleted?

level: seniorimportance: should knowfreq 46%
basics
~20 s

Reserve space so most heights never change: media boxes sized from API dimensions, fixed-width counts. Otherwise estimate per post type, measure once rendered, and when a post above the viewport changes height, shift the scroll by the difference.

open as a page

In a music-streaming web app's search dropdown, where should focus stay as users arrow through suggestions, and how do screen readers learn the active one?

level: middleimportance: must knowfreq 52%
basics
~20 s

DOM focus stays in the text input; the input's aria-activedescendant names the id of the active option, so screen readers announce it while typing, the caret and the phone keyboard keep working. Keep option ids stable across refreshes.

open as a page

For a music-streaming web app's search box on mobile networks, how would you budget delay, minimum length and round trip, and which response may paint?

level: middleimportance: must knowfreq 66%
basics
~20 s

Budget pause-to-paint as delay plus round trip plus server plus render, keeping the short delay as the only pure wait. Warm the connection, keep responses small, skip the delay on cache hits, and paint only the response for the current text.

open as a page

In a music-streaming web app's search box, why shouldn't it request suggestions on every keystroke, and what should it wait for instead?

level: juniorimportance: should knowfreq 48%
basics
~20 s

Most per-keystroke requests ask about text the user has already typed past: they waste data and battery, flicker unreadable results and delay the answer that matters. Wait for a short pause and a useful minimum length; show local matches at once.

open as a page

For a music-streaming web app's search box, what should a tab's prefix cache hold, how long, and when can shorter prefixes answer longer ones?

level: middleimportance: should knowfreq 45%
basics
~20 s

Keep normalised queries, results and a completeness flag in memory for a few minutes, keyed also by account, market and content setting. A shorter prefix may answer a longer one only when its list was complete and matching is plain prefix.

open as a page

In a music-streaming web app's search box, recent searches and library matches paint instantly but remote suggestions land later; how do you merge them without reshuffling under the arrow key, and what should a screen reader hear?

level: seniorimportance: should knowfreq 40%
basics
~20 s

Fix the layout: local sections on top, remote groups below in reserved space, duplicates removed by catalogue id. Network arrival never moves rows at or above the active one. A polite status region announces one short count when the list settles.

open as a page

In a real-estate listing portal's web uploader handling 60 photos and a 3 GB video, how should per-file progress, total progress, retry and cancel work?

level: middleimportance: must knowfreq 56%
basics
~20 s

Track each file's state and bytes; total progress is confirmed plus in-flight bytes over all bytes. Retry transient failures with backoff, stop a file on permanent ones, and cancel by aborting only that file's requests.

open as a page

When an agent's 3 GB walkthrough upload in a real-estate listing portal stops at 1.8 GB after a dropped uplink, an expired URL or a reload, how does the page resume?

level: seniorimportance: must knowfreq 47%
basics
~20 s

Ask the server how many bytes it holds and send the rest from that offset with Blob.slice. Surviving a reload also needs the saved upload id and file fingerprint, a fresh URL, and the agent choosing the file again.

open as a page

In a real-estate listing portal's web uploader, what steps does the page take to send one photo straight to storage with a pre-signed URL?

level: juniorimportance: should knowfreq 48%
basics
~20 s

The page asks the portal's API for an upload id and a short-lived pre-signed URL, sends the photo's bytes straight to that URL, then tells the API the upload finished so the server can verify and attach it.

open as a page

In a real-estate listing portal's web uploader, which checks and previews should run before any byte is sent, and what do they cost the page?

level: middleimportance: should knowfreq 42%
basics
~20 s

Check count, size, type and, for photos, decoded dimensions before sending, to spare the agent's uplink, as feedback only because the server checks again. Preview with object URLs or small thumbnails, and revoke each URL when its tile goes.

open as a page

In a real-estate listing portal's web uploader sending 60 photos and a 3 GB video over a phone's weak uplink, how many uploads should run at once, and why?

level: seniorimportance: should knowfreq 38%
basics
~20 s

Run a small overall cap, about two requests on a weak phone uplink and three or four on office broadband, with the video in one lane and photos in the rest. More parallel requests split a thin uplink without adding bandwidth.

open as a page

For an online tax-filing web app, which failures must the page capture globally, and how do reports reach one pipeline before the tab closes?

level: middleimportance: must knowfreq 52%
basics
~20 s

Capture uncaught errors, unhandled promise rejections, errors that render boundaries catch and forward, and failed script or chunk loads; turn each into one report envelope in one in-memory queue, and flush it in small batches when the page becomes hidden.

open as a page

A tax-filing web app loads its bundles from a separate static domain, and every error report reads only 'Script error.'; why, and what must change?

level: middleimportance: should knowfreq 42%
basics
~20 s

The bundles are cross-origin scripts fetched without CORS, so the browser mutes their errors to 'Script error.' with no file, line or error object. Add crossorigin="anonymous" to every script tag and have the static domain send Access-Control-Allow-Origin.

open as a page

A tax-filing web app ships weekly; how would you keep its source maps private yet map every report to the right build, and group reports into issues that survive a release?

level: seniorimportance: should knowfreq 36%
basics
~20 s

Bake a release id into each build and stamp it on every report; upload that build's maps privately, keyed by release, before the deploy goes live. Group by error type, normalised message and top symbolicated in-app frames.

open as a page

In deadline week, a tax-filing web app gets ten times its usual traffic and one bug fires in a loop; how would you sample and cap its error reports?

level: seniorimportance: should knowfreq 33%
basics
~20 s

Decide sampling once per session and put the rate on every report; cap each error group per page and send a count of the repeats; keep submit-step errors at full rate; and let the server change the rate without a release.

open as a page