• Stars
    star
    366
  • Rank 115,827 (Top 3 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ’™ Android sample Avengers chat application using Stream Chat SDK based on MVVM (ViewModel, Coroutines, Room, Hilt, Repository) architecture.

License API KotlinWeekly API Stream Feeds

AvengersChat demonstrates modern Android development based on MVVM architecture and Stream Chat SDK for Android.

The purpose of this repository is to demonstrate below:

  • Implementing each different feature with modularization and navigation.
  • Implementation of Android architecture components with Jetpack libraries, such as Hilt and AppStartup.
  • Performing background tasks with Kotlin Coroutines.
  • Integrating chat systems with Stream Chat SDK for Android for real-time event handling.

โœ๏ธ Tutorials

banner

You can learn more about this project from the blog posts and Youtube videos. If you're interested in the materials, check out the Tutorials Page!

๐Ÿ’ก Additional Repositories

If you're interested in additional repositories that were built with Jetpack Compose and Stream SDK, check out the repositories below:

  • WhatsApp Clone Android: ๐Ÿ“ฑ WhatsApp clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat SDK for Compose.
  • Slack Clone Android: ๐Ÿ“ฑ A chat demo app built with Jetpack Compose and Stream Chat SDK following clean architecture principles.
  • Stream Draw Android: ๐Ÿ›ฅ Stream Draw is a real-time multiplayer drawing & chat game app built entirely with Jetpack Compose.
  • Facebook Messenger Clone: Facebook Messenger clone using Stream SDK & Jetpack Compose.

๐Ÿ“ฒ Download APK

Go to the Releases to download the latest APK.

โ›ด Stream Chat SDK for Android

AvengersChat was built with Stream Chat SDK for Android for implementing messaging systems. You can learn more about the SDK with the materials below:

๐Ÿ“ท Previews

If you find funny moments on this demo application, feel free to join and share the moment in this thread!

๐Ÿ›  Tech stack & Open source libraries

  • Minimum SDK level 21.
  • 100% Kotlin based + Coroutines + Flow for asynchronous.
  • Hilt for dependency injection.
  • Jetpack
    • Lifecycle: Dispose observing data when lifecycle state changes.
    • ViewModel: UI related data holder and lifecycle aware.
    • App Startup: Provides a straightforward, performant way to initialize components at application startup.
    • Navigation: For navigating screens and provides deeplinks.
    • Room: Constructs Database by providing an abstraction layer over SQLite to allow fluent database access.
    • Hilt: Dependency Injection.
  • Architecture
    • MVVM Architecture: View - DataBinding - ViewModel - Model
    • Bindables: Android DataBinding kit for notifying data changes to UI layers.
    • Repository pattern
  • Material Design & Animations: Design system created by Google to help teams build high-quality digital experiences.
  • Retrofit2 & OkHttp3: Construct the REST APIs and paging network data.
  • Sandwich: Construct lightweight http API response and handling error responses.
  • Moshi: A modern JSON library for Kotlin and Java.
  • Coil: Image loading for Android backed by Kotlin Coroutines.
  • TransformationLayout: Implementing transformation motion animations.
  • android-youtube-player: YouTube Player library for Android and Chromecast, stable and customizable.
  • DiscreteScrollView: Implementing a scrollable list of items.
  • Timber: A logger with a small, extensible API which provides utility.

โœ… Supported features

  • Light and Dark themes.
  • Different color themes by a chosen character.
  • 100% offline mode supports.
  • Live stream chat example.
  • Channel and message lists.
  • Direct message and group messages.
  • Mentioned message list.
  • Custom emoji reactions.
  • Guest mode.
  • User online/offline status.
  • User last active date.
  • User info & direct message dialogs.
  • Visual animations like transition.
  • And a lot of features by Stream Android SDK!

โ˜‘๏ธ TODO

Anyone can contribute to our open source project! Please kindly read this Contributing Guideline before contributing to our project. ๐Ÿ˜Ž

  • Modify a user profile image.
  • Login with a new guest user.
  • Push notifications for new messages.
  • Create group chats by selecting users.
  • Access user info dialog everywhere.
  • Add unit test cases for all business logic.

๐Ÿ› Architecture

AvengersChat is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.

architecture

The overall architecture of AvengersChat is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:

AvengersChat was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.

Architecture Overview

architecture

  • Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
  • The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

architecture

The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configuration changes.

  • UI elements observe the data flow via DataBinding, which is the most essential part of the MVVM architecture.
  • With Bindables, which is an Android DataBinding kit for notifying data changes, you can implement two-way binding, and data observation in XML very clean.

Data Layer

architecture

The data Layer consists of repositories, which include business logic, such as querying data from the local database and requesting remote data from the network. It is implemented as an offline-first source of business logic and follows the single source of truth principle.

AvengersChat is an offline-first app is an app that is able to perform all, or a critical subset of its core functionality without access to the internet. So users don't need to be up-to-date on the network resources every time and it will decrease users' data consumption. For further information, you can check out Build an offline-first app.

Modularization

architecture

AvengersChat adopted modularization strategies below:

  • Reusability: Modulizing reusable codes properly enable opportunities for code sharing and limits code accessibility in other modules at the same time.
  • Parallel Building: Each module can be run in parallel and it reduces the build time.
  • Strict visibility control: Modules restrict to expose dedicated components and access to other layers, so it prevents they're being used outside the module
  • Decentralized focusing: Each developer team can assign their dedicated module and they can focus on their own modules.

For more information, check out the Guide to Android app modularization.

๐Ÿ’ฏ MAD Score

summary

Content Credits

All copyrights of the contents, concepts, and phrases that are used in this open-source project belong to Marvel Studios.

Find this repository useful? ๐Ÿ’™

Support it by joining stargazers for this repository. โญ
Also, follow maintainers on GitHub for our next creations! ๐Ÿคฉ

License

Copyright 2021 Stream.IO, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

Winds

A Beautiful Open Source RSS & Podcast App Powered by Getstream.io
JavaScript
8,813
star
2

stream-chat-android

๐Ÿ’ฌ Android Chat SDK โžœ Stream Chat API. UI component libraries for chat apps. Kotlin & Jetpack Compose messaging SDK for Android chat
Kotlin
1,409
star
3

vg

Virtualgo: Easy and powerful workspace based development for go
Go
1,311
star
4

whatsApp-clone-compose

๐Ÿ“ฑ WhatsApp clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat/Video SDK for Compose.
Kotlin
1,240
star
5

stream-react-example

Use React and Redux to build your own feature-rich and scalable social network app! Visit cabin.getstream.io for an overview of all 8 tutorials and a live demo.
HTML
923
star
6

stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
Dart
839
star
7

stream-chat-react-native

๐Ÿ’ฌ React-Native Chat SDK โžœ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
TypeScript
792
star
8

purposeful-ios-animations

Meaningful iOS animations built to inspire you in creating useful animations for your apps. Each of the animations here was cloned with SwiftUI. Have you seen an app animation you love to rebuild and add to this repo?, contact [@amos_gyamfi](https://twitter.com/amos_gyamfi) and [@stefanjblos](https://twitter.com/stefanjblos) on Twitter.
Swift
751
star
9

stream-chat-swift

๐Ÿ’ฌ iOS Chat SDK in Swift - Build your own app chat experience for iOS using the official Stream Chat API
Swift
750
star
10

swiftui-spring-animations

This repository serves as your reference and complete guide for SwiftUI Spring Animations. It demonstrates use cases for the various types of spring animations and spring parameters. No more guessing the values of the parameters for spring animations you create for your next iOS app.
Swift
679
star
11

stream-chat-react

React Chat SDK โžœ Stream Chat ๐Ÿ’ฌ
TypeScript
552
star
12

webrtc-android

๐Ÿ›ฐ๏ธ A versatile WebRTC pre-compiled Android library that reflects the recent WebRTC updates to facilitate real-time video chat for Android and Compose.
Kotlin
546
star
13

awesome-saas-services

A curated list of the best in class SaaS services for developers and business owners.
475
star
14

stream-django

Django Client - Build Activity Feeds & Streams with GetStream.io
Python
453
star
15

sketchbook-compose

๐ŸŽจ Jetpack Compose canvas library that helps you draw paths, images on canvas with color pickers and palettes.
Kotlin
436
star
16

avatarview-android

โœจ Supports loading profile images with fractional styles, shapes, borders, indicators, and initials for Android.
Kotlin
431
star
17

webrtc-in-jetpack-compose

๐Ÿ“ฑ This project demonstrates WebRTC protocol to facilitate real-time video communications with Jetpack Compose.
Kotlin
391
star
18

stream-video-android

๐Ÿ“ฒ Android Video SDK. Stream's versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.
Kotlin
361
star
19

stream-draw-android

๐Ÿ›ฅ Stream Draw is a real-time multiplayer drawing & chat game app built entirely with Jetpack Compose.
Kotlin
339
star
20

stream-chat-swiftui

SwiftUI Chat SDK โžœ Stream Chat ๐Ÿ’ฌ
Swift
329
star
21

stream-js

JS / Browser Client - Build Activity Feeds & Streams with GetStream.io
JavaScript
325
star
22

react-native-example

React Native Activity Feed example application
JavaScript
321
star
23

effects-library

The Effects Library allows developers to create sophisticated and realistic particle systems such as snow, fire, rain, confetti, fireworks, and smoke with no or minimal effort.
Swift
319
star
24

stream-laravel

Laravel Client - Build Activity Feeds & Streams with GetStream.io
PHP
314
star
25

flutter-samples

A collection of sample apps that use Stream
Dart
298
star
26

stream-rails

Rails Client - Build Activity Feeds & Streams with GetStream.io
Ruby
257
star
27

Streamoji

:godmode: Custom emoji rendering library for iOS apps with support for GIF & still images - plug-in extension for UITextView - performance, cache โœ… - Made with ๐Ÿ’˜ by @GetStream
Swift
248
star
28

react-native-bidirectional-infinite-scroll

๐Ÿ“œ React Native - Bidirectional Infinite Smooth Scroll
TypeScript
220
star
29

WhatsApp-Clone-Android

Tutorial which teaches you how to build a whatsapp chat clone on android using Kotlin, viewmodels, navigation component and Stream
Kotlin
218
star
30

butterfly

๐Ÿฆ‹ Butterfly helps you to build adaptive and responsive UIs for Android with Jetpack WindowManager.
Kotlin
213
star
31

slack-clone-react-native

Build a slack clone using react-native, Stream and react-navigation
JavaScript
206
star
32

react-native-activity-feed

Official React Native SDK for Activity Feeds
JavaScript
194
star
33

motionscape-app

MotionScape is your animations playground as a developer. You can see all animations and their parameters in effect with beautifully designed and handcrafted animation examples.
Swift
165
star
34

Android-Samples

๐Ÿ“• Provides a list of samples that utilize modern Android tech stacks and Stream Chat SDK for Android and Compose.
Kotlin
157
star
35

node-express-mongo-api

Starter project for a REST API with Node.js, Express & MongoDB ๐Ÿ”‹
JavaScript
151
star
36

stream-chat-js

JS / Browser Client - Build Chat with GetStream.io
TypeScript
149
star
37

stream-php

PHP Client - Build Activity Feeds & Streams with GetStream.io
PHP
139
star
38

meeting-room-compose

๐ŸŽ™๏ธ A real-time meeting room app built with Jetpack Compose to demonstrate video communications.
Kotlin
136
star
39

react-activity-feed

Stream React Activity Feed Components
TypeScript
136
star
40

stream-python

Python Client - Build Activity Feeds & Streams with GetStream.io
Python
136
star
41

stream-node-orm

NodeJS Client - Build Activity Feeds & Streams with GetStream.io
JavaScript
131
star
42

flat-list-mvcp

"maintainVisibleContentPosition" prop support for Android react-native
TypeScript
131
star
43

stream-log

๐Ÿ›ฅ A lightweight and extensible logger library for Kotlin and Android.
Kotlin
118
star
44

website-react-examples

TypeScript
118
star
45

react-native-samples

A collection of sample apps built using GetStream and React Native
JavaScript
116
star
46

stream-video-swift

SwiftUI Video SDK โžก๏ธ Stream Video ๐Ÿ“น
Swift
112
star
47

flutter-instagram-clone

An Instagram clone using Flutter and Stream Feeds
Dart
109
star
48

django_twitter

An example app built using getstream.io
Python
108
star
49

twitter-clone

Learn how to build a functional Twitter clone using Stream, 100ms, Algolia, RevenueCat and Mux ๐Ÿ˜Ž
Swift
107
star
50

accessible-inclusive-ios-animations

Provide ways to limit animations/motion people find jarring in your apps. This repo demonstrates accessible and inclusive iOS animations/motion with practical examples and best practices.
Swift
106
star
51

Stream-Example-Nodejs

An example app built using getstream.io
JavaScript
96
star
52

Android-Video-Samples

๐Ÿ“˜ Provides a collection of samples that utilize modern Android tech stacks and Stream Video SDK for Kotlin and Compose.
Kotlin
87
star
53

react-native-audio-player

JavaScript
86
star
54

stream-result

๐ŸšŠ Railway-oriented library to easily model and handle success/failure for Kotlin, Android, and Retrofit.
Kotlin
85
star
55

stream-ruby

Ruby Client - Build Activity Feeds & Streams with GetStream.io
Ruby
83
star
56

stream-chat-unity

๐Ÿ’ฌ Unity Chat Plugin by Stream โžœ These assets are the solution for adding an in-game text chat system to your Unity game.
C#
83
star
57

stream-go2

GetStream.io Go client
Go
82
star
58

stream-cli

Configure & manage Stream applications from the command line. ๐Ÿš€
Go
80
star
59

stream-tutorial-projects

This repo contains SwiftUI, Jetpack Compose, JS & React Native projects for some of the iOS and Android tutorial series in the Stream Developers YouTube channel (https://youtube.com/playlist?list=PLNBhvhkAJG6tJYnY-5oZ1JCp2fBNbVL_6).
Swift
80
star
60

mongodb-activity-feed

Activity Feed, Timeline, News Feed, Notification Feed with MongoDB, Node and CRDTs
JavaScript
77
star
61

TinyGraphQL

๐ŸŒธ Simple and lightweight GraphQL query builder for the Swift language - Made with ๐Ÿ’˜ by @GetStream
Swift
76
star
62

android-video-chat

โšก๏ธ Android Video Chat demonstrates a real-time video chat application by utilizing Stream Chat & Video SDKs.
Kotlin
75
star
63

slack-clone-expo

Slack clone using Expo, Stream and react-navigation
JavaScript
75
star
64

stream-feed-flutter

Stream Feed official Flutter SDK. Build your own feed experience using Dart and Flutter.
Dart
69
star
65

stream-chat-go

Stream Chat official Golang API Client
Go
68
star
66

fullstack-nextjs-whatsapp-clone

A sample codebase showcasing Stream Chat and Video to resembling WhatsApp, using NextJS, TailwindCSS and Vercel.
TypeScript
67
star
67

Stream-Example-Py

An example app built using getstream.io
CSS
61
star
68

SwiftUIMessagesUIClone

The SwiftUI Messages Clone consists of layout and composition clones of the iOS Messages app. It has Messages-like bubble and screen effects, reactions, and animations, all created with SwiftUI.
Swift
60
star
69

encrypted-web-chat

A web chat application end-to-end encrypted with the Web Crypto API
JavaScript
59
star
70

stream-video-js

GetStream JavaScript Video SDK
TypeScript
57
star
71

swift-lambda

ฮป Write HTTP services in Swift, deploy in seconds - Powered by AWS Lambda Runtime & Serverless Framework - Made with ๐Ÿ’˜ by @GetStream
Swift
57
star
72

stream-chat-python

Stream Chat official Python API Client
Python
56
star
73

liveshopping-android

๐Ÿ“น A demo app showcasing real-time livestreaming and messaging capabilities built with Jetpack Compose and Stream SDKs.
Kotlin
54
star
74

stream-java

Java Client - Build Activity Feeds & Streams with GetStream.io
Java
53
star
75

Stream-Example-Parse

Stream-Example-Parse
JavaScript
46
star
76

Stream-Example-PHP

An example app built using getstream.io https://getstream.io
PHP
46
star
77

android-chat-tutorial

Sample apps for the Stream Chat Android SDK's official tutorial
Java
46
star
78

stream-meteor

Meteor Client - Build Activity Feeds & Streams with GetStream.io
JavaScript
45
star
79

stream-video-flutter

Flutter Video SDK - Build your own video app experience using Dart, Flutter and the Stream Video Messaging API.
Dart
45
star
80

discord-clone-nextjs

Building a discord clone using NextJS, TailwindCSS, and the Stream Chat and Audio and Video SDKs.
TypeScript
45
star
81

python-chat-example

Chat with Python, Django and React
JavaScript
44
star
82

SwiftUIChristmasTree

๐ŸŒฒ Pure SwiftUI christmas tree with yearly updates. Enjoy ๐ŸŽ„
Swift
44
star
83

stream-chat-net

Stream Chat official .NET API Client
C#
43
star
84

stream-chat-dart

Dart SDK - Build Chat with GetStream.io
Dart
42
star
85

Stream-Example-Go-Cassandra-API

Go-powered API example using Cassandra
Go
38
star
86

Stream-Example-Rails

An example app built using getstream.io
Ruby
38
star
87

Stream-Example-Android

Java
38
star
88

foldable-chat-android

๐Ÿฆš Foldable chat Android demonstrates adaptive and responsive UIs with Jetpack WindowManager API.
Kotlin
35
star
89

stream-net

NET Client - Build Activity Feeds & Streams with GetStream.io
C#
35
star
90

stream-swift

Swift client for Stream API
Swift
35
star
91

stream-chat-angular

๐Ÿ’ฌ Angular Chat SDK โžœ Stream Chat. Build a chat app with ease.
TypeScript
34
star
92

SwiftUI-open-voip-animations

SwiftUI animations and UI designs for iOS calling, meeting, audio-room, and live streaming use cases. Find something missing? Let @amos_gyamfi know on Twitter.
33
star
93

node-restify-mongo-api

Starter project for a REST API with Node.js, Restify & MongoDB ๐Ÿ”‹
JavaScript
32
star
94

stream-chat-unreal

The official Unreal SDK for Stream Chat
C++
32
star
95

build-viking-sample

Sample app for Build Viking.
Dart
31
star
96

swift-activity-feed

Stream Swift iOS Activity Feed Components
Swift
29
star
97

stream-chat-ruby

Stream Chat official Ruby API Client
Ruby
29
star
98

swiftui-iMessage-clone

Swift
29
star
99

sign-in-with-apple-swift-example

iOS + Node.js authentication using Sign in with Apple
Swift
28
star
100

rate_limiter

A pure dart package to apply useful rate limiting strategies on regular functions.
Dart
28
star