This is a simple real-time chat application built with Jetpack Compose, Room, and Firebase Firestore.
Modularization (app, core and feature library modules):
- UI (Jetpack Compose) → displays chat lists and conversations.
- ViewModel (AndroidX Lifecycle) → manages state, listens for Firestore updates, and triggers database sync.
Data Layer:
- Room Database for offline caching and unsynced messages.
- Firestore for real-time communication.
Dependency Injection: Hilt modules provide Room, FirebaseFirestore, FirebaseAuth, and FirebaseMessaging.
Offline-First Approach: Messages are stored locally first, then synced to Firestore in the background.
- User Authentication (Firebase Auth).
- Chat List Screen showing all active chats.
- Chat Detail Screen with real-time messages (sending and receiving).
- Offline Support: Messages are saved in Room and synced when back online.
- Firestore Sync (syncPendingMessages) ensures reliability.
- Push Notifications Ready (via Firebase Messaging, basic setup included).
- Added unsynced message retry mechanism (pending messages sync automatically).
- Material 3 UI with Compose.
- Hilt DI for cleaner, testable code.
- Typing Indicator not yet implemented.
- Message Read Receipts missing.
- Push Notifications only partially integrated (device tokens stored, but not yet hooked into Firestore chat logic).
- Better Error Handling could be added for network and database sync failures.
- UI Polish (avatars, message bubbles, timestamps) could be improved with more time.



- Android Studio Arctic Fox or later
- Firebase project setup
- Google Services JSON file configured
- Clone the repository
- Open in Android Studio
- Add your
google-services.json
file - Build and run the project
- Jetpack Compose
- Room Database
- Firebase Firestore
- Firebase Auth
- Firebase Messaging
- Hilt for Dependency Injection
- Material Design 3
To build this project, simply open it in Android Studio and click "Run" or use the command line:
./gradlew assembleDebug