A modern Android chat application with real-time messaging, push notifications, and support for audio messages, image sharing, and file sharing. Built with Kotlin and following MVVM architecture patterns.
- Android Studio Hedgehog (2023.1.1) or later
- JDK 17 or later
- Android SDK 34
- Firebase project
- Create a Firebase project at Firebase Console
- Add an Android app to your Firebase project
- Download the
google-services.jsonfile - Place
google-services.jsonin theapp/directory - Configure Firestore Security Rules:
- Go to Firebase Console > Firestore Database > Rules
- Deploy the security rules from
firestore.rulesfile in this project - The rules allow authenticated users to:
- Read any user document
- Create/update/delete their own user document
- Read/create/update/delete messages they are part of
- Important: Without proper security rules, the app will crash with permission errors
- Clone the repository
- Open the project in Android Studio
- Sync Gradle files
- Ensure all prerequisites are met
- Add
google-services.jsonto theapp/directory - Build and run the project
- MVVM (Model-View-ViewModel) - Clean architecture pattern
- Single Activity Architecture - Multiple fragments with Navigation Component
- ViewBinding & DataBinding - Type-safe view references and declarative layouts
- Lifecycle-Aware Components - AndroidX Lifecycle 2.7.0
- AndroidX Navigation 2.7.7 - Type-safe navigation with Safe Args
- Material Design Components 1.11.0 - Modern Material 3 UI components
- AndroidX Lifecycle 2.7.0 - ViewModel, LiveData, and lifecycle management
- Glide 4.16.0 - Image loading and caching
- EventBus 3.3.1 - Event-driven communication
- Gson 2.10.1 - JSON serialization
- Dexter 6.2.3 - Runtime permissions handling
- Firebase Authentication - Email/password authentication
- Cloud Firestore - Real-time NoSQL database
- Firebase Storage - File and media storage
- Firebase Cloud Messaging (FCM) - Push notifications
- Firebase Analytics - User analytics and insights
- Firebase Crashlytics - Crash reporting and monitoring
- Firebase BoM 32.8.0 - Dependency version management
- Download Manager - File downloads
- Media Recorder - Audio recording
- Notification Manager - Push notifications
app/src/main/java/com/ganainy/ourchat/
├── data/
│ └── model/ # Data models (User, Message, ChatParticipant, etc.)
├── service/ # Background services (FCM, etc.)
├── ui/ # UI components organized by feature
│ ├── chat/ # Chat functionality
│ ├── contacts/ # Contacts management
│ ├── findUser/ # User search and discovery
│ ├── home/ # Home screen with chat previews
│ ├── login/ # Authentication
│ ├── profile/ # User profile management
│ └── ...
└── Utils/ # Utility classes and helpers
- Minimum SDK: 23 (Android 6.0 Marshmallow)
- Target SDK: 34 (Android 14)
- Compile SDK: 34





