Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
A lightweight MVI (Model-View-Intent) library for Compose Multiplatform, providing a clean coroutine-based architecture for building reactive UIs.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗PulseDesktop is a framework for Compose Desktop apps. A desktop window shows many panels at once, so
PulseDesktop gives each content of a screen its own PulseViewModel and puts one
PulseContainer above them. Broadcast reaches every content, Unicast sends a message up from
one, and Refresh rebuilds the view without losing state.
Around that, it decides how a window is split. A host creates the ViewModels and lays out the
contents, a content binds one ViewModel with PulseContent, and sections and components take
data and callbacks only. Your own tests can check that the code keeps to it.
Read What is PulseDesktop? for the idea behind it.
PulseDesktop publishes three artifacts, one package each. mvi is the library; the other two are
optional. navigation scopes ViewModels to a Navigation 3 back stack entry, and architecture checks
in your own tests that the code follows the conventions.
Add JitPack to settings.gradle.kts, then the dependencies to build.gradle.kts, replacing
<version> with a tag from Releases.
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
maven { url = uri("https://jitpack.io") }
}
}
// build.gradle.kts
dependencies {
implementation("com.github.kaleidot725.PulseDesktop:mvi:<version>")
implementation("com.github.kaleidot725.PulseDesktop:navigation:<version>")
testImplementation("com.github.kaleidot725.PulseDesktop:architecture:<version>")
}
| Requirement | Version |
|---|---|
| Java | 17+ |
| Kotlin | 2.0+ |
| Compose Multiplatform | 1.6+ |
A ViewModel handles actions and updates its state. A content binds it to the UI with
PulseContent, and the host creates the ViewModel and places the content. The full walkthrough,
including the Container, is in
Getting Started.
class CounterViewModel : PulseViewModel<CounterState, CounterAction, CounterEvent, CounterBroadcast, CounterUnicast>(
initialUiState = CounterState(),
) {
override fun onAction(uiAction: CounterAction) {
when (uiAction) {
CounterAction.Increment -> update { copy(count = count + 1) }
}
}
}
// counter/content/total/TotalContent.kt
@Composable
fun TotalContent(viewModel: CounterViewModel) {
PulseContent(viewModel = viewModel) { state, onAction ->
Button(onClick = { onAction(CounterAction.Increment) }) {
Text("${state.count}")
}
}
}
// counter/CounterHost.kt
@Composable
fun CounterHost() {
val viewModel = rememberPulseViewModel { CounterViewModel() }
TotalContent(viewModel = viewModel)
}
kaleidot725.github.io/PulseDesktop (English and Japanese).
| Artifact | Package | Documentation |
|---|---|---|
mvi | jp.kaleidot725.pulse.mvi | Architecture |
navigation | jp.kaleidot725.pulse.navigation | Navigation 3 |
architecture | jp.kaleidot725.pulse.architecture | Architecture checks |
The demo directory is a small multi-module app built the way the architecture checks expect, and
it passes all of them. Four areas share one Container, and a tap on one spreads to the two it shares
an edge with. The counts are kept in a DataStore, so they survive a restart.
| Module | Holds |
|---|---|
demo/app | the window, the back stack, and every Koin module |
demo/feature/count | the host, its content, section and components, the ViewModel, and its text in English and Japanese |
demo/core/domain | the areas and the neighbour rule in model, the repository interface in repository, and the one use case with work of its own in usecase |
demo/core/data | the DataStore-backed repository in repository, and the data source in front of DataStore in local |
demo/core/designsystem | the theme, the card and the buttons, one package per kind |
./gradlew :demo:app:run
Copyright 2026 kaleidot725
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.