[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7492":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":7,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":39,"discoverSource":40},7492,"kmp-production-sample","Kotlin\u002Fkmp-production-sample","Kotlin","This is an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile. It's a simple RSS reader, and you can download it from the App Store and Google Play. It's been designed to demonstrate how KMM can be used in real production projects.","https:\u002F\u002Fkotlinlang.org\u002Flp\u002Fmobile\u002F",null,2273,253,60,8,0,1,2,16,3,63.81,"MIT License",false,"master",[25,26,27,28,29,30,31,32,33,34,35],"android","compose","ios","jetpack-compose","kmm","kotlin","kotlin-multiplatform","kotlin-native","multiplatform","reactjs","sample","2026-06-12 04:00:33","[![official project](http:\u002F\u002Fjb.gg\u002Fbadges\u002Fofficial.svg)](https:\u002F\u002Fconfluence.jetbrains.com\u002Fdisplay\u002FALL\u002FJetBrains+on+GitHub)\n\n# KMM RSS Reader\n\n\u003Cimg src=\"\u002Fmedia\u002Fios+android.png\"\u002F>  \n\nThis is an open-source, mobile, cross-platform application built\nwith [Kotlin Multiplatform Mobile](https:\u002F\u002Fkotlinlang.org\u002Flp\u002Fmobile\u002F).\n\n## Compose multiplatform experiment\n\niOS and Desktop clients were implemented as experimental features and can be viewed [here](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkmm-production-sample\u002Ftree\u002Fcompose-app).\n\n\u003Cimg src=\"\u002Fmedia\u002FAndroid+iOS+Desktop.png\"\u002F>\n\n## Desktop and Web experiment\n\nDesktop and Web clients were implemented as experimental features and can be viewed [here](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkmm-production-sample\u002Ftree\u002Fc6a0d9182802490d17729ae634fb59268f68a447).\n\n\u003Cimg src=\"\u002Fmedia\u002Fdesktop+web.png\"\u002F>\n\n## Project structure\n\nThis repository contains a common Kotlin Multiplatform module, a Android project\nand an iOS project. The common module is connected with the Android project via the\nGradle multi-project mechanism. For use in iOS applications, the shared module compiles into a\nframework that is exposed to the Xcode project via the internal integration Gradle task. This\nframework connects to the Xcode project that builds an iOS application.\n\nYou can achieve the same structure by creating a project with\nthe [KMM Plugin project wizard](https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F14936-kotlin-multiplatform-mobile)\nor cloning the [basic sample project](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkmm-sample\u002F).\n\n\u003Cimg src=\"\u002Fmedia\u002Fbasic-structure.png\"\u002F>\n\n## Architecture\n\nKotlin Multiplatform Mobile is a flexible technology that allows you to share only what you want to\nshare, from the core layer to UI layers.\n\nThis sample demonstrates sharing not only the data and domain layers of the app but also the\napplication state:\n\n\u003Cimg src=\"\u002Fmedia\u002Ftop-level-arch.jpeg\"\u002F>\n\n### Shared data and domain layers\n\nThere are two types of data sources. The network service is for getting RSS feed updates, while\nlocal storage is for caching the feed, which makes it possible to use the application\noffline. [Ktor HTTP Client](https:\u002F\u002Fktor.io\u002Fdocs\u002Fclient.html) is used for making API\nrequests. [Kotlinx.serialization](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkotlinx.serialization) is used to\nserialize feed data and store it locally\nwith [MultiplaformSettings](https:\u002F\u002Fgithub.com\u002Frusshwolf\u002Fmultiplatform-settings). This logic is\norganized in the shared module of the `com.github.jetbrains.rssreader.core` package.\n\n### Shared application state\n\nThe Redux pattern is used for managing the application state. The simplified Redux architecture is\nimplemented in the shared module. The `Store` class dispatches the **actions** that can be produced\neither by a user or by some async work, and generates the new state. It stores the actual **state**\nand facilitates subscription to state updates via Kotlin's `StateFlow`. To provide additional\ninformation about state updates, the `Store` class also produces **effects** that, for example, can\nbe used to display this information via alerts. This logic is organized in the shared KMM module of\nthe `com.github.jetbrains.rssreader.app` package.\n\n\u003Cimg src=\"\u002Fmedia\u002Farch-details.jpg\"\u002F>\n\n### Native UI\n\nThe UI layer is fully native and implemented using SwiftUI for iOS, Jetpack Compose for Android,\nCompose Multiplatform for Desktop and React.js for web browser.\n\n**On the iOS side,** the `Store` from the KMM library is wrapped into the `ObservableObject` and\nimplements the state as a `@Published` wrapped property. This publishes changes whenever a\ndispatched action produces a new state after being reduced in the shared module. The store is\ninjected as an `Environment Object` into the root view of the application, and is easily accessible\nfrom anywhere in the application. SwiftUI performs all aspects of diffing on the render pass when\nyour state changes.\n\nFor subscribing to state\nupdates, [the simple wrapper](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkmm-production-sample\u002Fblob\u002Fmaster\u002Fshared\u002Fsrc\u002FiosMain\u002Fkotlin\u002Fcom\u002Fgithub\u002Fjetbrains\u002Frssreader\u002Fcore\u002FCFlow.kt)\nis used. This wrapper allows you to provide a callback that will be called when each new value (the\nstate in our case) is emitted.\n\n## Multiplatform features used\n\n**✅ Platform-specific API usage.** RSS feeds usually only support the XML format.\nThe `kotlinx.serialization` library currently doesn't support parsing XML data, but there is no need\nto implement your own parser. Instead, platform libraries (`XmlPullParser` for\nAndroid and `NSXMLParser` for iOS) are used. The common `FeedParser` interface\nis declared in the `commonMain` source set. Platform implementations are placed in the\ncorresponding `iOSMain` and `AndroidMain` source sets. They are injected into the\nRSSReader class (the KMM module entry point) via the `create` factory method, which is declared in\nthe [RSSReader class companion object](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkmm-production-sample\u002Fblob\u002Fmaster\u002Fshared\u002Fsrc\u002FandroidMain\u002Fkotlin\u002Fcom\u002Fgithub\u002Fjetbrains\u002Frssreader\u002Fcore\u002FRssReader.kt).\n","Kotlin\u002Fkmp-production-sample 是一个使用 Kotlin Multiplatform Mobile (KMM) 构建的开源跨平台移动应用，主要功能为RSS阅读。其核心功能包括数据获取与本地缓存、以及基于Redux模式的应用状态管理。该项目通过Ktor HTTP Client进行网络请求，利用Kotlinx.serialization处理数据序列化，并采用MultiplaformSettings实现跨平台的数据存储。此外，它还展示了如何在iOS和Android平台上共享业务逻辑层乃至UI层代码。适合于希望了解或实践KMM技术以开发跨平台移动应用的开发者参考学习。","2026-06-11 03:12:45","top_language"]