Skip to content

m-toufeeq/ChatMate

Repository files navigation

Messenger App

Welcome to the Messenger App! This is a Kotlin-based messaging application that leverages Firebase for backend services. The app is designed with a clean architecture using MVVM, and it includes features such as Firebase Cloud Messaging, Firestore, and Kotlin coroutines.

Features

  • Firestore: Real-time database to store chat messages.
  • Navigation Component: Simplifies the implementation of navigation within the app.
  • Two-Way Data Binding: Ensures that the UI and data model stay in sync.
  • MVVM Architecture: Separates concerns to improve code maintainability.
  • Kotlin Coroutines: Simplifies asynchronous programming.
  • Firebase Storage: Stores media files shared in the chat.

Firebase Structure

Messages

  • Collection: Messages
    • Document: chatroomid
      • Collection: chats
        • Document: Timestamp

Chatroom ID

The chatroomid is generated by joining the sender's and receiver's IDs using the sort function. This ensures that the unique ID remains consistent regardless of who is the sender or receiver.

Getting Started

Prerequisites

  • Android Studio
  • Firebase account

Installation

  1. Clone the repository:
    git clone https://github.com/PyromaniacSiphon/ChatMate
  2. Open the project in Android Studio.
  3. Add Firebase configuration:
    • Download the google-services.json file from your Firebase project settings.
    • Place the google-services.json file in the app directory of your project.
  4. Sync the project with Gradle files.

Usage

  1. Run the app on an emulator or physical device.
  2. Sign in or create a new account.
  3. Start messaging by selecting a contact or creating a new chat.

Project Structure

  • data: Contains data sources, including Firebase and local database interactions.
  • ui: Includes UI components and activities.
  • viewmodel: Contains ViewModel classes to manage UI-related data.
  • repository: Abstracts the data sources and provides data to the ViewModel.

Contributing

Contributions are welcome! Please create a pull request with a detailed description of your changes.

Acknowledgements


Feel free to reach out if you have any questions or suggestions!

Happy Coding! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published