Whenever you're ready, walk me through how you'd approach this.
How would you design a chat application?
Discuss the end-to-end design, including APIs, message persistence, real-time delivery, one-to-one and group conversations, presence, read receipts, offline delivery, and reconnection. Cover consistency, ordering, availability, scaling, abuse controls, and recovery from duplicate delivery or regional failures.