# crescentschaos/pokemon-champions-guide architecture

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

- Interactive diagram: https://gitdiagram.com/crescentschaos/pokemon-champions-guide
- Repository: https://github.com/crescentschaos/pokemon-champions-guide

## Overview

Pokémon Champions Guide is a static competitive-play resource: players browse reference data, inspect teams and builds, compare Pokémon, and calculate battle outcomes. The visible navigation establishes the main site’s links to its feature pages; sampled code shows the move dex loading move and Pokémon data and the calculator consulting battle move logic. Team analysis, opponent tools, and team-building are represented as distinct product capabilities, but their runtime wiring was not established by the excerpts.

Main entry points: [`js/main.js`](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/main.js) (Site Shell), [`js/dex/movedex.js`](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/movedex.js) (Move Dex), [`calc/app.js`](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/calc/app.js) (Damage Calculator), [`js/dex-shared.js`](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex-shared.js) (Dex Shared UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site Navigation"]
  node_main["Site Shell<br/>[main.js]"]
  node_home["Home<br/>[index.html]"]
end

subgraph group_reference["Pokémon Reference"]
  node_pokedex["Pokédex<br/>[pokedex.js]"]
  node_movedex["Move Dex<br/>[movedex.js]"]
  node_abilitydex["Ability Dex<br/>[abilitydex.js]"]
  node_itemdex["Item Dex<br/>[itemdex.js]"]
  node_dexshared["Dex Shared UI<br/>[dex-shared.js]"]
  node_pokemondata[("Pokémon Data<br/>[pokemon.json]")]
  node_movedata[("Move Data<br/>[moves.json]")]
end

subgraph group_team["Team Tools"]
  node_teamtools["Team Builder<br/>[index.html]"]
  node_builds["Build Library<br/>[index.html]"]
  node_buildnarrative["Build Strategy<br/>[build-narrative.js]"]
  node_analysis["Team Analysis<br/>[analysis.js]"]
  node_compare["Team Compare<br/>[app.js]"]
  node_opponent["Opponent Tools"]
  node_counter["Counter Tool<br/>[index.html]"]
end

subgraph group_battle["Battle Analysis"]
  node_calculator["Damage Calculator<br/>[app.js]"]
  node_moveindex["Move Index<br/>[move-index.js]"]
  node_movepower["Move Resolution<br/>[move-power.js]"]
  node_damagecore["Damage Engine<br/>[damage-core.js]"]
  node_field["Field Effects<br/>[field-effects.js]"]
  node_ko["KO Chance<br/>[ko-chance.js]"]
end

node_player(("Player"))

node_player -->|"opens"| node_main
node_main -->|"links to"| node_home
node_main -->|"links to"| node_teamtools
node_main -->|"links to"| node_builds
node_main -->|"links to"| node_calculator
node_main -->|"links to"| node_compare
node_main -->|"links to"| node_counter
node_movedex -->|"uses"| node_dexshared
node_pokedex -->|"uses"| node_dexshared
node_movedex -->|"fetches"| node_movedata
node_movedex -->|"fetches"| node_pokemondata
node_calculator -->|"looks up moves"| node_moveindex
node_calculator -->|"resolves move type"| node_movepower
node_damagecore -->|"looks up moves"| node_moveindex

click node_main "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/main.js"
click node_home "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/index.html"
click node_pokedex "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/pokedex.js"
click node_movedex "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/movedex.js"
click node_abilitydex "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/abilitydex.js"
click node_itemdex "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/itemdex.js"
click node_dexshared "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex-shared.js"
click node_pokemondata "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/assets/pokemon.json"
click node_movedata "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/assets/moves.json"
click node_teamtools "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/teambuilder/index.html"
click node_builds "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/builds/index.html"
click node_buildnarrative "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/build-narrative.js"
click node_analysis "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/analysis.js"
click node_compare "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/compare/app.js"
click node_opponent "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/opponent-analysis.js"
click node_counter "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/counter/index.html"
click node_calculator "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/calc/app.js"
click node_moveindex "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/move-index.js"
click node_movepower "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/move-power.js"
click node_damagecore "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/damage-core.js"
click node_field "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/field-effects.js"
click node_ko "https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/ko-chance.js"

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_main,node_home toneBlue
class node_pokedex,node_movedex,node_abilitydex,node_itemdex,node_dexshared,node_pokemondata,node_movedata toneAmber
class node_teamtools,node_builds,node_buildnarrative,node_analysis,node_compare,node_opponent,node_counter toneMint
class node_calculator,node_moveindex,node_movepower,node_damagecore,node_field,node_ko toneRose
class node_player toneIndigo
```

## Components

### Site Navigation

- [Site Shell](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/main.js): `js/main.js`
- [Home](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/index.html): `index.html`

### Pokémon Reference

- [Pokédex](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/pokedex.js): `js/dex/pokedex.js`
- [Move Dex](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/movedex.js): `js/dex/movedex.js`
- [Ability Dex](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/abilitydex.js): `js/dex/abilitydex.js`
- [Item Dex](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex/itemdex.js): `js/dex/itemdex.js`
- [Dex Shared UI](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/dex-shared.js): `js/dex-shared.js`
- [Pokémon Data](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/assets/pokemon.json): `assets/pokemon.json`
- [Move Data](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/assets/moves.json): `assets/moves.json`

### Team Tools

- [Team Builder](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/teambuilder/index.html): `teambuilder/index.html`
- [Build Library](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/builds/index.html): `builds/index.html`
- [Build Strategy](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/build-narrative.js): `js/build-narrative.js`
- [Team Analysis](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/analysis.js): `js/analysis.js`
- [Team Compare](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/compare/app.js): `compare/app.js`
- [Opponent Tools](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/opponent-analysis.js): `js/opponent-analysis.js`
- [Counter Tool](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/counter/index.html): `counter/index.html`

### Battle Analysis

- [Damage Calculator](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/calc/app.js): `calc/app.js`
- [Move Index](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/move-index.js): `js/battle/move-index.js`
- [Move Resolution](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/move-power.js): `js/battle/move-power.js`
- [Damage Engine](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/damage-core.js): `js/battle/damage-core.js`
- [Field Effects](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/field-effects.js): `js/battle/field-effects.js`
- [KO Chance](https://github.com/crescentschaos/pokemon-champions-guide/blob/main/js/battle/ko-chance.js): `js/battle/ko-chance.js`

### Other components

- **Player**

## Connections

- Player → Site Shell: opens (evidence: `js/main.js`)
- Site Shell → Home: links to (evidence: `js/main.js`)
- Site Shell → Team Builder: links to (evidence: `js/main.js`)
- Site Shell → Build Library: links to (evidence: `js/main.js`)
- Site Shell → Damage Calculator: links to (evidence: `js/main.js`)
- Site Shell → Team Compare: links to (evidence: `js/main.js`)
- Site Shell → Counter Tool: links to (evidence: `js/main.js`)
- Move Dex → Dex Shared UI: uses (evidence: `js/dex/movedex.js`)
- Pokédex → Dex Shared UI: uses (evidence: `js/dex/pokedex.js`)
- Move Dex → Move Data: fetches (evidence: `js/dex/movedex.js`)
- Move Dex → Pokémon Data: fetches (evidence: `js/dex/movedex.js`)
- Damage Calculator → Move Index: looks up moves (evidence: `calc/app.js`)
- Damage Calculator → Move Resolution: resolves move type (evidence: `calc/app.js`)
- Damage Engine → Move Index: looks up moves (evidence: `js/battle/damage-core.js`)
