Offline chat storage design
Chat in a secondhand marketplace app has to work for reading and writing on the subway. Design the local database schema and the sync flow so that messages sent offline reach the server later and order, duplicates, and read state stay straight.