Kotlin Multiplatform desktop application built with JetBrains Compose Multiplatform, Jewel windowing, Metro DI, a RAM‑efficient tab navigation system, and Paging. The app consumes the composite build SeforimLibrary (core, dao).
- Overview
- Architecture
- Requirements
- Quick Start
- Desktop
- Tests
- Project Structure
- Contributing
- Security
- License
- Compose Multiplatform UI with Jewel themes and native packaging (DMG/MSI/DEB).
- RAM‑efficient tabbed navigation via
TabsNavHost(seeTAB_SYSTEM_README.md). - Dependency injection with Metro (
AppGraphexposed throughLocalAppGraph). - Data provided by
SeforimLibrary(core,dao) with Paging. - Hot reload for a fast desktop development loop.
- UI: Compose + Jewel; desktop entrypoint:
SeforimApp/src/jvmMain/kotlin/main.kt. - DI: Metro graph via
createGraph<AppGraph>(), accessed withLocalAppGraph. - Navigation:
TabsNavHost; features live underSeforimApp/src/jvmMain/kotlin/io/github/kdroidfilter/seforimapp/features. - Data:
SeforimLibrary(modulescore,dao) + Paging. - Shared resources:
src/commonMain/composeResources(strings, fonts, etc.).
See TAB_SYSTEM_README.md for details on the memory‑friendly tab system and state restoration.
- OS: macOS / Linux / Windows.
- Java: JetBrains Runtime 21 (JBR 21) is required to build and run this project.
- Gradle Toolchains will download JBR 21 automatically when you run
./gradlew. If you use a locally installed JDK or an IDE, make sure it is JDK 21. - Terminal: ensure
JAVA_HOMEpoints to a JDK 21. IntelliJ IDEA: set Gradle JDK to the bundled JBR 21.
- Gradle Toolchains will download JBR 21 automatically when you run
Clone the repo and build:
./gradlew build- Run the desktop app (Compose):
./gradlew :SeforimApp:run- Hot reload (Desktop):
./gradlew :SeforimApp:hotRunJvm
# In another terminal, trigger reload
./gradlew :SeforimApp:reload- Create a native package (DMG/MSI/DEB):
./gradlew :SeforimApp:createDistributable- Run all tests:
./gradlew test- Desktop JVM tests only:
./gradlew :SeforimApp:jvmTestExample test scaffold: SeforimApp/src/jvmTest/kotlin/io/github/kdroidfilter/seforimapp/SampleTest.kt
import kotlin.test.Test
import kotlin.test.assertTrue
class SampleTest {
@Test fun runs() { assertTrue(true) }
}- App module:
SeforimApp(Kotlin Multiplatform)- Source sets:
src/commonMain,src/jvmMain - Shared resources:
src/commonMain/composeResources - Desktop entry:
SeforimApp/src/jvmMain/kotlin/main.kt
- Source sets:
- Composite build:
SeforimLibrary(consumed via coordinates in the app)- Modules:
core(domain),dao(persistence),generator(tools)
- Modules:
- Local libraries (UI/Utils):
htmlparser,icons,logger,navigation,pagination,texteffects,jewel - Tests:
src/<target>Test(e.g.,commonTest,jvmTest)
- Conventional Commits:
feat:,fix:,chore:,refactor:,docs:- Example:
feat(SeforimApp): add Paging3 for desktop
- Example:
- Pull Requests: include a clear description, touched modules, linked issues, UI screenshots/GIFs, and local run steps (
:SeforimApp:run). Keep PRs focused and incremental. - Style: Kotlin + Compose, 4‑space indentation, ~120‑char lines. Naming: classes/objects in PascalCase; functions/properties in camelCase; constants in UPPER_SNAKE_CASE. Composables follow the
SomethingViewandSomethingViewModelpattern. - Organization: put shared logic in
commonMain; platform code injvmMain. Avoid leaking platform types across source sets. - DI: use the Metro graph (
AppGraph+@Provides) and access viaLocalAppGraphinstead of global singletons.
- Do not commit secrets or API keys. Keep machine‑specific settings in
local.properties. - To increase JVM log verbosity locally, add VM option:
-Dorg.slf4j.simpleLogger.defaultLogLevel=debugin your IDE run config.
AGPL‑3.0. See LICENSE for details.
- JetBrains Compose Multiplatform, Jewel UI
- Metro (DI), KotlinX (Coroutines, Serialization, DateTime)
- Lifecycle, Navigation, Paging3
- Ktor Client
Tip: for a fast desktop dev loop, use hot reload (hotRunJvm + reload). For the memory‑efficient tab navigation and state handling, see TAB_SYSTEM_README.md.