# ritikkumar27/pokecatch_cli_game architecture

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

- Interactive diagram: https://gitdiagram.com/ritikkumar27/pokecatch_cli_game
- Repository: https://github.com/ritikkumar27/pokecatch_cli_game

## Overview

PokéCatch is a terminal Pokémon-catching game. The main workflow is to hunt a rarity-weighted encounter, choose a Poké Ball to attempt a catch, and build a Pokédex while earning XP. Players can inspect inventory and stats, and use the rotating store’s documented buying and selling features. The graph includes the sampled command routing and core modules; README-described capabilities are retained, but unsampled details such as store rotation are not assigned speculative implementation links.

Main entry points: [`pokecatch/core/player.py`](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/player.py) (Profile and Pokédex), [`pokecatch/core/hunting.py`](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/hunting.py) (Hunt and catch), [`pokecatch/utils.py`](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/utils.py) (JSON and sprite helpers), [`pokecatch/core/store.py`](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/store.py) (Store and sales)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command interface"]
  node_commands["CLI commands<br/>[__main__.py]"]
end

subgraph group_game["Hunting and catching"]
  node_hunting["Hunt and catch<br/>[hunting.py]"]
end

subgraph group_progress["Trainer progress"]
  node_player_features["Profile and Pokédex<br/>[player.py]"]
  node_store["Store and sales<br/>[store.py]"]
end

subgraph group_support["Game data and display"]
  node_config["Game rules and paths<br/>[config.py]"]
  node_json_helpers["JSON and sprite helpers<br/>[utils.py]"]
  node_pokemon_data["Pokémon catalog<br/>[pokemon_data.json]"]
  node_sprites["Pokémon sprites"]
  node_saved_state[("Player and encounter saves<br/>[utils.py]")]
end

node_player(("Player"))

node_player -->|"runs"| node_commands
node_commands -->|"routes hunt/catch"| node_hunting
node_commands -->|"routes profile views"| node_player_features
node_commands -->|"routes store actions"| node_store
node_hunting -->|"reads rules"| node_config
node_hunting -->|"loads and saves"| node_json_helpers
node_hunting -->|"loads and updates"| node_player_features
node_hunting -->|"loads catalog"| node_pokemon_data
node_hunting -->|"reads and writes encounter"| node_saved_state
node_player_features -->|"reads save paths"| node_config
node_player_features -->|"loads and saves"| node_json_helpers
node_player_features -->|"reads and writes player data"| node_saved_state
node_store -->|"reads store rules"| node_config
node_store -->|"loads and saves"| node_json_helpers
node_store -->|"loads and saves player"| node_player_features
node_store -->|"reads and writes sales data"| node_saved_state
node_json_helpers -->|"gets sprite path"| node_config
node_json_helpers -->|"renders sprites"| node_sprites
node_player_features -->|"renders Pokédex sprites"| node_json_helpers

click node_commands "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/__main__.py"
click node_hunting "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/hunting.py"
click node_player_features "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/player.py"
click node_store "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/store.py"
click node_config "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/config.py"
click node_json_helpers "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/utils.py"
click node_pokemon_data "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/data/pokemon_data.json"
click node_sprites "https://github.com/ritikkumar27/pokecatch_cli_game/tree/main/pokecatch/sprites/pokemons"
click node_saved_state "https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/utils.py"

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_commands toneBlue
class node_hunting toneAmber
class node_player_features,node_store toneMint
class node_config,node_json_helpers,node_pokemon_data,node_sprites,node_saved_state toneRose
class node_player toneIndigo
```

## Components

### Command interface

- [CLI commands](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/__main__.py): `pokecatch/__main__.py`

### Hunting and catching

- [Hunt and catch](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/hunting.py): `pokecatch/core/hunting.py`

### Trainer progress

- [Profile and Pokédex](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/player.py): `pokecatch/core/player.py`
- [Store and sales](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/core/store.py): `pokecatch/core/store.py`

### Game data and display

- [Game rules and paths](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/config.py): `pokecatch/config.py`
- [JSON and sprite helpers](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/utils.py): `pokecatch/utils.py`
- [Pokémon catalog](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/data/pokemon_data.json): `pokecatch/data/pokemon_data.json`
- [Pokémon sprites](https://github.com/ritikkumar27/pokecatch_cli_game/tree/main/pokecatch/sprites/pokemons): `pokecatch/sprites/pokemons`
- [Player and encounter saves](https://github.com/ritikkumar27/pokecatch_cli_game/blob/main/pokecatch/utils.py): `pokecatch/utils.py`

### Other components

- **Player**

## Connections

- Player → CLI commands: runs (evidence: `Readme.md`)
- CLI commands → Hunt and catch: routes hunt/catch (evidence: `pokecatch/__main__.py`)
- CLI commands → Profile and Pokédex: routes profile views (evidence: `pokecatch/__main__.py`)
- CLI commands → Store and sales: routes store actions (evidence: `pokecatch/__main__.py`)
- Hunt and catch → Game rules and paths: reads rules (evidence: `pokecatch/core/hunting.py`)
- Hunt and catch → JSON and sprite helpers: loads and saves (evidence: `pokecatch/core/hunting.py`)
- Hunt and catch → Profile and Pokédex: loads and updates (evidence: `pokecatch/core/hunting.py`)
- Hunt and catch → Pokémon catalog: loads catalog (evidence: `pokecatch/core/hunting.py`)
- Hunt and catch → Player and encounter saves: reads and writes encounter (evidence: `pokecatch/core/hunting.py`)
- Profile and Pokédex → Game rules and paths: reads save paths (evidence: `pokecatch/core/player.py`)
- Profile and Pokédex → JSON and sprite helpers: loads and saves (evidence: `pokecatch/core/player.py`)
- Profile and Pokédex → Player and encounter saves: reads and writes player data (evidence: `pokecatch/core/player.py`)
- Store and sales → Game rules and paths: reads store rules (evidence: `pokecatch/core/store.py`)
- Store and sales → JSON and sprite helpers: loads and saves (evidence: `pokecatch/core/store.py`)
- Store and sales → Profile and Pokédex: loads and saves player (evidence: `pokecatch/core/store.py`)
- Store and sales → Player and encounter saves: reads and writes sales data (evidence: `pokecatch/core/store.py`)
- JSON and sprite helpers → Game rules and paths: gets sprite path (evidence: `pokecatch/utils.py`)
- JSON and sprite helpers → Pokémon sprites: renders sprites (evidence: `pokecatch/utils.py`)
- Profile and Pokédex → JSON and sprite helpers: renders Pokédex sprites (evidence: `pokecatch/core/player.py`)
