PokedexApp demonstrates modern Kotlin Multiplatform development with Jetpack Compose, SwiftUI, Koin, Coroutines, Flow, SqlDelight and Ktor based on Multi-Module MVI architecture.
Tip
If you want to see more the Kotlin Multiplatform content, check out the telegram channel.
![image](https://private-user-images.githubusercontent.com/79082708/332066766-bfef6e48-a5cd-4721-b228-f25e6757700d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNzcwOTcsIm5iZiI6MTcyMTE3Njc5NywicGF0aCI6Ii83OTA4MjcwOC8zMzIwNjY3NjYtYmZlZjZlNDgtYTVjZC00NzIxLWIyMjgtZjI1ZTY3NTc3MDBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDAwMzk1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxYmU0MGMwYWRhOTU4Yzk1M2M0MmNmNjZmMWE3NzlmYTc4YzVmYjNlNzc4NjlhZjQ1NmQzNWI2ZmNkMjZkNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jDgRBTBZ9r2UImTyB7EvyROqJKwlnuzPzG5hokCePVo)
Go to the Releases to download the latest APK.
- Ios/Android
- Caching
- Pagination
screen.1.mp4
- Minimum SDK level 24
- Kotlin Multiplatform based, Jetpack Compose + SwiftUI for ui interface.
- Kotlin Multiplatform
- Expected/actual: Expected and actual declarations allow you to access platform-specific APIs from Kotlin Multiplatform modules. You can provide platform-agnostic APIs in the common code.
- Gradle kts: Gradle’s Kotlin DSL provides an alternative syntax to the traditional Groovy DSL with an enhanced editing experience in supported IDEs, with superior content assist.
- Architecture
- Multi-Module Concept: Modularization is a practice of organizing a codebase into loosely coupled and self contained parts. Each part is a module. Each module is independent and serves a clear purpose.
- Shared MVI/ViewModel Architecture: ViewModel hosts the UiState and initializes it with the default state. ViewModel handles the Intent/Action and Manipulates the UiState causing the View change.
- Koin: Koin provides us with an all-in kotlin library to use it in our shared module to create injections that can be used by both Android and iOS
- Repository Pattern: Repository commonly refers to a storage location, often for safety or preservation.
- SqlDelight:SQLDelight is a powerful tool for implementing data persistence in Kotlin Multiplatform Mobile (KMM) projects
- Ktor:Ktor includes a multiplatform asynchronous HTTP client, which allows you to make requests and handle responses, extend its functionality with plugins, such as authentication, JSON serialization, and so on.
- Compose Navigation: The Navigation component provides support for Jetpack Compose applications. You can navigate between composables while taking advantage of the Navigation component's infrastructure and features.
- Coil: Loading images from network.
- Serialization: Kotlin serialization consists of a compiler plugin, that generates visitor code for serializable classes, runtime library with core serialization API and support libraries with various serialization formats.
PokedexApp is based on the Multi-Module Concept, the MVI architecture and the Repository pattern
![image](https://private-user-images.githubusercontent.com/79082708/332129602-503c2012-d204-430a-b816-7223d4afc356.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNzcwOTcsIm5iZiI6MTcyMTE3Njc5NywicGF0aCI6Ii83OTA4MjcwOC8zMzIxMjk2MDItNTAzYzIwMTItZDIwNC00MzBhLWI4MTYtNzIyM2Q0YWZjMzU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF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2_TimZX9Xy3dPs)
The project includes 8 modules where: 2 android/iosApp, 1 feature, 2 core, 2 umbrella, 1 utils.
Contains default android/ios project where included shared business logic with umbrella moduels.
Additional: The UI for android implemented in the feature module, for ios was written in iosApp using SwiftUI
The feature is to show pokemons and pokemon detail info
![image](https://private-user-images.githubusercontent.com/79082708/332141606-d55ffbf9-af81-4c3f-bd6e-e97ef08f267c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNzcwOTcsIm5iZiI6MTcyMTE3Njc5NywicGF0aCI6Ii83OTA4MjcwOC8zMzIxNDE2MDYtZDU1ZmZiZjktYWY4MS00YzNmLWJkNmUtZTk3ZWYwOGYyNjdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDAwMzk1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExYzI1OTFmNWMzNWJjZGExYmJmNjc2MTMxMGM4MmEyODhkNTgyYTczZGQ3MWI1MDBiZGI1MGM1NjYyODExNTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.y8XjaV5kuXzZQcLNqqEAYsnfZCDkObCsWbcQ8nkMFNc)
- Api: Contains repositories’s interfaces and data models
- Data: Contains the implemetation of the repositories and data sources
- Presentation: Contains viewmodels
- Compose: Contains android ui
UI -> ViewModels -> Repositories -> DataSource
Compose -> Presentation -> Api(Data)
Contains all http/database initialization and DI inject
![image](https://private-user-images.githubusercontent.com/79082708/332143859-07f7e1cc-bd48-4c78-9c64-e45f7c0385ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNzcwOTcsIm5iZiI6MTcyMTE3Njc5NywicGF0aCI6Ii83OTA4MjcwOC8zMzIxNDM4NTktMDdmN2UxY2MtYmQ0OC00Yzc4LTljNjQtZTQ1ZjdjMDM4NWVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDAwMzk1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3NjJkNjY1MDcyZTAxMzY5Y2UyNDIyYzFiYTFiY2U2MDBkNDYyNzVlZjQ2ZDQwMmZhYjIzZjVjM2FlNGE1OWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vcLVgAkEH52hBoJDBeXKiFbnU_4irlQy7zPewxQoH0Y)
Contains PlatfromSDK that executes in android/ios app for initialzation business logic, then it injects into the singleton object
![image](https://private-user-images.githubusercontent.com/79082708/332146153-ac30da2c-d24b-4a8c-a4c8-a118be7a4cdc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNzcwOTcsIm5iZiI6MTcyMTE3Njc5NywicGF0aCI6Ii83OTA4MjcwOC8zMzIxNDYxNTMtYWMzMGRhMmMtZDI0Yi00YThjLWE0YzgtYTExOGJlN2E0Y2RjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDAwMzk1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiNjdiMjNiM2JjOGE1Yzk1MTc5ZjJjZjNiOTE1MzJhYzNlYmNlOWEzNzYwMWQ4MDVhZTE2MTZjMTQwMzMyYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ghy5LmM8Tn5n6FqBbGqH8yPwT01LKyzWMGXrP-E2q5g)
Contains navigation + theme setup
Contains pod build gradle setup
PokedexApp using the PokeAPI for constructing RESTful API.
PokeAPI provides a RESTful API interface to highly detailed objects built from thousands of lines of data related to Pokémon.
Designed and developed by 2024 larkes (Kirill Vasilev)
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.