diff --git a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConfig.kt b/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConfig.kt deleted file mode 100644 index 79761062..00000000 --- a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConfig.kt +++ /dev/null @@ -1,12 +0,0 @@ -package at.mocode.shared.core - -data class AppConfig( - val gatewayUrl: String, - val isDebug: Boolean -) - -// Standard-Config für Local Development -val devConfig = AppConfig( - gatewayUrl = "http://localhost:8081", - isDebug = true -) diff --git a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConstants.kt b/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConstants.kt deleted file mode 100644 index 640d7fc4..00000000 --- a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/core/AppConstants.kt +++ /dev/null @@ -1,29 +0,0 @@ -package at.mocode.shared.core - -/** - * Shared application configuration constants for clients. - * These defaults target local development environments. - */ -object AppConstants { - // Gateway base URL (reverse proxy / API gateway) - // Used by NetworkConfig via PlatformConfig - const val GATEWAY_URL: String = "http://localhost:8081" - - // Keycloak configuration - const val KEYCLOAK_URL: String = "http://localhost:8180" - const val KEYCLOAK_REALM: String = "meldestelle" - - // Use 'postman-client' for Desktop App Password Flow (Direct Access Grants enabled) - // 'web-app' is for Browser Flow (PKCE) - // TODO: Make this platform-dependent (Desktop vs Web) - const val KEYCLOAK_CLIENT_ID: String = "web-app" - - // DEV ONLY: Client Secret for 'postman-client' (Confidential Client) - // In Production, this should NEVER be in the frontend code. - // For the Desktop App Pilot, we use this to simulate a secure client. - // For 'web-app' (Public Client), this is not needed/used if configured correctly, - // but our AuthApiClient might be sending it. - const val KEYCLOAK_CLIENT_SECRET: String = "postman-secret-123" - - // Removed unused browser flow URLs (registerUrl, loginUrl, etc.) as we focus on Desktop App. -} diff --git a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/domain/model/ApiModels.kt b/_backup/shared/src/commonMain/kotlin/at/mocode/shared/domain/model/ApiModels.kt deleted file mode 100644 index af86b1ca..00000000 --- a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/domain/model/ApiModels.kt +++ /dev/null @@ -1,41 +0,0 @@ -package at.mocode.shared.domain.model - -import kotlinx.serialization.Serializable - -/** - * Generischer Wrapper für API-Antworten. - */ -@Serializable -data class ApiResponse( - val success: Boolean, - val data: T? = null, - val error: ApiError? = null -) - -@Serializable -data class ApiError( - val code: String, - val message: String, - val details: Map = emptyMap() -) - -/** - * Das Ergebnis eines Repository-Aufrufs. - * Die UI kennt nur das hier, keine HTTP-Exceptions! - */ -sealed class Resource { - data class Success(val data: T) : Resource() - data class Error(val message: String, val code: String? = null) : Resource() - data object Loading : Resource() -} - -/** - * Datenmodell für den Ping. - */ -@Serializable -data class PingData( - val status: String, - val timestamp: String, - val service: String -) - diff --git a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/presentation/actions/AppAction.kt b/_backup/shared/src/commonMain/kotlin/at/mocode/shared/presentation/actions/AppAction.kt deleted file mode 100644 index d575816c..00000000 --- a/_backup/shared/src/commonMain/kotlin/at/mocode/shared/presentation/actions/AppAction.kt +++ /dev/null @@ -1,37 +0,0 @@ -package at.mocode.shared.presentation.actions - -import at.mocode.shared.presentation.state.Notification -import at.mocode.frontend.core.domain.models.User -import at.mocode.frontend.core.domain.models.AuthToken - -sealed class AppAction { - // Auth Actions - sealed class Auth : AppAction() { - data class LoginStart(val username: String, val password: String) : Auth() - data class LoginSuccess(val user: User, val token: AuthToken) : Auth() - data class LoginFailure(val error: String) : Auth() - object Logout : Auth() - data class RefreshToken(val newToken: AuthToken) : Auth() - } - - // Navigation Actions - sealed class Navigation : AppAction() { - data class NavigateTo(val route: String) : Navigation() - object NavigateBack : Navigation() - data class UpdateHistory(val route: String) : Navigation() - } - - // UI Actions - sealed class UI : AppAction() { - object ToggleDarkMode : UI() - data class SetLoading(val isLoading: Boolean) : UI() - data class ShowNotification(val notification: Notification) : UI() - data class DismissNotification(val id: String) : UI() - } - - // Network Actions - sealed class Network : AppAction() { - data class SetOnlineStatus(val isOnline: Boolean) : Network() - data class UpdateLastSync(val timestamp: String) : Network() - } -}