Frontend System Design Interviews: A Practical Framework
Frontend system design rounds ("design a news feed UI", "design an autocomplete widget", "design a collaborative doc editor's client") are now standard at many companies. They are not backend design with a React sticker on top. Here is a structure that fits a 45-minute slot.
1. Requirements (5 minutes)
- Functional: what can the user do? List the three or four core interactions and confirm them.
- Non-functional: devices and network (mobile on 3G?), offline needs, accessibility, internationalisation, SEO, and expected data size (10 items or 10,000?).
2. Architecture (10 minutes)
Draw the component tree and where data lives: server, client cache, global store, component-local state. Say why each piece of state lives where it does. A common clean split is server state in a query cache (with stale-while-revalidate), UI state local, and a small global store only for truly cross-cutting data like the current user.
3. Data model and API (10 minutes)
- Define the client-side entities and the API shape you want, including cursor-based pagination for feeds and lists.
- Normalise entities so one update (a liked post) shows everywhere.
- Pick a transport: REST/GraphQL for fetching, WebSocket or SSE for live updates, and explain reconnection and missed-event recovery.
4. Deep dives (15 minutes)
- Performance: list virtualisation for long lists, code splitting by route, image sizing and lazy loading, debouncing input for autocomplete, request cancellation so stale responses don't overwrite fresh ones.
- Optimistic updates: apply immediately, roll back on failure, and show the user what happened.
- Rendering strategy: CSR vs SSR vs static generation, tied to the SEO and time-to-first-content requirements you collected.
- Accessibility: keyboard navigation, focus management for modals and menus, ARIA roles for custom widgets like comboboxes, and announcing live updates.
- Offline and errors: retry with backoff, a queue of pending mutations, and clear empty, loading and error states.
5. Wrap-up (5 minutes)
Summarise the design, then name what you would measure (Core Web Vitals, error rates, interaction latency) and what you would build next. Interviewers remember candidates who state trade-offs explicitly: "virtualisation breaks Ctrl+F and adds complexity, so I'd only enable it past a few hundred items."
Practice prompts
Image carousel, infinite news feed, autocomplete search, chat window, spreadsheet-like data grid, and a file uploader with progress and resume.
Disclosure: I'm on the team behind Linkjob AI, an AI interview assistant. This framework is general advice and doesn't require any tool.