You now know how to design a chat application.
Architecture: ConversationList + ChatWindow + MessageComposer.
Real-time: WebSocket with reconnection and heartbeat.
State: Normalized by conversation. Don't load all messages at once.
Performance: Virtualize message list. Handle variable heights.
Optimistic UI: Show messages immediately. Queue for retry on failure.
Offline: IndexedDB storage. Sync on reconnect.
Interview tip: Chat combines many patterns. Reference specific techniques from earlier sections.