Frontend System Design1 min readPremium

Design Chat Application – Frontend System Design Guide

Chat application frontend system design cover
In this guide, we design a chat app’s frontend: real-time messaging over WebSockets, offline support, and infinite scrolling through message history.

Requirements

Functional

You provided the following main functional requirements:

  1. Real-time sending and receiving of messages across devices.
  2. Offline support: Messages sent offline should be stored and then sent when the user comes back online.

Clarifying Questions:

  1. Is there any authentication required for users?
    1. Assume users are authenticated.
  2. Do we need features like message read indicators, typing indicators, or group chats?
    1. If we have time at the end, right now, out of scope.
  3. What about media messages, like images, videos, or files?
    1. If we have time at the end, right now, out of scope.
  4. Is message history preserved indefinitely, or is there some sort of retention policy?
    1. We will leave that up to you to follow best practices.
  5. How should notifications be handled?
    1. Out of scope right now.

Non-Functional

  1. Observability: Given that every user might send or receive messages multiple times a... premium content.
Premium

Keep reading with Premium

Get the rest of this guide plus every premium question, solution, and system design deep dive.

  • All premium solutions
  • System design deep dives
  • Company-specific prep

4.9/5 from our users