Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7887f80
Merge onboarding:api and onboarding:android modules into onboarding m…
dbAbstract May 8, 2026
c041f57
Add AuthScreen to commonMain and migrate onboarding module to Compose…
dbAbstract May 8, 2026
e87e734
Implement AuthScreen UI and migrate YaseyoTheme to commonMain
dbAbstract May 8, 2026
a654f81
Expose ResolveAppStateUseCase to iOS and implement navigation logic i…
dbAbstract May 8, 2026
f6e2e3b
Implement centralized navigation with `AppRouter` and migrate `AuthSc…
dbAbstract May 11, 2026
79bc961
Update Gradle to 9.3.1, AGP to 9.1.1, and remove module boundary enfo…
dbAbstract May 11, 2026
d0de987
Export navigation project in DI module frameworks and change dependen…
dbAbstract May 11, 2026
bf08ca7
Implement navigation using AppCoordinator and AppRouter in iOS app
dbAbstract May 11, 2026
8f83e91
Implement sign-in logic in AuthViewModel and add Snackbar support
dbAbstract May 11, 2026
b605914
Implement sign-in logic in AuthViewModel and add Snackbar support
dbAbstract May 11, 2026
3571336
Implement email and password sign-up logic in AuthViewModel
dbAbstract May 11, 2026
94b9834
Implement Profile Setup screen and onboarding steps flow
dbAbstract May 11, 2026
f3caf11
Add Compose previews for onboarding UI components and screens
dbAbstract May 11, 2026
3edb71d
Move Auth UI components to auth package and reorganize profile setup …
dbAbstract May 11, 2026
31b6292
Implement "About You" onboarding step with custom wheel pickers
dbAbstract May 11, 2026
81d32fb
Add YaseyoPreview to design module and update composeMultiplatform ve…
dbAbstract May 14, 2026
1a2cb41
Update AppColors to use Compose Color type and remove redundant wrapping
dbAbstract May 14, 2026
6a7d44d
Update YaseyoPreview to respect darkTheme parameter
dbAbstract May 14, 2026
4ae9040
Refactor authentication UI and logic to use separate sign-in and sign…
dbAbstract May 15, 2026
64ddd6a
Implement `BottomSheetSceneStrategy` and integrate into onboarding flow
dbAbstract May 15, 2026
d570b92
Rename AuthScreen to AuthLandingScreen and update bottom sheet styling
dbAbstract May 15, 2026
50ad481
Implement modal navigation and update onboarding routes for iOS
dbAbstract May 15, 2026
515062b
Update JVM target to 17 and improve bottom sheet inset handling and f…
dbAbstract May 15, 2026
bf9521e
Enable grabber for iOS modal sheets and update accent colors in desig…
dbAbstract May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
}
}

target.enforceInternalModuleBoundaries()

val libs =
target
.extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class KmpLibraryConventionPlugin : Plugin<Project> {
)
}

target.enforceInternalModuleBoundaries()

target.afterEvaluate {
val frameworkName = extension.iosFrameworkName.orNull

Expand Down

This file was deleted.

7 changes: 4 additions & 3 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ plugins {
kotlin {
androidTarget {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
jvmTarget.set(JvmTarget.JVM_17)
}
}

sourceSets {
androidMain.dependencies {
// Libs
implementation(projects.libs.di)
implementation(projects.libs.design)

// Dependencies
implementation(libs.androidx.startup.runtime)
Expand Down Expand Up @@ -78,8 +79,8 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

Expand Down
56 changes: 41 additions & 15 deletions composeApp/src/androidMain/kotlin/dev/yaseyo/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,65 @@ package dev.yaseyo
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator
import androidx.navigation3.runtime.NavEntry
import androidx.navigation3.runtime.entryProvider
import androidx.navigation3.runtime.rememberSaveableStateHolderNavEntryDecorator
import androidx.navigation3.ui.NavDisplay
import dev.yaseyo.design.LocalSnackBarHostState
import dev.yaseyo.design.YaseyoTheme
import dev.yaseyo.navigation.AppRoute
import dev.yaseyo.navigation.AppRouter
import dev.yaseyo.navigation.BottomSheetSceneStrategy
import dev.yaseyo.navigation.FeatureNavigation
import dev.yaseyo.navigation.NavigationEvent
import dev.yaseyo.navigation.Navigator
import org.koin.compose.getKoin
import org.koin.compose.koinInject
import org.koin.core.annotation.KoinExperimentalAPI

@OptIn(KoinExperimentalAPI::class)
@Composable
fun App(navigator: Navigator) {
val allFeatureNavigation = getKoin().getAll<FeatureNavigation>()
fun App(navigator: Navigator) =
YaseyoTheme {
val appRouter = koinInject<AppRouter>()
val allFeatureNavigation = getKoin().getAll<FeatureNavigation>()
val bottomSheetStrategy = remember { BottomSheetSceneStrategy<AppRoute>() }

MaterialTheme {
Scaffold { padding ->
NavDisplay(
backStack = navigator.backStack,
modifier = Modifier.padding(padding),
onBack = { navigator.goBack() },
entryDecorators = listOf(
rememberSaveableStateHolderNavEntryDecorator(),
rememberViewModelStoreNavEntryDecorator(),
),
entryProvider = allFeatureNavigation.registerAll(),
)
LaunchedEffect(appRouter) {
appRouter.events.collect { event ->
when (event) {
is NavigationEvent.GoTo -> navigator.goTo(event.route)
is NavigationEvent.GoBack -> navigator.goBack()
}
}
}

MaterialTheme {
Scaffold(
snackbarHost = {
SnackbarHost(hostState = LocalSnackBarHostState.current)
},
) { padding ->
NavDisplay(
backStack = navigator.backStack,
modifier = Modifier.padding(padding),
onBack = { navigator.goBack() },
entryDecorators = listOf(
rememberSaveableStateHolderNavEntryDecorator(),
rememberViewModelStoreNavEntryDecorator(),
),
entryProvider = allFeatureNavigation.registerAll(),
sceneStrategies = listOf(bottomSheetStrategy),
)
}
}
}
}

private fun List<FeatureNavigation>.registerAll(): (AppRoute) -> NavEntry<AppRoute> =
entryProvider {
Expand Down
21 changes: 3 additions & 18 deletions composeApp/src/androidMain/kotlin/dev/yaseyo/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ package dev.yaseyo
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dev.yaseyo.navigation.AppRoute
import dev.yaseyo.navigation.Home
import dev.yaseyo.onboarding.api.ResolveAppStateUseCase
import dev.yaseyo.onboarding.api.model.AppState
import dev.yaseyo.onboarding.api.navigation.OnboardingRoutes
import dev.yaseyo.onboarding.ResolveStartDestinationUseCase
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.stateIn

class MainViewModel(
private val resolveAppStateUseCase: ResolveAppStateUseCase,
private val resolveStartDestinationUseCase: ResolveStartDestinationUseCase,
) : ViewModel() {
val startDestination: StateFlow<AppRoute?> = flow {
val appState = resolveAppStateUseCase.execute()

emit(
value = appState.let {
when (it) {
AppState.FullySetup -> Home

AppState.RequiresLogin -> OnboardingRoutes.Auth

AppState.RequiresProfileSetup -> OnboardingRoutes.ProfileSetup
}
},
)
emit(resolveStartDestinationUseCase.execute())
}.stateIn(
scope = viewModelScope,
initialValue = null,
Expand Down
19 changes: 0 additions & 19 deletions feature/onboarding/android/build.gradle.kts

This file was deleted.

This file was deleted.

51 changes: 0 additions & 51 deletions feature/onboarding/api/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

65 changes: 62 additions & 3 deletions feature/onboarding/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,74 @@
plugins {
id("yaseyo.kmp.library")
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

kotlin {
androidLibrary {
android {
namespace = "dev.yaseyo.onboarding"

withHostTestBuilder {
}

withDeviceTestBuilder {
sourceSetTreeName = "test"
}.configure {
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}

sourceSets {
commonMain.dependencies {
api(projects.feature.onboarding.api)
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.koin.core)
implementation(libs.koin.core.viewmodel)
implementation(libs.koin.compose)
implementation(libs.koin.compose.viewmodel)
api(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.core)

implementation(projects.libs.auth)
implementation(projects.libs.user)
api(projects.libs.navigation)
implementation(projects.libs.design)

implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.compose.runtime)
implementation(libs.compose.foundation)
implementation(libs.compose.material3)
implementation(libs.compose.uiToolingPreview)
implementation(libs.compose.material.icons.extended)
implementation(libs.compose.navigationevent)
}
}

commonTest {
dependencies {
implementation(libs.kotlin.test)
}
}

androidMain {
dependencies {
implementation(libs.koin.android)
implementation(libs.koin.compose.nav3)
implementation(libs.androidx.ui.tooling)
}
}

getByName("androidDeviceTest") {
dependencies {
implementation(libs.androidx.runner)
implementation(libs.androidx.core)
implementation(libs.androidx.testExt.junit)
}
}

iosMain {
dependencies {
}
}
}
}
Loading