medium

Design a Chat Application

Design a chat application supporting direct messages and group chats. Include user management, message sending and receiving, chat room creation, and message history.

Suggested time: 45 minutes

Loading the workspace...

About this problem

A chat app seems simple: type a message, hit send. But underneath, the system must guarantee consistent message ordering when multiple users post simultaneously, support both direct messages and group chats with different membership rules, persist messages for offline retrieval, and notify online members in real time. Let's break this down.

What your design needs to cover

  • Real-Time Messaging

  • Direct Messages and Group Chats

  • Chat Room Management

  • Message Persistence

Key challenges the editorial covers

Learn from other designs

Related problems

Guides