{"id":22451945,"url":"https://github.com/jsericksk/simple-chat","last_synced_at":"2025-08-02T00:32:31.955Z","repository":{"id":44698759,"uuid":"437991571","full_name":"jsericksk/Simple-Chat","owner":"jsericksk","description":"Simple chat project created with Jetpack Compose and Firebase, using clean architecture + MVVM.","archived":false,"fork":false,"pushed_at":"2022-10-07T19:42:49.000Z","size":16534,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-06T21:20:44.350Z","etag":null,"topics":["clean-architecture","datastore-android","firebase-authentication","firebase-cloud-storage","firebase-firestore-database","jetpack-compose","multimodule-android-app","mvvm-android"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsericksk.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}},"created_at":"2021-12-13T19:01:34.000Z","updated_at":"2023-03-06T18:39:00.000Z","dependencies_parsed_at":"2022-09-08T21:42:02.381Z","dependency_job_id":null,"html_url":"https://github.com/jsericksk/Simple-Chat","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsericksk%2FSimple-Chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsericksk%2FSimple-Chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsericksk%2FSimple-Chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsericksk%2FSimple-Chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsericksk","download_url":"https://codeload.github.com/jsericksk/Simple-Chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228419604,"owners_count":17916772,"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":["clean-architecture","datastore-android","firebase-authentication","firebase-cloud-storage","firebase-firestore-database","jetpack-compose","multimodule-android-app","mvvm-android"],"created_at":"2024-12-06T06:09:22.557Z","updated_at":"2024-12-06T06:09:23.311Z","avatar_url":"https://github.com/jsericksk.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Chat with Jetpack Compose and Firebase\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/app-demo.gif\" width=\"320\" height=\"691\" /\u003e\n  \u003cimg src=\"images/validation-demo.gif\" width=\"320\" height=\"691\" /\u003e\n\u003c/p\u003e\n\n# About the project\n\nWhen this project was [initially created](https://github.com/jsericksk/Simple-Chat/tree/old-version), the main objective was to improve my knowledge of Firebase and Jetpack Compose, in addition to creating a chat app with several different Firebase tools. However, in the recreation, the goal was a little more distinct from the initial idea.\n\nThe project was recreated in order to improve my knowledge in **modularization** and **clean architecture**, with a project divided into layers separated by different modules.\n\n## Project architecture\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/project-architecture.png\" /\u003e\n\u003c/p\u003e\n\n## Structure in Firebase Firestore\n\n- ***users/***: All registered users.\n- ***chat_messages/chatId/messages/***: Messages from users, having as **chatId** an ID generated from the two userId of the conversation.\n- ***latest_messages/userId/messages/chatId/***: Latest messages from each user.\n\n## App features\n\n- User registration with email and password;\n- One-to-one chat;\n- List of all registered users;\n- Dark and light theme with easy user change option;\n- Quick profile view.\n\n## Clone\n\nAfter cloning the repository, follow the steps of [Firebase project setup](https://firebase.google.com/docs/android/setup) and add your **google-services.json** file to the project.\n\n## Explanation of project modules and layers\n\n### - app\n\nAndroid module. It represents the layer popularly known as \"presentation\", which contains all the code and logic related to the user interface, which is made using **Jetpack Compose**.\n\n- Dependency with other modules: *common, domain and data*. (**Important note**: The inclusion of the data module in the *build.gradle.kts* is for dependency injection only, as it is not possible to access the repository implementation classes without including the data layer. *The data layer is not accessed directly by the presentation layer. For this, the use cases of the domain layer are used.*)\n\n### - domain\n\nCommon Kotlin module, no dependencies with Android.\nRepresents the app's business rules. Contains all the use cases responsible for CRUD and data validation, in addition to the repository interfaces.\n\n- Dependency with other modules: *commom*.\n\n### - data\n\nAndroid module. Represents the app's data layer, used to get/save both remote and local data. Contains the domain layer repository implementations.\n\n- Dependency with other modules: *common and domain*.\n\n### - common\n\nCommon Kotlin module, no dependencies with Android.\nContains some useful classes that will be used in all other layers, like preference constants and exceptions.\n\n- It has no dependency with other modules.\n\n## Push notifications\n\nThe old version of this project has the function of push notifications when receiving new messages, but this functionality is not present in the current project.\n\n## Unit tests\n\nThe project has some unit tests of the validation use cases, which can be accessed in the **domain** module.\n\n## Technologies and libraries used\n\n- Firebase:\n  - [Auth](https://firebase.google.com/docs/auth): Used to authenticate users with email and password.\n  - [Firestore](https://firebase.google.com/docs/firestore): Realtime database to store user information.\n  - [Storage](https://firebase.google.com/docs/storage): Used to store users' profile pictures.\n- [Hilt](https://developer.android.com/training/dependency-injection/hilt-android): Dependency injection.\n- [DataStore](https://developer.android.com/topic/libraries/architecture/datastore): Used for storing data such as user preferences.\n- [Accompanist](https://github.com/google/accompanist):\n  - **Navigation Animation**: Used for navigation with animation with **Navigation Compose**;\n  - **Pager and Pager-Indicators**: Used for XML ViewPager-like component.\n- [Landscapist](https://github.com/skydoves/landscapist): Used for image loading.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsericksk%2Fsimple-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsericksk%2Fsimple-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsericksk%2Fsimple-chat/lists"}