Skip to content

gladson-sza/pokedex-kotlin

Repository files navigation

📱 Pokedex App Language License API

Preview

Splash Home Details

📦 Resources

📄 Docs

Documentation

Pokédex application, containing the data of all pokémons, the app makes data requests to the PokéAPI and saves them locally so that the user can have offline access to the data.

Features

  • All official pokédex entries
  • Search by name
  • Pokémon details
  • Offline persistence

Flow

  • Splash

On this screen, the logo with a button is displayed. When clicking on the button, a check is made to see if the data is already persisted, if there is no saved data, a request is initiated to obtain the data of all pokémons and save them locally.

If there is saved data, or it was possible to obtain and save data from the API, the user is redirected to the Home screen.

  • Home

In this screen, the saved data of the pokémons will be loaded in a list, by default, the list will be ordered by the pokédex number. The list is composed of cards, with the colors of the pokémon, its name, photo and type, when clicking on the card the user will be directed to the details screen of that pokémon.

Just above the screen, the user can search for a pokémon by its name.

You can filter the list by Pokédex number, alphabetically or sort order.

Also on this screen is a button that will open the details screen for a random pokemon

  • Details

This screen displays the pokémon's details, with data such as its name, photo, types, weight, height, possible abilities, pokédex description and its base status. The screen will adapt to the color of the Pokémon's primary type.

In the upper left corner, there is a button to go back to home.

In the right and left corners, it is possible to navigate between the pokémons, the left button will take to the predecessor pokémon by the pokédex number, the right button will lead to the successor pokémon by the pokédex number. If you are on the first pokémon on the list, the left button will not appear, if you are on the last pokémon on the list, the right button will not appear.

Architecture

The project architecture is divided into layers, following the MVVM pattern, with UI, Domain and Data layers. More architecture details

UI Layer

The UI Layer is responsible for handling data presentation and user interaction.

Domain Layer

The domain layer is the intermediary layer between the interface and data layer, which is responsible for performing the data call, dealing with business logic and then notifying the interface layer. Works as a controller.

Data Layer

The data layer is responsible for both making API calls and persisting in the local database, in addition to containing business logic.

Packages

Description

/di → Contains Koin dependency injection modules
/data → Contains Models, Services, DAOs, Services and others data related classes
/exceptions → Contains custom exception classes
/ui → Contains Activities, Fragments, Adapters and ViewModels classes (Works as a controller)
/util → Contains utility classes and kotlin extensions for code reuse

Libs

Build

Build your app with gradle

  git clone https://github.com/gladson-sza/pokedex-kotlin.git
  cd /pokedex-kotlin
  gradlew installDebug

Open your device and search for your installed 'Pokedex egSYS' apk

License

MIT License

Copyright (c) 2022 Gladson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Pokedex App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages