An open API service indexing awesome lists of open source software.

https://github.com/nicosnicolaou16/pokedex_compose_multi_module

This Pokedex Pokémon app is a project that incorporates the latest Android technologies recommended by Google, such as Multi-Module Architecture and Jetpack Compose, the new standard for building UI.
https://github.com/nicosnicolaou16/pokedex_compose_multi_module

android android-application coroutines-android hilt-dependency-injection-android jetpack-compose kotlin kotlin-android ksp multi-module percentages pokedex pokemon repository-pattern retrofit2 room-database shared-element-transition ui-state view-model viewmodel

Last synced: 4 months ago
JSON representation

This Pokedex Pokémon app is a project that incorporates the latest Android technologies recommended by Google, such as Multi-Module Architecture and Jetpack Compose, the new standard for building UI.

Awesome Lists containing this project

README

          

# Pokedex Compose Multi-Module

[![Linktree](https://img.shields.io/badge/linktree-1de9b6?style=for-the-badge&logo=linktree&logoColor=white)](https://linktr.ee/nicos_nicolaou)
[![Site](https://img.shields.io/badge/Site-blue?style=for-the-badge&label=Web)](https://nicosnicolaou16.github.io/)
[![X](https://img.shields.io/badge/X-%23000000.svg?style=for-the-badge&logo=X&logoColor=white)](https://twitter.com/nicolaou_nicos)
[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/nicos-nicolaou-a16720aa)
[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://medium.com/@nicosnicolaou)
[![Mastodon](https://img.shields.io/badge/-MASTODON-%232B90D9?style=for-the-badge&logo=mastodon&logoColor=white)](https://androiddev.social/@nicolaou_nicos)
[![Bluesky](https://img.shields.io/badge/Bluesky-0285FF?style=for-the-badge&logo=Bluesky&logoColor=white)](https://bsky.app/profile/nicolaounicos.bsky.social)
[![Dev.to blog](https://img.shields.io/badge/dev.to-0A0A0A?style=for-the-badge&logo=dev.to&logoColor=white)](https://dev.to/nicosnicolaou16)
[![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge&logo=YouTube&logoColor=white)](https://www.youtube.com/@nicosnicolaou16)
[![Google Developer Profile](https://img.shields.io/badge/Developer_Profile-blue?style=for-the-badge&label=Google)](https://g.dev/nicolaou_nicos)

A modern Pokédex app for Android built with the latest technologies recommended by Google. This project showcases a clean, scalable multi-module architecture and a fluid user interface using Jetpack Compose.

> [!IMPORTANT]
> A similar project is also available in Flutter (Dart)!
> 👉 **[Pokedex_Flutter](https://github.com/NicosNicolaou16/Pokedex_Flutter)** 👈

## ✨ Features

* **Modern UI:** Built entirely with **Jetpack Compose** for a declarative and intuitive UI.
* **Dynamic Theming:** Extracts prominent colors from Pokémon images using the **Palette API** to create dynamic and immersive detail screens.
* **Seamless Transitions:** Implements the new **Shared Element Transition** for smooth navigation between the list and detail views.
* **Offline Support:** Caches Pokémon data using **Room Database**, allowing the app to work offline.
* **Efficient Networking:** Fetches data from the [PokéAPI](https://pokeapi.co/) using **Retrofit**.
* **Optimized Performance:** Leverages **Coroutines** for asynchronous operations, **KSP** for faster annotation processing, and **R8** for code shrinking.
* **Scalable Architecture:** Follows the **MVVM** pattern with a repository, ensuring a clean separation of concerns and maintainable code.
* **Type-Safe Navigation:** Utilizes **Navigation 3** for robust, compile-time checked, and error-free navigation.

## 📸 Screenshots & Demos


Pokemon List Screen
Pokemon Detail Screen
Pokemon Stats
List to Detail Transition
Scrolling and Searching



Landscape Detail View
 
Landscape to Portrait Transition

## 🛠️ Tech Stack & Libraries

This project is built with **[Kotlin](https://kotlinlang.org/docs/getting-started.html)** and utilizes a variety of modern Android libraries and tools:

- **UI:** [Jetpack Compose](https://developer.android.com/develop/ui/compose), [Coil](https://coil-kt.github.io/coil/compose/) (Image Loading), [Palette API](https://developer.android.com/develop/ui/views/graphics/palette-colors)
- **Architecture:** [MVVM](https://developer.android.com/topic/architecture#recommended-app-arch), [UI State Management](https://developer.android.com/topic/architecture/ui-layer/events#handle-viewmodel-events)
- **Asynchronicity:** [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html), [Kotlin KTX](https://developer.android.com/kotlin/ktx)
- **Navigation:** [Navigation Compose 3](https://developer.android.com/guide/navigation/navigation-3), [Navigation Type Safety](https://medium.com/androiddevelopers/navigation-compose-meet-type-safety-e081fb3cf2f8), [Shared Element Transition](https://developer.android.com/develop/ui/compose/animation/shared-elements)
- **Data:** [Retrofit](https://square.github.io/retrofit/) (Networking), [Room](https://developer.android.com/training/data-storage/room) (Database)
- **Dependency Injection:** [Hilt](https://dagger.dev/hilt/)
- **Build & Optimization:** [KSP](https://developer.android.com/build/migrate-to-ksp), [R8](https://developer.android.com/build/shrink-code)
- **Custom Components:** [PercentageWithAnimation](https://github.com/NicosNicolaou16/PercentagesWithAnimationCompose) for displaying Pokémon stats built by [@NicosNicolaou16](https://github.com/NicosNicolaou16).

## 📦 Modules Overview

This project follows a multi-module architecture to promote separation of concerns, scalability, and improved build times.

- **`:app`**
- The main application module that integrates all other modules.

- **`:compose_ui` (Feature Module)**
- Contains all UI-related components, screens, and utilities. This module is responsible for everything the user sees and interacts with.

- **`:core` (Core Module)**
- Holds the business logic and data models (domain models) for the entire application, ensuring that core functionalities are decoupled from the UI and data layers.

- **`:database` (Core Module)**
- Manages the local database using Room, including entity definitions, DAOs, Mappers, and repository implementations for data persistence.

- **`:navigation` (Core Module)**
- Handles all navigation logic, defining screen destinations and ensuring a consistent and type-safe flow throughout the app.

- **`:network` (Core Module)**
- Responsible for all remote data operations, including API services (Retrofit), data transfer objects (DTOs), and network-related dependency injection.

## 🔧 How to Create an Android Library Module
To add a new library module in Android Studio, follow these steps:
1. Go to `File` -> `New` -> `New Module...`
2. Select `Android Library` from the list.
3. Provide a name for your module (e.g., `feature_new`).
4. Click `Finish`.

## ⚙️ Versioning

- **Target SDK:** `36`
- **Minimum SDK:** `29`
- **Kotlin Version:** `2.3.10`
- **Gradle Version:** `9.0.0`

## 📚 APIs & References

### Data Sources
- **Primary API:** [PokéAPI (pokeapi.co)](https://pokeapi.co/)
- **Image Sprites:** [PokeAPI/sprites on GitHub](https://github.com/PokeAPI/sprites)

### Articles & Inspiration
- **Shared Element Transitions:**
- [Shared Element Transitions in Jetpack Compose](https://fvilarino.medium.com/shared-element-transitions-in-jetpack-compose-8f553078101e)
- [Building a Shared Element Transition in Jetpack Compose](https://getstream.io/blog/shared-element-compose/)
- **Type-Safe Navigation:**
- [Navigation-Compose meets Type-Safety](https://medium.com/androiddevelopers/navigation-compose-meet-type-safety-e081fb3cf2f8)
- **UI/UX Design Inspiration:**
- [Dribbble - Pokedex App by Alexandr](https://dribbble.com/shots/6540871-Pokedex-App) (Note: Used as inspiration, not a direct copy)
- **App Icon:**
- Derived from [Fandom Ideas Wiki](https://ideas.fandom.com/wiki/Pok%C3%A9_Ball_Pok%C3%A9mon_Ideas_(Super_Smash_Bros._series)?file=Pok%C3%A9_Ball_Redraw_by_oykawoo.png)