# malboyoo/react-native-pokedex architecture

> Architecture diagram of the GitHub repository malboyoo/react-native-pokedex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/malboyoo/react-native-pokedex
- Repository: https://github.com/malboyoo/react-native-pokedex

## Overview

This Expo app is a Pokédex: users browse a searchable, sortable, paginated Pokémon list, open a Pokémon detail view, and inspect its profile, description, and base stats. The detail view also supports adjacent-Pokémon navigation and playing a Pokémon cry. Data is fetched from PokéAPI; sprites are loaded from its public sprite repository. The graph follows visible imports and calls in the excerpts and SOURCE INDEX; unsampled routing setup and implementation details are not inferred.

Main entry points: [`app/pokemon/[id].tsx`](https://github.com/malboyoo/react-native-pokedex/blob/main/app/pokemon/%5Bid%5D.tsx) (Pokémon detail), [`app/index.tsx`](https://github.com/malboyoo/react-native-pokedex/blob/main/app/index.tsx) (Pokédex list), [`components/ThemedText.tsx`](https://github.com/malboyoo/react-native-pokedex/blob/main/components/ThemedText.tsx) (Themed text), [`components/Card.tsx`](https://github.com/malboyoo/react-native-pokedex/blob/main/components/Card.tsx) (Card container)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App screens"]
  node_list["Pokédex list<br/>[index.tsx]"]
  node_detail["Pokémon detail<br/>[&#91;id&#93;.tsx]"]
end

subgraph group_data["Pokémon data"]
  node_fetch["Query hooks<br/>[useFetchQuery.tsx]"]
  node_api{{"PokéAPI"}}
  node_types["Pokémon types<br/>[pokemon.tsx]"]
end

subgraph group_ui["Reusable UI"]
  node_search["Search input<br/>[SearchBar.tsx]"]
  node_sort["Sort controls<br/>[SortButton.tsx]"]
  node_radio["Sort radio<br/>[Radio.tsx]"]
  node_pokemon_card["List Pokémon card<br/>[PokemonCard.tsx]"]
  node_about["Profile facts<br/>[About.tsx]"]
  node_stats["Base stats<br/>[Stats.tsx]"]
  node_statbar["Animated stat bar"]
  node_tag["Type tag<br/>[Tag.tsx]"]
  node_card["Card container<br/>[Card.tsx]"]
  node_row["Row layout<br/>[Row.tsx]"]
  node_rootview["Screen container<br/>[RouteView.tsx]"]
  node_text["Themed text<br/>[ThemedText.tsx]"]
end

subgraph group_foundation["UI foundation"]
  node_theme["Theme colors hook<br/>[useThemeColors.ts]"]
  node_colors["Color palette<br/>[Colors.ts]"]
  node_shadows["Shadow styles<br/>[Shadows.ts]"]
end

node_user(("App user"))
node_sprites{{"Sprite repository"}}
node_audio{{"Cry audio"}}

node_user -->|"opens"| node_list
node_list -->|"loads pages"| node_fetch
node_fetch -->|"fetches data"| node_api
node_fetch -->|"types responses"| node_types
node_list -->|"renders"| node_search
node_list -->|"renders"| node_sort
node_sort -->|"renders"| node_radio
node_list -->|"renders items"| node_pokemon_card
node_list -->|"renders"| node_card
node_list -->|"renders"| node_row
node_list -->|"renders"| node_text
node_list -->|"renders"| node_rootview
node_list -.->|"opens selected Pokémon"| node_detail
node_user -->|"opens"| node_detail
node_detail -->|"loads Pokémon and species"| node_fetch
node_detail -->|"loads artwork"| node_api
node_detail -->|"loads sprite"| node_sprites
node_detail -->|"plays cry"| node_audio
node_detail -->|"renders facts"| node_about
node_detail -->|"renders stats"| node_stats
node_detail -->|"renders types"| node_tag
node_detail -->|"renders"| node_card
node_detail -->|"renders"| node_row
node_detail -->|"renders"| node_text
node_detail -->|"renders"| node_rootview
node_about -->|"uses layout"| node_row
node_about -->|"uses text"| node_text
node_stats -->|"renders bars"| node_statbar
node_stats -->|"uses layout"| node_row
node_stats -->|"uses text"| node_text
node_tag -->|"uses text"| node_text
node_pokemon_card -->|"uses container"| node_card
node_pokemon_card -->|"uses text"| node_text
node_search -->|"uses layout"| node_row
node_card -->|"reads colors"| node_theme
node_card -->|"uses styles"| node_shadows
node_sort -->|"uses container"| node_card
node_sort -->|"reads colors"| node_theme
node_theme -->|"selects palette"| node_colors
node_text -->|"reads colors"| node_theme
node_text -->|"uses color keys"| node_colors

click node_list "https://github.com/malboyoo/react-native-pokedex/blob/main/app/index.tsx"
click node_detail "https://github.com/malboyoo/react-native-pokedex/blob/main/app/pokemon/%5Bid%5D.tsx"
click node_fetch "https://github.com/malboyoo/react-native-pokedex/blob/main/hooks/useFetchQuery.tsx"
click node_types "https://github.com/malboyoo/react-native-pokedex/blob/main/interface/pokemon.tsx"
click node_search "https://github.com/malboyoo/react-native-pokedex/blob/main/components/SearchBar.tsx"
click node_sort "https://github.com/malboyoo/react-native-pokedex/blob/main/components/SortButton.tsx"
click node_radio "https://github.com/malboyoo/react-native-pokedex/blob/main/components/Radio.tsx"
click node_pokemon_card "https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/PokemonCard.tsx"
click node_about "https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/About.tsx"
click node_stats "https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/Stats.tsx"
click node_statbar "https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/AnimatedStatBar.tsx"
click node_tag "https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/Tag.tsx"
click node_card "https://github.com/malboyoo/react-native-pokedex/blob/main/components/Card.tsx"
click node_row "https://github.com/malboyoo/react-native-pokedex/blob/main/components/Row.tsx"
click node_rootview "https://github.com/malboyoo/react-native-pokedex/blob/main/components/RouteView.tsx"
click node_text "https://github.com/malboyoo/react-native-pokedex/blob/main/components/ThemedText.tsx"
click node_theme "https://github.com/malboyoo/react-native-pokedex/blob/main/hooks/useThemeColors.ts"
click node_colors "https://github.com/malboyoo/react-native-pokedex/blob/main/constants/Colors.ts"
click node_shadows "https://github.com/malboyoo/react-native-pokedex/blob/main/constants/Shadows.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_list,node_detail,node_user toneBlue
class node_fetch,node_api,node_types toneAmber
class node_search,node_sort,node_radio,node_pokemon_card,node_about,node_stats,node_statbar,node_tag,node_card,node_row,node_rootview,node_text toneMint
class node_theme,node_colors,node_shadows toneRose
class node_sprites,node_audio toneIndigo
```

## Components

### App screens

- [Pokédex list](https://github.com/malboyoo/react-native-pokedex/blob/main/app/index.tsx): `app/index.tsx`
- [Pokémon detail](https://github.com/malboyoo/react-native-pokedex/blob/main/app/pokemon/%5Bid%5D.tsx): `app/pokemon/[id].tsx`

### Pokémon data

- [Query hooks](https://github.com/malboyoo/react-native-pokedex/blob/main/hooks/useFetchQuery.tsx): `hooks/useFetchQuery.tsx`
- **PokéAPI**
- [Pokémon types](https://github.com/malboyoo/react-native-pokedex/blob/main/interface/pokemon.tsx): `interface/pokemon.tsx`

### Reusable UI

- [Search input](https://github.com/malboyoo/react-native-pokedex/blob/main/components/SearchBar.tsx): `components/SearchBar.tsx`
- [Sort controls](https://github.com/malboyoo/react-native-pokedex/blob/main/components/SortButton.tsx): `components/SortButton.tsx`
- [Sort radio](https://github.com/malboyoo/react-native-pokedex/blob/main/components/Radio.tsx): `components/Radio.tsx`
- [List Pokémon card](https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/PokemonCard.tsx): `components/pokemon/PokemonCard.tsx`
- [Profile facts](https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/About.tsx): `components/pokemon/About.tsx`
- [Base stats](https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/Stats.tsx): `components/pokemon/Stats.tsx`
- [Animated stat bar](https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/AnimatedStatBar.tsx): `components/pokemon/AnimatedStatBar.tsx`
- [Type tag](https://github.com/malboyoo/react-native-pokedex/blob/main/components/pokemon/Tag.tsx): `components/pokemon/Tag.tsx`
- [Card container](https://github.com/malboyoo/react-native-pokedex/blob/main/components/Card.tsx): `components/Card.tsx`
- [Row layout](https://github.com/malboyoo/react-native-pokedex/blob/main/components/Row.tsx): `components/Row.tsx`
- [Screen container](https://github.com/malboyoo/react-native-pokedex/blob/main/components/RouteView.tsx): `components/RouteView.tsx`
- [Themed text](https://github.com/malboyoo/react-native-pokedex/blob/main/components/ThemedText.tsx): `components/ThemedText.tsx`

### UI foundation

- [Theme colors hook](https://github.com/malboyoo/react-native-pokedex/blob/main/hooks/useThemeColors.ts): `hooks/useThemeColors.ts`
- [Color palette](https://github.com/malboyoo/react-native-pokedex/blob/main/constants/Colors.ts): `constants/Colors.ts`
- [Shadow styles](https://github.com/malboyoo/react-native-pokedex/blob/main/constants/Shadows.ts): `constants/Shadows.ts`

### Other components

- **App user**
- **Sprite repository**
- **Cry audio**

## Connections

- App user → Pokédex list: opens (evidence: `README.md`)
- Pokédex list → Query hooks: loads pages (evidence: `app/index.tsx`)
- Query hooks → PokéAPI: fetches data (evidence: `hooks/useFetchQuery.tsx`)
- Query hooks → Pokémon types: types responses (evidence: `hooks/useFetchQuery.tsx`)
- Pokédex list → Search input: renders (evidence: `app/index.tsx`)
- Pokédex list → Sort controls: renders (evidence: `app/index.tsx`)
- Sort controls → Sort radio: renders (evidence: `components/SortButton.tsx`)
- Pokédex list → List Pokémon card: renders items (evidence: `app/index.tsx`)
- Pokédex list → Card container: renders (evidence: `app/index.tsx`)
- Pokédex list → Row layout: renders (evidence: `app/index.tsx`)
- Pokédex list → Themed text: renders (evidence: `app/index.tsx`)
- Pokédex list → Screen container: renders (evidence: `app/index.tsx`)
- Pokédex list → Pokémon detail: opens selected Pokémon
- App user → Pokémon detail: opens (evidence: `README.md`)
- Pokémon detail → Query hooks: loads Pokémon and species (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → PokéAPI: loads artwork (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Sprite repository: loads sprite (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Cry audio: plays cry (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Profile facts: renders facts (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Base stats: renders stats (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Type tag: renders types (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Card container: renders (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Row layout: renders (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Themed text: renders (evidence: `app/pokemon/[id].tsx`)
- Pokémon detail → Screen container: renders (evidence: `app/pokemon/[id].tsx`)
- Profile facts → Row layout: uses layout (evidence: `components/pokemon/About.tsx`)
- Profile facts → Themed text: uses text (evidence: `components/pokemon/About.tsx`)
- Base stats → Animated stat bar: renders bars (evidence: `components/pokemon/Stats.tsx`)
- Base stats → Row layout: uses layout (evidence: `components/pokemon/Stats.tsx`)
- Base stats → Themed text: uses text (evidence: `components/pokemon/Stats.tsx`)
- Type tag → Themed text: uses text (evidence: `components/pokemon/Tag.tsx`)
- List Pokémon card → Card container: uses container (evidence: `components/pokemon/PokemonCard.tsx`)
- List Pokémon card → Themed text: uses text (evidence: `components/pokemon/PokemonCard.tsx`)
- Search input → Row layout: uses layout (evidence: `components/SearchBar.tsx`)
- Card container → Theme colors hook: reads colors (evidence: `components/Card.tsx`)
- Card container → Shadow styles: uses styles (evidence: `components/Card.tsx`)
- Sort controls → Card container: uses container (evidence: `components/SortButton.tsx`)
- Sort controls → Theme colors hook: reads colors (evidence: `components/SortButton.tsx`)
- Theme colors hook → Color palette: selects palette (evidence: `hooks/useThemeColors.ts`)
- Themed text → Theme colors hook: reads colors (evidence: `components/ThemedText.tsx`)
- Themed text → Color palette: uses color keys (evidence: `components/ThemedText.tsx`)
