Pokedex
Pokedex copied to clipboard
Pokedex developed with React Native, consuming the public API "Pokeapi".
Pokédex
Table of contents:
- About the project
- Technologies
- Prerequisites
- Getting started
- File structure
- License
- Contact
About the project:


Pokedex developed with React Native, consuming the public API: Pokeapi.
Objective:
- Consume the endpoint https://pokeapi.co/api/v2/pokemon/ and create a screen with a list of pokemons using pagination.
- Consume the endpoint https://pokeapi.co/api/v2/pokemon/{id or name}/ and create a pokemon details screen.
Technologies
:white_check_mark: React Native
:white_check_mark: Native Base
:white_check_mark: Styled-components
:white_check_mark: Axios
:white_check_mark: React-native-linear-gradient
:white_check_mark: SWR
:white_check_mark: React-navigation
:white_check_mark: Context API
:white_check_mark: Lottie
:white_check_mark: Git-commit-msg-linter
:white_check_mark: React-native-animatable
:white_check_mark: React Hooks
:white_check_mark: Babel-plugin-root-import
:white_check_mark: Vector Icons
:white_check_mark: react-native-fast-image
:white_check_mark: Animated
:white_check_mark: Typescript
:white_check_mark: Jest
:white_check_mark: @testing-library/jest-native
:white_check_mark: @testing-library/react-hooks
:white_check_mark: @testing-library/react-native
Prerequisites
Before proceeding, it is ideal that you have the environment set up to create applications in React Native, for this you can follow the guide of the link below:
React Native's Environment (Android/iOS)
Getting started
First you clone the project:
$ git clone https://github.com/MRLSK8/Pokedex.git && cd Pokedex
Then you run the following command to install packages:
$ yarn install
Next, you start the project:
$ yarn start
Finally you run it like so:
$ yarn android
If you want to build it and generate an APK just do the following
$ yarn android:build
It will generate an APK on android/app/build/outputs/apk/app-release.apk, copy into your cellphone and install it.
And that's it!
Running Tests
You just need to run this command:
$ yarn test
In order to check the tests coverage out, run this command instead:
$ yarn test:coverage
File structure
The file structure are in the following way:
├── src/
│ ├── @types/
│ │ └── index.d.js
│ ├── assets/
│ │ └── LottieJsonFiles
│ │ ├── pikachu.json
| | └── pokeball.json
│ ├── components/
│ │ ├── GoBackButton/
| | | ├── index.tsx
| | | └── style.ts
| | ├── LoadingWrapper/
| | | ├── index.tsx
| | | └── style.ts
│ │ ├── PokemonItem/
| | | ├── index.tsx
| | | └── style.ts
| | ├── SafeAreaWrapper/
| | | ├── index.tsx
| | | └── style.ts
│ │ └── index.ts
│ ├── config/
│ │ └── statusBarConfig.ts
│ ├── hooks/
│ │ └── pokemonContext.tsx
│ ├── routes/
│ │ └── index.ts
│ ├── screens/
│ │ ├── PokemonDetails/
| | | ├── index.tsx
| | | └── style.ts
| | ├── PokemonsList/
| | | ├── index.tsx
| | | └── style.ts
│ │ └── index.tsx
│ ├── services/
│ │ └── api.ts
│ ├── utils/
│ │ ├── addPadLeftToNumber.ts
│ │ ├── getPokemonIdByUrl.ts
│ │ ├── getPokemonImageById.ts
│ │ ├── index.ts
│ │ └── showErrorAlert.ts
│ ├── index.tsx
├── .buckconfig
├── .editorconfig
├── .eslintrc.js
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── app.json
├── babel.config.js
├── index.js
├── LICENSE
├── metro.config
├── package.json
├── react-native.config.js
├── tsconfig.js
├── yarn.lock
License:
This project is licensed under the MIT License - see the LICENSE file for details.
Contact:
Facebook | Instagram | Linkedin