Frontend School
DashboardProblemsLearnPracticeMock InterviewReportsStatsBuy Credits
DashboardProblemsLearnPracticeMock Interview
Frontend System Design Fundamentals
  1. 1.Introduction to Frontend System Design
  2. 2.Core Frontend Architecture Concepts
  3. 3.Client-Server Interaction Fundamentals
  4. 4.Basic Performance & Accessibility Considerations
  5. 5.State Management Basics & Data Flow
  6. 6.Advanced State Management & Global Stores
  7. 7.Component Libraries & Design Systems
  8. 8.Frontend Build Tools & Development Workflows
  9. 9.Advanced Performance Optimization Techniques
  10. 10.Data Fetching Strategies & Caching
  11. 11.Frontend Security Essentials
  12. 12.Micro-Frontend Architectures
  13. 13.Real-time Communication & WebSockets
  14. 14.Observability, Monitoring, & Logging
  15. 15.Offline-First & Progressive Web Apps (PWAs)
Frontend System Design Fundamentals
01

Frontend System Design · Lesson 1 of 15 · 4 min

Introduction to Frontend System Design

This is how you show you can lead a project, not just complete a ticket.

In a frontend system design interview, the prompt might be "design a news feed," but the real question is "can you architect a complex UI?" The interviewer wants to see how you handle ambiguity, make trade-offs, and communicate your reasoning. They are testing your ability to think about the entire system, from user experience and performance to developer experience and future growth. Your goal is to lead a collaborative design discussion, not to find a single "correct" answer.

What the Interviewer is Really Listening For

They are not testing your knowledge of a specific framework's API. They are evaluating your architectural thinking. Can you take a vague requirement and turn it into a concrete plan?

The entire interview is a simulation of a technical planning meeting. Your ability to ask good questions, identify constraints, and discuss trade-offs is more important than arriving at a perfect final design. The discussion itself is the deliverable.

The Core Trade-offs to Master

You need a vocabulary for justifying your decisions. These are the non-functional requirements that frame every frontend design discussion. Don't just list them; use them to explain why you chose one approach over another.

Performance: This is non-negotiable. You must be able to talk about performance in concrete terms: Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and bundle size. Your design choices—like code splitting, image optimization, or virtualization for long lists—must map directly back to improving these metrics.

Maintainability & Scalability: These are two sides of the same coin. A maintainable system is easy for a new developer to understand and safely modify. A scalable system can grow in features and team size without collapsing into a mess. This is where you discuss clear component boundaries, predictable state management, and overall code organization.

Reliability: What happens when things break? An API fails, the network is flaky, a third-party script times out. A reliable system anticipates failure and degrades gracefully. This means designing for empty states, loading states, and error states from the beginning. A blank white screen is never the right answer.

A Framework for Decomposing Any UI

When you get a prompt, don't jump to libraries or infrastructure. Start by breaking the problem down from the user's perspective into three layers.

  1. UI & Components: What are the main visual blocks on the page? For a product page, it's the image gallery, product description, variant selectors, "add to cart" button, and reviews section. Sketch these out first.

  2. State Management: What data does each component need to render? What state is local to a single component (e.g., the currently selected image in a gallery) versus what is shared globally (e.g., the contents of the shopping cart)? Define the shape of the data and where it lives.

  3. Data Flow: How does data get into the system and how does it change? Trace a user interaction from a click to the final UI update. This flow is the backbone of most data-driven applications.

The trap: Many candidates jump straight to "I'll use Redux for state management" or "I'll fetch with React Query." These are implementation details. First, define what the state is and how it flows. The choice of tool comes later, as a solution to the specific problems you've just identified.

From Principles to Code

Your design discussion will eventually touch on implementation. When you write or describe code, it must reflect the principles you've been discussing. A data-fetching component is a perfect place to demonstrate this, as it involves state, asynchronicity, and reliability.

This example shows a clear separation of concerns. The api service handles network logic and error normalization. The UserList component manages its own state machine (idle -> loading -> success/error) and renders the UI accordingly. It doesn't mix those concerns.

// services/api.ts
export async function api<T>(url: string): Promise<T> {
  const response = await fetch(url);
  if (!response.ok) {
    const errorText = await response.text();
    throw new Error(`API Error: ${response.status} - ${errorText}`);
  }
  return response.json() as Promise<T>;
}

// components/UserList.tsx
import React, { useEffect, useState } from 'react';
import { api } from '../services/api';

interface User {
  id: number;
  name: string;
  email: string;
}

type Status = 'idle' | 'loading' | 'success' | 'error';

export function UserList() {
  const [users, setUsers] = useState<User[]>([]);
  const [status, setStatus] = useState<Status>('idle');
  const [error, setError] = useState<Error | null>(null);

  useEffect(() => {
    async function getUsers() {
      setStatus('loading');
      setError(null);
      try {
        const data = await api<User[]>('https://jsonplaceholder.typicode.com/users');
        setUsers(data);
        setStatus('success');
      } catch (err) {
        setError(err instanceof Error ? err : new Error('An unknown error occurred'));
        setStatus('error');
      }
    }
    
    getUsers();
  }, []);

  if (status === 'loading' || status === 'idle') {
    return <div>Loading users...</div>;
  }

  if (status === 'error') {
    return <div style={{ color: 'red' }}>Error: {error?.message}</div>;
  }

  return (
    <div>
      <h2>User List</h2>
      <ul>
        {users.map(user => (
          <li key={user.id}>
            <strong>{user.name}</strong> ({user.email})
          </li>
        ))}
      </ul>
    </div>
  );
}

Try it

Take 15 minutes to sketch the architecture for a product page on an e-commerce site. Draw boxes for the main components (image gallery, product info, reviews). For each box, list the state it needs and note whether that state is local or must be shared with other components.

Next: We'll formalize these concepts in Core Frontend Architecture Concepts.

Lock it in — apply this lesson under interview conditions.

Try a free mock interviewPractice system design problems
Next

Core Frontend Architecture Concepts