A modern, offline-first Android chat application built entirely with Jetpack Compose. This project demonstrates a robust, scalable architecture and a feature-set designed for a seamless user experience.
- Real-Time Communication: Leverages Firebase Cloud Firestore to deliver instant messaging with real-time updates.
- Offline-First Architecture: Caches data using the Room persistence library, ensuring seamless access and message queueing even without a network connection. Data syncs automatically upon reconnection.
- Multimedia Messaging: Utilizes Firebase Cloud Storage for efficient image sharing and retrieval.
- Declarative UI: The entire UI is built with Jetpack Compose, enabling a reactive, state-driven user interface that is more concise and powerful than the traditional XML-based approach.
- Single Source of Truth (SSoT): The repository pattern ensures that all application data flows from a single, reliable source (the Room database), which is synchronized with the network. This provides data consistency and a seamless offline experience.
- State Management: Leverages
ViewModels
and Kotlin'sStateFlow
to manage and expose UI state, ensuring that the UI is always a reflection of the underlying application data in a lifecycle-aware manner. - Dependency Injection: Uses Koin for dependency inversion, decoupling components and making them easier to manage, replace, and test.
This project utilizes a curated selection of modern libraries and tools to deliver a high-quality product.
-
Core:
- Kotlin: Official language for Android development.
- Coroutines & Flow: For asynchronous and reactive programming.
-
UI:
- Jetpack Compose: Modern toolkit for building native Android UI.
- Material 3: The latest version of Google's open-source design system.
-
Architecture & DI:
- Jetpack ViewModel: Manages UI-related data in a lifecycle-conscious way.
- Koin: A pragmatic and lightweight dependency injection framework.
-
Data & Networking:
- Room: Persistence library for robust offline data caching.
- Firebase Suite:
- Authentication: For secure user sign-in and identity management.
- Cloud Firestore: For real-time, persistent data synchronization.
- Cloud Storage: For storing and serving user-generated content like images.
- Create a new project in your Firebase Console.
- Generate a
SHA-1
debug key by running./gradlew signingReport
in the Android Studio terminal and add it to your Firebase project settings. - Download the
google-services.json
file from your Firebase project console. - Switch to
Project
view in Android Studio and place thegoogle-services.json
file in theapp/
directory. - Build and run the application.
The following features are planned for future development to further enhance the application's capabilities:
- Presence System: Implement user status indicators (Online, Typing, Last Seen).
- Voice Messaging: Add support for sending and receiving voice notes.
- Expanded Media Support: Allow sharing of additional media types like videos and documents.
- Group Chat Functionality: Develop features for multi-user conversations.
- Contact Integration: Introduce the ability to invite users from the device's contacts.
- WebRTC Integration: Implement audio and video calling features.
Contributions are welcome! Please feel free to submit a pull request. This project would particularly benefit from contributions in the area of unit and instrumentation testing to increase code coverage and robustness.