Skip to content

API Overview ​

PulseDesktop exposes a small, focused API surface. One package per artifact: mvi is the core and lives in jp.kaleidot725.pulse.mvi, while the optional navigation and architecture artifacts live in jp.kaleidot725.pulse.navigation and jp.kaleidot725.pulse.architecture. Both are listed under Extensions.

Classes ​

ClassDescription
PulseViewModelAbstract base class for managing UI state
PulseContainerCoordinates multiple ViewModels

Composables ​

ComposableDescription
PulseHostScopes a Container to a subtree; enables refresh and broadcast callbacks
PulseContentObserves a ViewModel; provides state and action dispatcher

Marker Interfaces ​

InterfaceDescription
PulseStateMarks a class as a ViewModel's UI state
PulseActionMarks a class as a user action
PulseEventMarks a class as a one-time side effect
PulseBroadcastMarks a class as a Container broadcast message
PulseUnicastMarks a class as a child-to-parent unicast message

Extensions ​

ComposableDescription
rememberPulseViewModelViewModel scoped to a ViewModelStoreOwner
rememberPulseContainerContainer scoped to a ViewModelStoreOwner
rememberPulseNavEntryDecoratorsNavDisplay decorators that scope ViewModels to a back stack entry

Architecture checks ​

AssertionDescription
assertPulseMviConventionsThe next twelve checks, in order
assertStatesAreDataTypesA PulseState is a data class or data object
assertMessagesAreSealedOrDataTypesA message is a sealed class with data class / data object cases, or a single data class / data object
assertStatesAndMessagesLiveInContractsStates and messages are in a …Contracts.kt beside their ViewModel or Container
assertViewModelsAndContainersAreNamedAfterTheirBase…ViewModel and …Container
assertViewModelsHoldTheirDataInTheirStateNo var property on a ViewModel or Container
assertViewModelsLiveInContentsA ViewModel lives under content
assertContainersLiveAtTheFeatureRootA Container lives at the feature root
assertHostsComposeContentsA host is named …Host and composes contents instead of binding a ViewModel
assertFeaturePackagesHaveARoleA file in a feature is at its root or under content, section or component
assertContentsBindAViewModelA content binds its ViewModel with PulseContent
assertSectionsAndComponentsArePureSections and components take data and callbacks only
assertSectionsAndComponentsHavePreviewsEvery section and component has a <Name>_Preview
assertPulseDomainConventionsA repository exposes flows and returns Result<V, E> from one-shot calls; a use case lives in usecase and is more than one line
assertPulseModuleConventionsModules depend on each other the way Clean Architecture asks, and the domain, data and design system are split into packages
assertPulseKoinConventionsKoin modules are declared in the app module
assertPulseResourceConventionsThe domain holds no text, and composables read their text from string resources
PulseModuleLayoutWhich module names play which layer

Released under the Apache 2.0 License.