Click the image above to watch a demo of the News Kotlin Multiplatform App on YouTube.
The News KMP App is a Kotlin Compose Multiplatform (KMP) project that aims to provide a consistent news reading experience across multiple platforms, including Android, iOS, Windows, macOS, and Linux. This project leverages Kotlin's multiplatform capabilities to share code and logic while using Compose for UI, ensuring a seamless and native experience on each platform.
- Explore Top News Headlines:
- Stay updated with the day's top news stories effortlessly.
- Read Detailed Content:
- Dive deeper into your favorite news articles for comprehensive insights.
- Personalized Search:
- Easily find news articles tailored to your interests.
- Save for Later:
- Bookmark articles to read offline and enjoy uninterrupted reading pleasure.
- Cross-Platform Support:
- Seamless operation on Android, iOS, Windows, macOS, and Linux.
- Declarative UI with Jetpack Compose
- Shared UI components across Android and desktop.
- Material Design and Material Design 3 support.
- Smooth Navigation & State Management:
- Simple navigation using Jetpack Compose Navigation.
- MVVM Architecture:
- Model-View-ViewModel pattern for separation of concerns.
- ViewModel management for UI-related data.
- Robust Networking:
- HTTP client-server communication with Ktor.
- JSON serialization/deserialization and content negotiation.
- Efficient Image Loading:
- Image loading and caching with Coil.
- Local Data Storage:
- Local database management with Room for all platform.
- Key-value pair storage with DataStore.
- Build Configuration Management:
- Centralized build configurations using BuildKonfig.
- BuildKonfig - BuildConfig for Kotlin Multiplatform Project. It currently supports embedding values from gradle file.
- Ktor - Provides multiplatform libraries required to make network calls to the REST API.
- Kermit - Kermit by Touchlab is a Kotlin Multiplatform centralized logging utility.
- Room - The Room persistence library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
- DataStore - The DataStore library stores data asynchronously, consistently, and transactionally, overcoming some of the drawbacks of SharedPreferences
- Navigation Navigation is a key part of UI applications that allows users to move between different application screens.
- kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support.
- Common ViewModel The Android ViewModel approach to building UI can be implemented in common code using Compose Multiplatform.
- kotlinx.serialization - Provides sets of libraries for various serialization formats eg. JSON, protocol buffers, CBOR etc.
-
Clone this repository:
git clone https://github.com/Coding-Meet/News-KMP-App.git
-
Open in the latest version of Android Studio or intellij idea.
-
Before running the project, obtain an API key from News Api .
-
Add a
local.properties
file to the project root. -
Place your News API key in
local.properties
file asAPI_KEY
property.
API_KEY=YOUR_API_KEY
- For Android, run the
composeApp
module by selecting theapp
configuration. If you need help with the configuration, follow this link for android - For iOS, run the
composeApp
module by selecting theiosApp
configuration. If you need help with the configuration, follow this link for Ios - For Desktop, run
./gradlew :composeApp:run
Feel free to contribute to this project by submitting issues, pull requests, or providing valuable feedback. Your contributions are always welcome! 🙌
Give a ⭐️ if this project helped you!
Your generosity is greatly appreciated! Thank you for supporting this project.
Meet