Skip to content

Commit ca53497

Browse files
committed
Login and Register feature Impl
0 parents  commit ca53497

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2236
-0
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetSelector.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/migrations.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle.kts

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
plugins {
2+
alias(libs.plugins.android.application)
3+
alias(libs.plugins.jetbrains.kotlin.android)
4+
id("com.google.gms.google-services")
5+
id("com.google.dagger.hilt.android")
6+
kotlin("kapt")
7+
}
8+
9+
android {
10+
namespace = "com.health.bcured"
11+
compileSdk = 34
12+
13+
defaultConfig {
14+
applicationId = "com.health.bcured"
15+
minSdk = 23
16+
targetSdk = 34
17+
versionCode = 1
18+
versionName = "1.0"
19+
20+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
21+
vectorDrawables {
22+
useSupportLibrary = true
23+
}
24+
}
25+
26+
buildTypes {
27+
release {
28+
isMinifyEnabled = false
29+
proguardFiles(
30+
getDefaultProguardFile("proguard-android-optimize.txt"),
31+
"proguard-rules.pro"
32+
)
33+
}
34+
}
35+
compileOptions {
36+
sourceCompatibility = JavaVersion.VERSION_1_8
37+
targetCompatibility = JavaVersion.VERSION_1_8
38+
}
39+
kotlinOptions {
40+
jvmTarget = "1.8"
41+
}
42+
buildFeatures {
43+
compose = true
44+
}
45+
composeOptions {
46+
kotlinCompilerExtensionVersion = "1.5.1"
47+
}
48+
packaging {
49+
resources {
50+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
51+
}
52+
}
53+
}
54+
55+
dependencies {
56+
57+
implementation(libs.androidx.core.ktx)
58+
implementation(libs.androidx.lifecycle.runtime.ktx)
59+
implementation(libs.androidx.activity.compose)
60+
implementation(platform(libs.androidx.compose.bom))
61+
implementation(libs.androidx.ui)
62+
implementation(libs.androidx.ui.graphics)
63+
implementation(libs.androidx.ui.tooling.preview)
64+
implementation(libs.androidx.material3)
65+
testImplementation(libs.junit)
66+
androidTestImplementation(libs.androidx.junit)
67+
androidTestImplementation(libs.androidx.espresso.core)
68+
androidTestImplementation(platform(libs.androidx.compose.bom))
69+
androidTestImplementation(libs.androidx.ui.test.junit4)
70+
debugImplementation(libs.androidx.ui.tooling)
71+
debugImplementation(libs.androidx.ui.test.manifest)
72+
73+
implementation(platform("com.google.firebase:firebase-bom:33.1.2"))
74+
implementation("com.google.firebase:firebase-analytics")
75+
implementation("com.google.firebase:firebase-auth")
76+
implementation(libs.firebase.firestore)
77+
78+
// Compose :
79+
implementation("androidx.compose.ui:ui:1.4.7")
80+
implementation("androidx.compose.material:material:1.4.7")
81+
implementation(libs.viewmodel.ktx)
82+
implementation(libs.viewmodel.compose)
83+
84+
// Dagger-Hilt
85+
implementation("com.google.dagger:hilt-android:2.48")
86+
kapt("com.google.dagger:hilt-android-compiler:2.48")
87+
kapt("androidx.hilt:hilt-compiler:1.2.0")
88+
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
89+
90+
91+
// Bottom Nav Bar
92+
implementation("androidx.navigation:navigation-compose:2.7.7")
93+
}
94+
95+
kapt {
96+
correctErrorTypes = true
97+
}

app/google-services.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"project_info": {
3+
"project_number": "257096205125",
4+
"firebase_url": "https://bcured-d568c-default-rtdb.firebaseio.com",
5+
"project_id": "bcured-d568c",
6+
"storage_bucket": "bcured-d568c.appspot.com"
7+
},
8+
"client": [
9+
{
10+
"client_info": {
11+
"mobilesdk_app_id": "1:257096205125:android:3f75837040a0c05845f42c",
12+
"android_client_info": {
13+
"package_name": "com.health.bcured"
14+
}
15+
},
16+
"oauth_client": [
17+
{
18+
"client_id": "257096205125-53ps6nmkplcslns2aikvbnlmp33rcifh.apps.googleusercontent.com",
19+
"client_type": 3
20+
}
21+
],
22+
"api_key": [
23+
{
24+
"current_key": "AIzaSyCgVqNztoAtC18Rl1uhEaJy2HCPG3aB4Bw"
25+
}
26+
],
27+
"services": {
28+
"appinvite_service": {
29+
"other_platform_oauth_client": [
30+
{
31+
"client_id": "257096205125-53ps6nmkplcslns2aikvbnlmp33rcifh.apps.googleusercontent.com",
32+
"client_type": 3
33+
}
34+
]
35+
}
36+
}
37+
}
38+
],
39+
"configuration_version": "1"
40+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.health.bcured
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("com.health.bcured", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
7+
<application
8+
android:name=".di.MainApp"
9+
android:allowBackup="true"
10+
android:dataExtractionRules="@xml/data_extraction_rules"
11+
android:fullBackupContent="@xml/backup_rules"
12+
android:icon="@mipmap/ic_launcher"
13+
android:label="@string/app_name"
14+
android:roundIcon="@mipmap/ic_launcher_round"
15+
android:supportsRtl="true"
16+
android:theme="@style/Theme.Bcured"
17+
tools:targetApi="31">
18+
<activity
19+
android:name=".MainActivity"
20+
android:exported="true"
21+
android:label="@string/app_name"
22+
android:theme="@style/Theme.Bcured">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
26+
<category android:name="android.intent.category.LAUNCHER" />
27+
</intent-filter>
28+
</activity>
29+
</application>
30+
31+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.health.bcured
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import androidx.activity.enableEdgeToEdge
7+
import androidx.hilt.navigation.compose.hiltViewModel
8+
import androidx.navigation.compose.rememberNavController
9+
import com.health.bcured.ui.theme.BcuredTheme
10+
import com.health.bcured.viewmodel.AuthViewModel
11+
import com.health.bcured.views.Navigation.Navigation
12+
import dagger.hilt.android.AndroidEntryPoint
13+
14+
@AndroidEntryPoint
15+
class MainActivity : ComponentActivity() {
16+
17+
override fun onCreate(savedInstanceState: Bundle?) {
18+
super.onCreate(savedInstanceState)
19+
enableEdgeToEdge()
20+
setContent {
21+
BcuredTheme {
22+
val navController = rememberNavController()
23+
val authViewModel = hiltViewModel<AuthViewModel>()
24+
25+
Navigation(navController = navController, authViewModel = authViewModel)
26+
27+
}
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)