# ricardomoraispor/tallgrassmaps architecture

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

- Interactive diagram: https://gitdiagram.com/ricardomoraispor/tallgrassmaps
- Repository: https://github.com/ricardomoraispor/tallgrassmaps

## Overview

Tall Grass is a Pokémon game companion for browsing regional maps and game-specific reference data. The main workflow routes a player into a game and region, then to a location where map navigation and location details support exploration; separate views provide the Pokédex, game catalog, and Hall of Fame tracker. Map rendering, game/map data, and persisted settings form key internal layers. The source index and excerpts establish routing and selected map/settings links; several feature files were not sampled, so their internal calls are not asserted.

Main entry points: [`src/router.tsx`](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/router.tsx) (Route dispatch), [`src/hooks/useGameRoute.ts`](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/hooks/useGameRoute.ts) (Game route resolver), [`src/components/map/MapViewer.tsx`](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/components/map/MapViewer.tsx) (Interactive map), [`src/main.tsx`](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/main.tsx) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and navigation"]
  node_webapp["Web application<br/>[main.tsx]"]
  node_router["Route dispatch<br/>[router.tsx]"]
  node_home["Game catalog<br/>[HomePage.tsx]"]
  node_game_layout["Game layout<br/>[GameLayout.tsx]"]
  node_credits["Credits page<br/>[CreditsPage.tsx]"]
end

subgraph group_maps["Maps and locations"]
  node_region_page["Region overview<br/>[RegionPage.tsx]"]
  node_location_page["Location details<br/>[LocationPage.tsx]"]
  node_map_viewer["Interactive map<br/>[MapViewer.tsx]"]
  node_map_data["Region map data<br/>[kanto-rby.ts]"]
end

subgraph group_reference["Game reference data"]
  node_game_catalog["Game metadata<br/>[games.ts]"]
  node_pokedex["Pokédex views"]
  node_pokedex_data["Pokédex data"]
  node_location_reference["Location references"]
  node_hall_of_fame["Hall of Fame"]
end

subgraph group_state["User state and utilities"]
  node_tracker_state["Tracker state<br/>[tracker.ts]"]
  node_settings_ui["Settings controls<br/>[SettingsDialog.tsx]"]
  node_settings_state["Persisted settings<br/>[settings.ts]"]
  node_route_hook["Game route resolver<br/>[useGameRoute.ts]"]
  node_path_helpers["Path helpers<br/>[paths.ts]"]
end

node_player(("Player"))

node_player -->|"opens"| node_webapp
node_webapp -->|"mounts routes"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_credits
node_router -->|"routes to"| node_game_layout
node_router -->|"routes to"| node_region_page
node_router -->|"lazy-loads"| node_location_page
node_game_layout -->|"resolves game route"| node_route_hook
node_route_hook -->|"looks up game"| node_game_catalog
node_route_hook -->|"resolves region trail"| node_map_data
node_route_hook -->|"builds location link"| node_path_helpers
node_map_viewer -->|"uses map types"| node_map_data
node_map_viewer -->|"reads theme state"| node_settings_state
node_settings_ui -->|"updates settings"| node_settings_state
node_home -.->|"uses catalog"| node_game_catalog
node_pokedex -.->|"reads entries"| node_pokedex_data
node_location_page -.->|"presents references"| node_location_reference
node_hall_of_fame -.->|"uses tracker state"| node_tracker_state

click node_webapp "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/main.tsx"
click node_router "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/router.tsx"
click node_home "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Home/HomePage.tsx"
click node_game_layout "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/GameLayout.tsx"
click node_region_page "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/Region/RegionPage.tsx"
click node_location_page "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/Location/LocationPage.tsx"
click node_map_viewer "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/components/map/MapViewer.tsx"
click node_map_data "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/data/maps/kanto-rby.ts"
click node_game_catalog "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/data/games.ts"
click node_pokedex "https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/pages/Game/Pokedex"
click node_pokedex_data "https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/data/pokedex"
click node_location_reference "https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/data"
click node_hall_of_fame "https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/pages/Game/HallOfFame"
click node_tracker_state "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/stores/tracker.ts"
click node_settings_ui "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/components/settings/SettingsDialog.tsx"
click node_settings_state "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/stores/settings.ts"
click node_route_hook "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/hooks/useGameRoute.ts"
click node_path_helpers "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/lib/paths.ts"
click node_credits "https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Credits/CreditsPage.tsx"

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_webapp,node_router,node_home,node_game_layout,node_credits toneBlue
class node_region_page,node_location_page,node_map_viewer,node_map_data toneAmber
class node_game_catalog,node_pokedex,node_pokedex_data,node_location_reference,node_hall_of_fame toneMint
class node_tracker_state,node_settings_ui,node_settings_state,node_route_hook,node_path_helpers toneRose
class node_player toneIndigo
```

## Components

### Application and navigation

- [Web application](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/main.tsx): `src/main.tsx`
- [Route dispatch](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/router.tsx): `src/router.tsx`
- [Game catalog](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Home/HomePage.tsx): `src/pages/Home/HomePage.tsx`
- [Game layout](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/GameLayout.tsx): `src/pages/Game/GameLayout.tsx`
- [Credits page](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Credits/CreditsPage.tsx): `src/pages/Credits/CreditsPage.tsx`

### Maps and locations

- [Region overview](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/Region/RegionPage.tsx): `src/pages/Game/Region/RegionPage.tsx`
- [Location details](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/pages/Game/Location/LocationPage.tsx): `src/pages/Game/Location/LocationPage.tsx`
- [Interactive map](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/components/map/MapViewer.tsx): `src/components/map/MapViewer.tsx`
- [Region map data](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/data/maps/kanto-rby.ts): `src/data/maps/kanto-rby.ts`

### Game reference data

- [Game metadata](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/data/games.ts): `src/data/games.ts`
- [Pokédex views](https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/pages/Game/Pokedex): `src/pages/Game/Pokedex`
- [Pokédex data](https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/data/pokedex): `src/data/pokedex`
- [Location references](https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/data): `src/data`
- [Hall of Fame](https://github.com/ricardomoraispor/tallgrassmaps/tree/main/src/pages/Game/HallOfFame): `src/pages/Game/HallOfFame`

### User state and utilities

- [Tracker state](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/stores/tracker.ts): `src/stores/tracker.ts`
- [Settings controls](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/components/settings/SettingsDialog.tsx): `src/components/settings/SettingsDialog.tsx`
- [Persisted settings](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/stores/settings.ts): `src/stores/settings.ts`
- [Game route resolver](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/hooks/useGameRoute.ts): `src/hooks/useGameRoute.ts`
- [Path helpers](https://github.com/ricardomoraispor/tallgrassmaps/blob/main/src/lib/paths.ts): `src/lib/paths.ts`

### Other components

- **Player**

## Connections

- Player → Web application: opens (evidence: `src/main.tsx`)
- Web application → Route dispatch: mounts routes (evidence: `src/main.tsx`)
- Route dispatch → Game catalog: routes to (evidence: `src/router.tsx`)
- Route dispatch → Credits page: routes to (evidence: `src/router.tsx`)
- Route dispatch → Game layout: routes to (evidence: `src/router.tsx`)
- Route dispatch → Region overview: routes to (evidence: `src/router.tsx`)
- Route dispatch → Location details: lazy-loads (evidence: `src/router.tsx`)
- Game layout → Game route resolver: resolves game route (evidence: `src/pages/Game/GameLayout.tsx`)
- Game route resolver → Game metadata: looks up game (evidence: `src/hooks/useGameRoute.ts`)
- Game route resolver → Region map data: resolves region trail (evidence: `src/hooks/useGameRoute.ts`)
- Game route resolver → Path helpers: builds location link (evidence: `src/hooks/useGameRoute.ts`)
- Interactive map → Region map data: uses map types (evidence: `src/components/map/MapViewer.tsx`)
- Interactive map → Persisted settings: reads theme state (evidence: `src/components/map/MapViewer.tsx`)
- Settings controls → Persisted settings: updates settings (evidence: `src/components/settings/SettingsDialog.tsx`)
- Game catalog → Game metadata: uses catalog
- Pokédex views → Pokédex data: reads entries (evidence: `src/pages/Game/Pokedex/usePokedexSearch.ts`)
- Location details → Location references: presents references
- Hall of Fame → Tracker state: uses tracker state
