Hey developers,I'm building a chat app and need help choosing the right local and remote database setup. I want fast message syncing, offline support, and scalability.
Right now I’m evaluating:
Firestore
SQLite
Realm
Supabase
What are your experiences with performance, syncing, and handling large message histories (thousands per user)? Any recommendations or gotchas?
App is built with [Flutter / React Native / Swift / Kotlin].
Thanks in advance!
The best database setup for a mobile chat app depends on your needs for real-time sync, offline support, and scalability:
Firestore (Firebase) – Best for real-time messaging, auto-sync across devices, serverless setup, and push notifications. Great for startups and scaling quickly.
SQLite – Lightweight and local-only. Good for offline storage but not ideal for real-time sync unless paired with a backend.
Realm – Fast, offline-first, and syncs automatically with a backend (MongoDB Realm). Great for smooth UX in chat apps.
Custom Backend + DB (PostgreSQL/MySQL + Redis) – For enterprise-scale apps, you’ll likely need a custom backend with caching (Redis), message queues (Kafka/RabbitMQ), and WebSockets for real-time delivery.