├── .idea
├── .name
├── .gitignore
├── compiler.xml
├── misc.xml
└── inspectionProfiles
│ └── Project_Default.xml
├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── ic_chat_launcher_background.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── themes.xml
│ │ │ │ └── splash.xml
│ │ │ ├── font
│ │ │ │ ├── karla_bold.ttf
│ │ │ │ ├── karla_regular.ttf
│ │ │ │ ├── montserrat_light.ttf
│ │ │ │ ├── montserrat_medium.ttf
│ │ │ │ ├── montserrat_regular.ttf
│ │ │ │ └── montserrat_semibold.ttf
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_chat_launcher.png
│ │ │ │ └── ic_chat_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_chat_launcher.png
│ │ │ │ └── ic_chat_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_chat_launcher.png
│ │ │ │ └── ic_chat_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_chat_launcher.png
│ │ │ │ └── ic_chat_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_chat_launcher.png
│ │ │ │ └── ic_chat_launcher_round.png
│ │ │ ├── values-night
│ │ │ │ ├── themes.xml
│ │ │ │ └── splash.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_chat_launcher.xml
│ │ │ │ └── ic_chat_launcher_round.xml
│ │ │ ├── values-v23
│ │ │ │ └── splash.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ ├── ic_chat_launcher_foreground.xml
│ │ │ │ └── ic_chat.xml
│ │ │ └── raw
│ │ │ │ └── chat_dark.json
│ │ ├── ic_launcher-playstore.png
│ │ ├── ic_chat_launcher-playstore.png
│ │ ├── java
│ │ │ └── me
│ │ │ │ └── siddheshkothadi
│ │ │ │ └── chat
│ │ │ │ ├── ChatApplication.kt
│ │ │ │ ├── domain
│ │ │ │ ├── model
│ │ │ │ │ ├── Message.kt
│ │ │ │ │ ├── UserData.kt
│ │ │ │ │ └── User.kt
│ │ │ │ └── repository
│ │ │ │ │ ├── DataStoreRepository.kt
│ │ │ │ │ ├── FirebaseRepository.kt
│ │ │ │ │ └── UserRepository.kt
│ │ │ │ ├── ui
│ │ │ │ ├── theme
│ │ │ │ │ ├── Shape.kt
│ │ │ │ │ ├── Color.kt
│ │ │ │ │ ├── Theme.kt
│ │ │ │ │ └── Type.kt
│ │ │ │ ├── components
│ │ │ │ │ ├── DayHeader.kt
│ │ │ │ │ ├── Messages.kt
│ │ │ │ │ ├── ChatCard.kt
│ │ │ │ │ └── ChatBubble.kt
│ │ │ │ ├── screens
│ │ │ │ │ ├── ProfileScreen.kt
│ │ │ │ │ ├── MyProfileScreen.kt
│ │ │ │ │ ├── LoginScreen.kt
│ │ │ │ │ ├── ChatListScreen.kt
│ │ │ │ │ └── ChatScreen.kt
│ │ │ │ └── viewmodel
│ │ │ │ │ └── MainViewModel.kt
│ │ │ │ ├── data
│ │ │ │ ├── repository
│ │ │ │ │ ├── DataStoreRepositoryImpl.kt
│ │ │ │ │ ├── FirebaseRepositoryImpl.kt
│ │ │ │ │ └── UserRepositoryImpl.kt
│ │ │ │ └── UserDataSerializer.kt
│ │ │ │ ├── utils
│ │ │ │ ├── AESUtils.kt
│ │ │ │ └── RSAUtils.kt
│ │ │ │ ├── di
│ │ │ │ └── AppModule.kt
│ │ │ │ └── MainActivity.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── me
│ │ │ └── siddheshkothadi
│ │ │ └── chat
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── me
│ │ └── siddheshkothadi
│ │ └── chat
│ │ └── ExampleInstrumentedTest.kt
├── release
│ └── output-metadata.json
├── proguard-rules.pro
├── google-services.json
└── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── README.md
├── .gitignore
├── gradle.properties
├── gradlew.bat
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | Chat
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Chat
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/font/karla_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/karla_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/font/karla_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/karla_regular.ttf
--------------------------------------------------------------------------------
/app/src/main/ic_chat_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/ic_chat_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/montserrat_light.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/montserrat_medium.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/montserrat_regular.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/font/montserrat_semibold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_chat_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-hdpi/ic_chat_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_chat_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-mdpi/ic_chat_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_chat_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xhdpi/ic_chat_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_chat_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xxhdpi/ic_chat_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_chat_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_chat_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_chat_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-hdpi/ic_chat_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_chat_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-mdpi/ic_chat_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_chat_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xhdpi/ic_chat_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_chat_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xxhdpi/ic_chat_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_chat_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Project-Based-Learning-IT/e2ee-chat/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_chat_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_chat_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #EEEEEE
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FBFDFD
4 | #191C1D
5 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/ChatApplication.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat
2 |
3 | import android.app.Application
4 | import dagger.hilt.android.HiltAndroidApp
5 |
6 | @HiltAndroidApp
7 | class ChatApplication: Application() {}
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Apr 01 12:06:05 IST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_chat_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_chat_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/domain/model/Message.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.domain.model
2 |
3 | data class Message(
4 | val from: String = "",
5 | val to: String = "",
6 | val timestamp: String = "",
7 | val date: String = "",
8 | val time: String = "",
9 | val content: String = "",
10 | val secretKey: String = ""
11 | )
12 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/domain/model/UserData.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.domain.model
2 |
3 | import kotlinx.serialization.Serializable
4 | import me.siddheshkothadi.chat.domain.model.User
5 |
6 | @Serializable
7 | data class UserData(
8 | val user: User = User(),
9 | val privateKey: String = "",
10 | val secretKey: String = ""
11 | )
12 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/domain/model/User.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.domain.model
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data class User(
7 | val uid: String = "",
8 | val displayName: String = "",
9 | val email: String = "",
10 | val photoUrl: String = "",
11 | val publicKey: String = ""
12 | )
13 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/domain/repository/DataStoreRepository.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.domain.repository
2 |
3 | import kotlinx.coroutines.flow.Flow
4 | import me.siddheshkothadi.chat.domain.model.UserData
5 |
6 | interface DataStoreRepository {
7 | val userData: Flow
8 |
9 | suspend fun updateUserData(
10 | userData: UserData
11 | )
12 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "Chat"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 | val Shapes = Shapes(
8 | small = RoundedCornerShape(4.dp),
9 | medium = RoundedCornerShape(4.dp),
10 | large = RoundedCornerShape(0.dp)
11 | )
--------------------------------------------------------------------------------
/app/src/main/res/values-v23/splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/test/java/me/siddheshkothadi/chat/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "me.siddheshkothadi.chat",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/me/siddheshkothadi/chat/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("me.siddheshkothadi.chat", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -keep class me.siddheshkothadi.chat.domain.model.** { *; }
--------------------------------------------------------------------------------
/app/src/main/java/me/siddheshkothadi/chat/domain/repository/FirebaseRepository.kt:
--------------------------------------------------------------------------------
1 | package me.siddheshkothadi.chat.domain.repository
2 |
3 | import com.google.android.gms.auth.api.signin.GoogleSignInOptions
4 | import com.google.firebase.auth.FirebaseAuth
5 | import kotlinx.coroutines.flow.Flow
6 | import me.siddheshkothadi.chat.domain.model.Message
7 | import me.siddheshkothadi.chat.domain.model.User
8 |
9 | interface FirebaseRepository {
10 | val auth: FirebaseAuth
11 | val users: Flow>
12 | val encryptedChats: Flow