# ademivaldo/challenge_pokemon architecture

> Architecture diagram of the GitHub repository ademivaldo/challenge_pokemon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ademivaldo/challenge_pokemon
- Repository: https://github.com/ademivaldo/challenge_pokemon

## Overview

This is an Expo/React Native Pokémon catalog app. Users browse and search a paginated catalog, filter by type, open Pokémon details, mark favorites, and explore randomly placed Pokémon on a map; favorites and catalog data persist locally. The graph follows the navigation and the screen-owned requests and storage operations shown in excerpts. Some screen details are partial, so unsampled relationships are omitted rather than inferred.

Main entry points: [`src/screens/List.tsx`](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/List.tsx) (Pokémon catalog), [`src/screens/Map.tsx`](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Map.tsx) (Pokémon map), [`src/screens/Favorites.tsx`](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Favorites.tsx) (Favorites screen), [`App.tsx`](https://github.com/ademivaldo/challenge_pokemon/blob/main/App.tsx) (Tab navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Tab navigation<br/>[App.tsx]"]
end

subgraph group_catalog["Catalog and favorites"]
  node_list["Pokémon catalog<br/>[List.tsx]"]
  node_favorites["Favorites screen<br/>[Favorites.tsx]"]
end

subgraph group_map_details["Map and details"]
  node_map["Pokémon map<br/>[Map.tsx]"]
  node_status["Pokémon details<br/>[StatusPokemon.tsx]"]
end

subgraph group_shared["Shared data and UI"]
  node_api["PokéAPI client<br/>[pokeApi.ts]"]
  node_type_filter["Type filter chips<br/>[TypeFilter.tsx]"]
  node_pokemon_data["Pokémon data model<br/>[BasePokemon.ts]"]
  node_responsive["Responsive dimensions"]
end

node_user(("App user"))
node_pokeapi{{"PokéAPI service"}}
node_storage[("AsyncStorage")]
node_location{{"Device location"}}

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_list
node_app -->|"routes to"| node_map
node_app -->|"routes to"| node_favorites
node_list -->|"requests data"| node_api
node_api -->|"fetches from"| node_pokeapi
node_list -->|"reads and writes"| node_storage
node_list -->|"uses for filtering"| node_type_filter
node_favorites -->|"reads and writes"| node_storage
node_favorites -->|"navigates to catalog"| node_app
node_map -->|"requests page"| node_api
node_map -->|"reads and writes cache"| node_storage
node_map -->|"requests position"| node_location
node_map -->|"opens details"| node_status
node_status -->|"fetches stats"| node_pokeapi
node_api -->|"uses item type"| node_pokemon_data
node_list -->|"uses item type"| node_pokemon_data
node_map -->|"uses item type"| node_pokemon_data
node_favorites -->|"uses item type"| node_pokemon_data
node_type_filter -->|"sizes text with"| node_responsive
node_list -->|"sizes text with"| node_responsive
node_status -->|"sizes text with"| node_responsive
node_favorites -->|"sizes text with"| node_responsive

click node_app "https://github.com/ademivaldo/challenge_pokemon/blob/main/App.tsx"
click node_list "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/List.tsx"
click node_favorites "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Favorites.tsx"
click node_map "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Map.tsx"
click node_status "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/modal/StatusPokemon.tsx"
click node_api "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/services/pokeApi.ts"
click node_type_filter "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/TypeFilter.tsx"
click node_pokemon_data "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/store/BasePokemon.ts"
click node_responsive "https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/ResponsiveDimension.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_user toneBlue
class node_list,node_favorites,node_storage toneAmber
class node_map,node_status,node_pokeapi toneMint
class node_api,node_type_filter,node_pokemon_data,node_responsive toneRose
class node_location toneIndigo
```

## Components

### App navigation

- [Tab navigation](https://github.com/ademivaldo/challenge_pokemon/blob/main/App.tsx): `App.tsx`

### Catalog and favorites

- [Pokémon catalog](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/List.tsx): `src/screens/List.tsx`
- [Favorites screen](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Favorites.tsx): `src/screens/Favorites.tsx`

### Map and details

- [Pokémon map](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/screens/Map.tsx): `src/screens/Map.tsx`
- [Pokémon details](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/modal/StatusPokemon.tsx): `src/componets/modal/StatusPokemon.tsx`

### Shared data and UI

- [PokéAPI client](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/services/pokeApi.ts): `src/services/pokeApi.ts`
- [Type filter chips](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/TypeFilter.tsx): `src/componets/TypeFilter.tsx`
- [Pokémon data model](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/store/BasePokemon.ts): `src/store/BasePokemon.ts`
- [Responsive dimensions](https://github.com/ademivaldo/challenge_pokemon/blob/main/src/componets/ResponsiveDimension.ts): `src/componets/ResponsiveDimension.ts`

### Other components

- **App user**
- **PokéAPI service**
- **AsyncStorage**
- **Device location**

## Connections

- App user → Tab navigation: opens (evidence: `App.tsx`)
- Tab navigation → Pokémon catalog: routes to (evidence: `App.tsx`)
- Tab navigation → Pokémon map: routes to (evidence: `App.tsx`)
- Tab navigation → Favorites screen: routes to (evidence: `App.tsx`)
- Pokémon catalog → PokéAPI client: requests data (evidence: `src/screens/List.tsx`)
- PokéAPI client → PokéAPI service: fetches from (evidence: `src/services/pokeApi.ts`)
- Pokémon catalog → AsyncStorage: reads and writes (evidence: `src/screens/List.tsx`)
- Pokémon catalog → Type filter chips: uses for filtering (evidence: `README.md`)
- Favorites screen → AsyncStorage: reads and writes (evidence: `src/screens/Favorites.tsx`)
- Favorites screen → Tab navigation: navigates to catalog (evidence: `src/screens/Favorites.tsx`)
- Pokémon map → PokéAPI client: requests page (evidence: `src/screens/Map.tsx`)
- Pokémon map → AsyncStorage: reads and writes cache (evidence: `src/screens/Map.tsx`)
- Pokémon map → Device location: requests position (evidence: `src/screens/Map.tsx`)
- Pokémon map → Pokémon details: opens details (evidence: `src/screens/Map.tsx`)
- Pokémon details → PokéAPI service: fetches stats (evidence: `src/componets/modal/StatusPokemon.tsx`)
- PokéAPI client → Pokémon data model: uses item type (evidence: `src/services/pokeApi.ts`)
- Pokémon catalog → Pokémon data model: uses item type (evidence: `src/screens/List.tsx`)
- Pokémon map → Pokémon data model: uses item type (evidence: `src/screens/Map.tsx`)
- Favorites screen → Pokémon data model: uses item type (evidence: `src/screens/Favorites.tsx`)
- Type filter chips → Responsive dimensions: sizes text with (evidence: `src/componets/TypeFilter.tsx`)
- Pokémon catalog → Responsive dimensions: sizes text with (evidence: `src/screens/List.tsx`)
- Pokémon details → Responsive dimensions: sizes text with (evidence: `src/componets/modal/StatusPokemon.tsx`)
- Favorites screen → Responsive dimensions: sizes text with (evidence: `src/screens/Favorites.tsx`)
