How apoorvgupta25/news-shots-kmp works
NewsshotsKMP is a Kotlin Multiplatform news-reading app with shared Compose UI for Android and iOS. Its apparent user workflow is browsing home/category feeds, opening an article, and searching; the tree also indicates bookmarks and theme preferences. The shared app sets up navigation and reads the current theme, while domain contracts and network implementations cover news retrieval. Several feature and data modules are present only in the tree, so their internal wiring is not asserted here.
Main entry points: App.kt Shared app · MainActivity.kt Android entry · ContentView.swift iOS entry · MainViewController.kt iOS controller
Components 21
App entry and shell
- Android entry
androidApp/src/main/java/com/apoorvgupta/newsshotskmp/MainActivity.kt - iOS entry
iosApp/iosApp/ContentView.swift - iOS controller
app/src/iosMain/kotlin/com/apoorvgupta/newsshotskmp/MainViewController.kt - Shared app
app/src/commonMain/kotlin/com/apoorvgupta/newsshotskmp/App.kt - Navigation host
app/src/commonMain/kotlin/com/apoorvgupta/newsshotskmp/ui/NavigationHost.kt - Theme view model
app/src/commonMain/kotlin/com/apoorvgupta/newsshotskmp/AppViewModel.kt
News experiences
- Home feed
feature/home/src/commonMain/kotlin/com/apoorvgupta/home - News listing
feature/listing/src/commonMain/kotlin/com/apoorvgupta/newsshotslisting - News search
feature/search - Article details
feature/details/src/commonMain/kotlin/com/apoorvgupta/newsshotsdetails - Bookmarks
feature/bookmark
Domain contracts
- News use cases
domain/src/commonMain/kotlin/com/apoorvgupta/domain/usecase - News repository contract
domain/src/commonMain/kotlin/com/apoorvgupta/domain/repo/NewsShotsRepo.kt
Data and preferences
- Network use cases
data/network/src/commonMain/kotlin/com/apoorvgupta/network/usecase - News repository
data/network/src/commonMain/kotlin/com/apoorvgupta/network/repo/NewsShotsRepoImpl.kt - Remote news source
data/network/src/commonMain/kotlin/com/apoorvgupta/network/datasource - HTTP client
data/network/src/commonMain/kotlin/com/apoorvgupta/network/datasource/HttpClientFactory.kt - Theme use cases
data/datastore/src/commonMain/kotlin/com/apoorvgupta/datastore/usecase - Theme repository
data/datastore/src/commonMain/kotlin/com/apoorvgupta/datastore/repo/AppThemeRepoImpl.kt - Platform preferences
data/datastore/src/commonMain/kotlin/com/apoorvgupta/datastore
Other components
- Reader
Connections 12
- Reader → Android entry: opens
- Reader → iOS entry: opens
- Android entry → Shared app: renders
- iOS entry → iOS controller: hosts
- iOS controller → Shared app: renders
- Shared app → Navigation host: renders
- Shared app → Theme view model: loads theme
- Theme use cases → Theme repository: uses
- Theme repository → Platform preferences: persists theme
- Network use cases → News repository contract: calls
- News repository → Remote news source: fetches news
- Remote news source → HTTP client: uses client