How eygraber/vice works
Main Components
• Repository/CI layer
– GitHub (push to branches, GitHub Actions workflows)
– Publishing to Maven Central/Sonatype
• Modules (library components)
– vice-core: UDF runtime, ViceContainer, ViceCompositor, ViceView, ViceEffects
– vice-sources: StateSource, FlowSource, LoadableSource, etc.
– vice-nav: navigation primitives (ViceDestination, NavGraphBuilder extensions)
– vice-nav-material3: Material3-specific NavGraphBuilder integrations
– vice-portal: ’portal’ integration entrypoint
• Sample Applications
– samples/nav/androidApp: Android Compose application
– samples/nav/desktopApp: Compose Multiplatform desktop app
– samples/nav/wasmJsApp: Compose-for-WASM/JS web app
– samples/nav/shared: shared logic & UI between sample apps
• External Services/Frameworks
– Kotlin Multiplatform & Gradle
– Compose Multiplatform (AndroidX Compose, Desktop Compose, WASM/JS)
– kotlinx.coroutines (Flow, StateFlow)
– AndroidX Navigation Compose (for vice-nav integration)
Relationships & Data Flows
• Library Modules → MavenCentral
– Each module compiles to KMP artifacts and publishes to Maven
• Sample Apps → Library Modules
– Each sample app depends on vice-core, vice-sources, vice-nav (and material3) via Gradle
• Runtime Flow in an App
– App’s UI calls ViceContainer.Vice(...) → instantiates ViceCompositor + ViceEffects + ViceSources
– ViceCompositor.composite() reads currentState() from multiple ViceSources (StateSource, FlowSource…)
– ViceCompositor emits ViewState → delivered to ViceView composable
– ViceView renders UI, emits Intents (user events) back to ViceContainer
– ViceContainer dispatches Intents to ViceCompositor.onIntent() and to any ViceIntentFilters
– ViceEffects.runEffects() handles side-effects (analytics, lifecycle, navigation)
Architectural Patterns
• Unidirectional Data Flow (UDF)
• Model-View-Intent (MVI)
• Compose-based reactive rendering (ViceView)
• Strict separation of state (ViewState), events (Intent), side-effects (ViceEffects)
• Modularization for extensibility (core vs. navigation vs. sources)
• KMP layering (commonMain → platformMain for each target)