Skip to content

PokedexApp demonstrates modern Kotlin Multiplatform development with Jetpack Compose, SwiftUI, Koin, Coroutines, Flow, SqlDelight, Ktor based on Multi-Module MVI architecture.

Notifications You must be signed in to change notification settings

larkes-cyber/PokedexApp

Repository files navigation

PokedexApp

License API

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

Download

Go to the Releases to download the latest APK.

Main features

  • Ios/Android
  • Caching
  • Pagination
screen.1.mp4

Tech stack & Open-source libraries

  • 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.

image

Architecture

PokedexApp is based on the Multi-Module Concept, the MVI architecture and the Repository pattern

image image

The project includes 8 modules where: 2 android/iosApp, 1 feature, 2 core, 2 umbrella, 1 utils.

Android/iosApp

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

Feature Pokemon

The feature is to show pokemons and pokemon detail info

image
  • 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)

Core

Contains all http/database initialization and DI inject

image

Core-Root

Contains PlatfromSDK that executes in android/ios app for initialzation business logic, then it injects into the singleton object

image

Compose-root

Contains navigation + theme setup

Ios-root

Contains pod build gradle setup

Open API

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.

License

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.

About

PokedexApp demonstrates modern Kotlin Multiplatform development with Jetpack Compose, SwiftUI, Koin, Coroutines, Flow, SqlDelight, Ktor based on Multi-Module MVI architecture.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published