chore(frontend): refactor navigation and DI setup, remove unused shared module

- Replaced `initKoin` with `startKoin` for DI initialization consistency across platforms.
- Introduced `StateNavigationPort` with `StateFlow` to streamline navigation state management.
- Migrated `AppScreen` to sealed class with route mapping for better navigation handling.
- Deleted unused `frontend/shared` module and removed related dependencies from build files.
- Cleaned up legacy navigation and Redux-related code, aligning with MVVM architecture.
This commit is contained in:
2026-02-01 13:46:39 +01:00
parent 77c20bf2ba
commit f78563f8c8
41 changed files with 186 additions and 187 deletions
+3 -3
View File
@@ -26,12 +26,12 @@ kotlin {
// UI Kit (Design System)
implementation(projects.frontend.core.designSystem)
// Shared Konfig & Utilities
implementation(projects.frontend.shared)
// Network core (provides apiClient + TokenProvider interface)
implementation(projects.frontend.core.network)
// Domain core (provides AppConstants)
implementation(projects.frontend.core.domain)
// Compose dependencies
implementation(compose.runtime)
implementation(compose.foundation)
@@ -1,11 +1,12 @@
package at.mocode.frontend.core.auth.data
import at.mocode.shared.core.AppConstants
import at.mocode.frontend.core.domain.AppConstants
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.request.forms.*
import io.ktor.client.statement.*
import io.ktor.http.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
@@ -68,7 +69,7 @@ class AuthApiClient(
val kc = response.body<KeycloakTokenResponse>()
LoginResponse(
success = true,
token = kc.access_token,
token = kc.accessToken,
message = null,
userId = null,
username = username
@@ -112,7 +113,7 @@ class AuthApiClient(
val kc = response.body<KeycloakTokenResponse>()
LoginResponse(
success = true,
token = kc.access_token,
token = kc.accessToken,
message = null
)
} else {
@@ -132,13 +133,13 @@ class AuthApiClient(
@Serializable
private data class KeycloakTokenResponse(
val access_token: String,
val expires_in: Long? = null,
val refresh_expires_in: Long? = null,
val refresh_token: String? = null,
val token_type: String? = null,
val not_before_policy: Long? = null,
val session_state: String? = null,
val scope: String? = null
@SerialName("access_token") val accessToken: String,
@SerialName("expires_in") val expiresIn: Long? = null,
@SerialName("refresh_expires_in") val refreshExpiresIn: Long? = null,
@SerialName("refresh_token") val refreshToken: String? = null,
@SerialName("token_type") val tokenType: String? = null,
@SerialName("not_before_policy") val notBeforePolicy: Long? = null,
@SerialName("session_state") val sessionState: String? = null,
@SerialName("scope") val scope: String? = null
)
}
@@ -4,7 +4,7 @@ import at.mocode.frontend.core.auth.data.AuthApiClient
import at.mocode.frontend.core.auth.data.AuthTokenManager
import at.mocode.frontend.core.auth.presentation.LoginViewModel
import at.mocode.frontend.core.network.TokenProvider
import at.mocode.shared.core.AppConstants
import at.mocode.frontend.core.domain.AppConstants
import org.koin.core.qualifier.named
import org.koin.dsl.module