# matheusspaiva/pokedex architecture

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

- Interactive diagram: https://gitdiagram.com/matheusspaiva/pokedex
- Repository: https://github.com/matheusspaiva/pokedex

## Overview

This React Pokédex guides users from generation/name browsing into a Pokémon detail view, with additional reference features for forms, evolution, moves, encounters, types, and stats. The detail page fetches species and Pokémon data, translates species descriptions, and composes the feature views. The README documents the broader capabilities; some component internals were not excerpted, so their relationships are limited to documented behavior or indexed imports. Deployment and build infrastructure are excluded.

Main entry points: [`src/Page/PokeInfo/index.tsx`](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/index.tsx) (Pokémon detail loader), [`src/Page/PokeList/index.tsx`](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/index.tsx) (Generation & search), [`src/api/pokeApi.ts`](https://github.com/matheusspaiva/pokedex/blob/main/src/api/pokeApi.ts) (PokéAPI client), [`src/routes/system/index.tsx`](https://github.com/matheusspaiva/pokedex/blob/main/src/routes/system/index.tsx) (Route dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation"]
  node_routes["Route dispatch<br/>[index.tsx]"]
  node_landing["Landing page<br/>[App.tsx]"]
end

subgraph group_catalog["Browse catalog"]
  node_list["Generation &amp; search<br/>[index.tsx]"]
  node_listview["Pokémon results<br/>[listaPokemon.tsx]"]
  node_listdetails["Item details<br/>[detailItens.tsx]"]
end

subgraph group_details["Pokémon details"]
  node_detail["Pokémon detail loader<br/>[index.tsx]"]
  node_imageinfo["Image gallery<br/>[ImageInfo.tsx]"]
  node_forms["Alternate forms<br/>[Forms.tsx]"]
  node_info["Species information<br/>[Informations.tsx]"]
  node_types["Type interactions"]
  node_stats["Base stats<br/>[PokemonStats.tsx]"]
  node_evolution["Evolution tree<br/>[EvolutionChain.tsx]"]
  node_moves["Learnable moves<br/>[MovesSection.tsx]"]
  node_encounters["Encounter locations<br/>[Encounter.tsx]"]
end

subgraph group_shared["Shared services"]
  node_api["PokéAPI client<br/>[pokeApi.ts]"]
  node_translator["Description translation<br/>[translate.ts]"]
  node_cache[("Browser local storage<br/>[LocalStorage.ts]")]
end

node_visitor(("Pokédex user"))
node_pokeapi_service(("PokéAPI"))
node_translation_service(("Translation service"))
node_pokemon_image(("Pokémon artwork"))

node_visitor -->|"opens"| node_routes
node_routes -->|"routes to"| node_landing
node_routes -->|"routes to"| node_list
node_routes -->|"routes to"| node_detail
node_visitor -.->|"searches"| node_list
node_list -->|"fetches generations"| node_api
node_api -->|"requests data"| node_pokeapi_service
node_list -->|"renders results"| node_listview
node_listview -.->|"loads artwork"| node_pokemon_image
node_list -->|"renders item details"| node_listdetails
node_listdetails -->|"fetches item data"| node_api
node_list -->|"reads/writes moves"| node_cache
node_visitor -.->|"selects Pokémon"| node_detail
node_detail -->|"fetches Pokémon and species"| node_api
node_detail -->|"translates description"| node_translator
node_translator -->|"requests translation"| node_translation_service
node_translator -->|"reads/writes translations"| node_cache
node_detail -->|"renders gallery"| node_imageinfo
node_detail -->|"renders forms"| node_forms
node_detail -->|"renders description"| node_info
node_info -->|"renders type details"| node_types
node_detail -->|"renders stats"| node_stats
node_detail -->|"renders evolution"| node_evolution
node_detail -->|"renders moves"| node_moves
node_detail -->|"renders encounters"| node_encounters
node_encounters -->|"fetches locations"| node_api
node_imageinfo -.->|"loads artwork"| node_pokemon_image

click node_routes "https://github.com/matheusspaiva/pokedex/blob/main/src/routes/system/index.tsx"
click node_landing "https://github.com/matheusspaiva/pokedex/blob/main/src/App.tsx"
click node_list "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/index.tsx"
click node_listview "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/Components/listaPokemon.tsx"
click node_listdetails "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/Components/detailItens.tsx"
click node_detail "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/index.tsx"
click node_imageinfo "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/ImageInfo.tsx"
click node_forms "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Forms.tsx"
click node_info "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Informations.tsx"
click node_types "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/SelectTypesSection.tsx"
click node_stats "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/PokemonStats.tsx"
click node_evolution "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/EvolutionChain.tsx"
click node_moves "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/MovesSection.tsx"
click node_encounters "https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Encounter.tsx"
click node_api "https://github.com/matheusspaiva/pokedex/blob/main/src/api/pokeApi.ts"
click node_translator "https://github.com/matheusspaiva/pokedex/blob/main/src/Utils/translate.ts"
click node_cache "https://github.com/matheusspaiva/pokedex/blob/main/src/Utils/LocalStorage.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_routes,node_landing,node_visitor toneBlue
class node_list,node_listview,node_listdetails toneAmber
class node_detail,node_imageinfo,node_forms,node_info,node_types,node_stats,node_evolution,node_moves,node_encounters,node_pokeapi_service toneMint
class node_api,node_translator,node_cache toneRose
class node_translation_service,node_pokemon_image toneIndigo
```

## Components

### Navigation

- [Route dispatch](https://github.com/matheusspaiva/pokedex/blob/main/src/routes/system/index.tsx): `src/routes/system/index.tsx`
- [Landing page](https://github.com/matheusspaiva/pokedex/blob/main/src/App.tsx): `src/App.tsx`

### Browse catalog

- [Generation & search](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/index.tsx): `src/Page/PokeList/index.tsx`
- [Pokémon results](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/Components/listaPokemon.tsx): `src/Page/PokeList/Components/listaPokemon.tsx`
- [Item details](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeList/Components/detailItens.tsx): `src/Page/PokeList/Components/detailItens.tsx`

### Pokémon details

- [Pokémon detail loader](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/index.tsx): `src/Page/PokeInfo/index.tsx`
- [Image gallery](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/ImageInfo.tsx): `src/Page/PokeInfo/components/ImageInfo.tsx`
- [Alternate forms](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Forms.tsx): `src/Page/PokeInfo/components/Forms.tsx`
- [Species information](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Informations.tsx): `src/Page/PokeInfo/components/Informations.tsx`
- [Type interactions](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/SelectTypesSection.tsx): `src/Page/PokeInfo/components/SelectTypesSection.tsx`
- [Base stats](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/PokemonStats.tsx): `src/Page/PokeInfo/components/PokemonStats.tsx`
- [Evolution tree](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/EvolutionChain.tsx): `src/Page/PokeInfo/components/EvolutionChain.tsx`
- [Learnable moves](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/MovesSection.tsx): `src/Page/PokeInfo/components/MovesSection.tsx`
- [Encounter locations](https://github.com/matheusspaiva/pokedex/blob/main/src/Page/PokeInfo/components/Encounter.tsx): `src/Page/PokeInfo/components/Encounter.tsx`

### Shared services

- [PokéAPI client](https://github.com/matheusspaiva/pokedex/blob/main/src/api/pokeApi.ts): `src/api/pokeApi.ts`
- [Description translation](https://github.com/matheusspaiva/pokedex/blob/main/src/Utils/translate.ts): `src/Utils/translate.ts`
- [Browser local storage](https://github.com/matheusspaiva/pokedex/blob/main/src/Utils/LocalStorage.ts): `src/Utils/LocalStorage.ts`

### Other components

- **Pokédex user**
- **PokéAPI**
- **Translation service**
- **Pokémon artwork**

## Connections

- Pokédex user → Route dispatch: opens
- Route dispatch → Landing page: routes to (evidence: `src/routes/system/index.tsx`)
- Route dispatch → Generation & search: routes to (evidence: `src/routes/system/index.tsx`)
- Route dispatch → Pokémon detail loader: routes to (evidence: `src/routes/system/index.tsx`)
- Pokédex user → Generation & search: searches
- Generation & search → PokéAPI client: fetches generations (evidence: `src/Page/PokeList/index.tsx`)
- PokéAPI client → PokéAPI: requests data (evidence: `src/api/pokeApi.ts`)
- Generation & search → Pokémon results: renders results (evidence: `src/Page/PokeList/index.tsx`)
- Pokémon results → Pokémon artwork: loads artwork
- Generation & search → Item details: renders item details (evidence: `src/Page/PokeList/index.tsx`)
- Item details → PokéAPI client: fetches item data (evidence: `src/Page/PokeList/Components/detailItens.tsx`)
- Generation & search → Browser local storage: reads/writes moves (evidence: `src/Page/PokeList/index.tsx`)
- Pokédex user → Pokémon detail loader: selects Pokémon
- Pokémon detail loader → PokéAPI client: fetches Pokémon and species (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Description translation: translates description (evidence: `src/Page/PokeInfo/index.tsx`)
- Description translation → Translation service: requests translation (evidence: `src/Utils/translate.ts`)
- Description translation → Browser local storage: reads/writes translations (evidence: `src/Utils/translate.ts`)
- Pokémon detail loader → Image gallery: renders gallery (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Alternate forms: renders forms (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Species information: renders description (evidence: `src/Page/PokeInfo/index.tsx`)
- Species information → Type interactions: renders type details (evidence: `src/Page/PokeInfo/components/Informations.tsx`)
- Pokémon detail loader → Base stats: renders stats (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Evolution tree: renders evolution (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Learnable moves: renders moves (evidence: `src/Page/PokeInfo/index.tsx`)
- Pokémon detail loader → Encounter locations: renders encounters (evidence: `src/Page/PokeInfo/index.tsx`)
- Encounter locations → PokéAPI client: fetches locations (evidence: `src/Page/PokeInfo/components/Encounter.tsx`)
- Image gallery → Pokémon artwork: loads artwork
