{"id":28963701,"url":"https://github.com/mohsinmuzamil/chatly","last_synced_at":"2026-05-08T00:40:48.801Z","repository":{"id":300211475,"uuid":"1005507022","full_name":"MohsinMuzamil/Chatly","owner":"MohsinMuzamil","description":"Welcome to Chatly, a learning-focused Android chat application demonstrating modern best practices in app architecture, real-time communication, and cloud integration. This project is designed for students, hobbyists, and anyone interested in understanding how to build a scalable chat app using MVVM, Firebase, Room, and popular open-source librarie","archived":false,"fork":false,"pushed_at":"2025-06-20T11:58:04.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T12:43:18.955Z","etag":null,"topics":["android","authentication","chat-app","cloudinary","coroutines","demo","demo-app","firebase","firestore","glide-library","kotlin","learning-app","material-design","mvvm","mvvm-architecture","offline-support","realtime-messaging","room-database"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohsinMuzamil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T10:35:05.000Z","updated_at":"2025-06-20T12:11:39.000Z","dependencies_parsed_at":"2025-06-20T12:53:45.822Z","dependency_job_id":null,"html_url":"https://github.com/MohsinMuzamil/Chatly","commit_stats":null,"previous_names":["mohsinmuzamil/chatly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohsinMuzamil/Chatly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohsinMuzamil%2FChatly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohsinMuzamil%2FChatly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohsinMuzamil%2FChatly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohsinMuzamil%2FChatly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohsinMuzamil","download_url":"https://codeload.github.com/MohsinMuzamil/Chatly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohsinMuzamil%2FChatly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601534,"owners_count":23183099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","authentication","chat-app","cloudinary","coroutines","demo","demo-app","firebase","firestore","glide-library","kotlin","learning-app","material-design","mvvm","mvvm-architecture","offline-support","realtime-messaging","room-database"],"created_at":"2025-06-24T04:12:15.218Z","updated_at":"2026-05-08T00:40:48.675Z","avatar_url":"https://github.com/MohsinMuzamil.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatly – Android Chat App for Learning Modern Development\n\nWelcome to **Chatly**, a learning-focused Android chat application demonstrating modern best practices in app architecture, real-time communication, and cloud integration.  \nThis project is designed for students, hobbyists, and anyone interested in understanding how to build a scalable chat app using **MVVM**, **Firebase**, **Room**, and popular open-source libraries.\n\n---\n\n## Overview\nChatly is a modern Android chat app using:\n- **MVVM** architecture\n- **Room** for local database (offline support)\n- **Firebase Authentication** for auth\n- **Firestore** for user \u0026 message storage\n- **Cloudinary** for profile photo uploads\n- **Glide** for image loading\n\n---\n## 🖼️ Screenshots\n\n\n![Chatly Architecture Diagram](https://github.com/user-attachments/assets/95ff21cf-3846-4149-8ab0-3af2aff5d68b)\n\n---\n## ✨ What You'll Learn\n\n- **MVVM Architecture**: How to separate UI, business logic, and data layers for maintainable code.\n- **Firebase Authentication**: Secure user login and registration.\n- **Cloud Firestore**: Real-time storage and retrieval of user profiles and chat messages.\n- **Room Database**: Implementing offline caching and local-first data access.\n- **Cloudinary Integration**: Uploading and showing profile images from the cloud.\n- **Modern UI**: Using Material Design, RecyclerView, custom views, and Glide for image loading.\n- **Asynchronous Programming**: Using Kotlin coroutines, StateFlow, and LiveData for reactive updates.\n- **Clean Repository Pattern**: Abstracting data sources for robust, testable code.\n\n---\n\n## 🏗️ Project Architecture\n\n**Chatly** follows the MVVM (Model-View-ViewModel) architecture:\n\n- **UI Layer**: Activities, RecyclerViews, Adapters, and custom views (e.g., TypingIndicatorView).\n- **ViewModel Layer**: Holds UI state, business logic, and exposes reactive data (LiveData/Flow).\n- **Repository Layer**: Manages data sources (local Room database and remote Firebase/Cloudinary).\n- **Model Layer**: Data classes for users and messages.\n- **Local Database**: Room for offline support and caching.\n- **Remote Services**: Firebase Auth for authentication, Firestore for real-time data, Cloudinary for image upload.\n\n---\n\n## Main Layers \u0026 Data Flow\n\n```mermaid\nflowchart TD\n    subgraph UI\n        A1(SplashScreenActivity)\n        A2(GreetingActivity)\n        A3(LoginActivity)\n        A4(RegisterActivity)\n        A5(MainActivity)\n        A6(ChatActivity)\n        A7(ProfileActivity)\n        A8(EditProfileActivity)\n        A9(UserDetailActivity)\n    end\n\n    subgraph ViewModel\n        VM1(AuthViewModel)\n        VM2(ProfileViewModel)\n        VM3(ChatViewModel)\n    end\n\n    subgraph Repository\n        R1(ProfileRepository)\n        R2(ChatRepository)\n    end\n\n    subgraph Local\n        L1(Room DB)\n        L2(UserDao)\n        L3(MessageDao)\n    end\n\n    subgraph Remote\n        F1(Firebase Auth)\n        F2(Firestore)\n        F3(Cloudinary)\n    end\n\n    %% UI to ViewModel\n    A3 --\u003e VM1\n    A4 --\u003e VM1\n    A5 --\u003e VM2\n    A7 --\u003e VM2\n    A8 --\u003e VM2\n    A6 --\u003e VM3\n\n    %% ViewModel to Repository\n    VM1 --\u003e R1\n    VM2 --\u003e R1\n    VM3 --\u003e R2\n\n    %% Repository to Local/Remote\n    R1 --\u003e L2\n    R1 --\u003e F2\n    R2 --\u003e L3\n    R2 --\u003e F2\n\n    %% Room\n    L1 \u003c--\u003e L2\n    L1 \u003c--\u003e L3\n\n    %% Remote dependencies\n    R1 --\u003e F1\n    R1 --\u003e F3\n    VM1 --\u003e F1\n\n    %% Extra: Image Loading\n    A5 -.-\u003e|Glide| A5\n    A6 -.-\u003e|Glide| A6\n    A7 -.-\u003e|Glide| A7\n    A8 -.-\u003e|Glide| A8\n    A9 -.-\u003e|Glide| A9\n```\n---\n\n## Key Technologies\n\n| Layer         | Technology/Library        | Purpose                           |\n|---------------|--------------------------|-----------------------------------|\n| UI            | Android Activities       | User interface                    |\n| UI            | RecyclerView, Adapters   | List users/messages               |\n| UI            | Glide                    | Image loading                     |\n| UI            | DataBinding/ViewBinding  | View binding                      |\n| Local DB      | Room, DAO                | Local caching (messages, users)   |\n| Auth          | Firebase Auth            | Login/Register/Logout             |\n| Remote DB     | Firestore                | User/message cloud storage        |\n| Image Upload  | Cloudinary, OkHttp       | Profile photo upload              |\n| MVVM          | ViewModel, LiveData      | State \u0026 business logic            |\n| Networking    | OkHttp                   | Cloudinary upload                 |\n\n---\n\n## Data Flow Example (Sending a Message)\n\n1. **User** types and sends a message in `ChatActivity`.\n2. `ChatViewModel.sendMessage()` is called.\n3. `ChatRepository.sendMessage()`:\n    - Stores the message in **Room** for offline support.\n    - Sends the message to **Firestore** for cloud sync.\n4. **Firestore** triggers updates for other users/devices.\n5. UI observes Room for real-time updates.\n\n---\n\n## Data Models Summary\n\n- **User/UserEntity**: uid, email, displayName, mobile, photoUrl, dob, gender\n- **Message**: id, messageId, senderId, receiverId, content, timestamp, isMine\n\n---\n\n## Component Responsibilities\n\n- **SplashScreenActivity**: Logo animation, auth check, route to main/greeting.\n- **GreetingActivity**: Welcome screen, go to login.\n- **LoginActivity/RegisterActivity**: Auth forms, state via AuthViewModel.\n- **MainActivity**: User list, launches chats, handles logout.\n- **ChatActivity**: One-on-one chat, message send/receive, user detail.\n- **ProfileActivity/EditProfileActivity**: Show/edit profile, Cloudinary upload.\n- **UserDetailActivity**: Show other user info.\n- **TypingIndicatorView**: Custom view for \"is typing\" status.\n\n---\n\n## Storage Structure (Firebase)\n\n- **Firestore**\n    - `/users/{userId}`\n    - `/messages/{messageId}`\n\n- **Room (local)**\n    - `user` table\n    - `messages` table\n\n- **Cloudinary**\n    - Used to store profile images, save URL in Firestore.\n\n---\n\n## Expandability\n\n- Add presence, typing, and read receipts using Firestore/Realtime Database.\n- Secure data with Firebase Security Rules.\n- Test offline/online sync thanks to Room + Firestore.\n\n---\n\n## How to Read This Diagram\n\n- **Arrows** show dependencies and data flow.\n- **Glide** is used in multiple Activities for images.\n- **Repositories** mediate between ViewModels and data sources (local/remote).\n- **Room** ensures offline support, Firestore syncs real-time chat.\n\n---\n\n## 📚 Educational Features\n\n- **Full Source Code**: Readable, well-commented code suitable for self-study.\n- **Learning-Oriented Structure**: Clear separation of concerns; easy to extend with new features (presence, typing, group chat, etc.).\n- **Offline-First Approach**: See how Room and Firestore interact to provide a seamless experience.\n- **Profile Management**: Edit, update, and upload profile images.\n- **Material Design**: Learn how to craft beautiful and usable Android interfaces.\n\n---\n\n## 🚀 Getting Started\n\n1. **Clone the repository**\n    ```bash\n    git clone https://github.com/MohsinMuzamil/Chatly.git\n    cd Chatly\n    ```\n\n2. **Open with Android Studio**\n\n3. **Firebase Setup**\n    - Add your `google-services.json` to the `/app` directory.\n    - Enable **Authentication** and **Firestore** in the [Firebase Console](https://console.firebase.google.com/).\n\n4. **Cloudinary (Image Upload)**\n    - Sign up at [Cloudinary](https://cloudinary.com/).\n    - Replace `cloud_name` and `unsigned_preset` in the code with your details.\n\n5. **Build and Run** on an emulator or device.\n\n---\n\n## 🔑 Key Technologies\n\n- **Kotlin**, **Android Jetpack (ViewModel, LiveData, Room)**\n- **Firebase Authentication**, **Firestore**\n- **Cloudinary** (Image upload via OkHttp)\n- **Glide** (Image loading)\n- **Coroutines \u0026 Flows** (Async/reactive programming)\n\n---\n\n## 🛡️ Security \u0026 Best Practices\n\n- **Authentication** required for all chat features.\n- **Firestore rules** restrict access to own data/messages.\n- **Repository pattern** for data abstraction.\n- **MVVM** for a clean, maintainable codebase.\n\n---\n\n## 🧑‍💻 For Learners \u0026 Contributors\n\n- **Read the code, change it, break it, extend it!**\n- Try adding features like group chat, presence, push notifications, or dark mode.\n- Pull requests and suggestions are welcome.\n\n---\n\n## 📄 License\n\nMIT License\n\n---\n\n**Made with ❤️ by Mohsin Muzamil**\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsinmuzamil%2Fchatly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohsinmuzamil%2Fchatly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsinmuzamil%2Fchatly/lists"}