# alex-m-2013/mh-database architecture

> Architecture diagram of the GitHub repository alex-m-2013/mh-database, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alex-m-2013/mh-database
- Repository: https://github.com/alex-m-2013/mh-database
- Video tour (about a minute): https://gitdiagram.com/alex-m-2013/mh-database/video

## Overview

MH Database is a browser-based Monster Hunter reference for five game releases. Users navigate to a game, search or filter its monster cards, and open a monster detail page; the app also offers favourites, informational/settings pages, mobile-friendly navigation, and light/dark themes. The graph reflects documented routing and sampled component calls. The fetch implementation and several page/component bodies were not excerpted, so uncertain data and favourites wiring is omitted or marked unverified.

Main entry points: [`src/App.tsx`](https://github.com/alex-m-2013/mh-database/blob/master/src/App.tsx) (App routes), [`src/components/Main/Main.tsx`](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/Main.tsx) (Game listing), [`src/components/pages/MonsterPage.tsx`](https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/MonsterPage.tsx) (Monster detail), [`src/components/NavBar/NavBar.tsx`](https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/NavBar.tsx) (Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application navigation"]
  node_app["App routes<br/>[App.tsx]"]
  node_navigation["Navigation<br/>[NavBar.tsx]"]
  node_sidenav["Side navigation<br/>[Sidenav.tsx]"]
  node_about["About page<br/>[About.tsx]"]
end

subgraph group_browse["Monster browsing"]
  node_main["Game listing<br/>[Main.tsx]"]
  node_search["Monster search<br/>[SearchBar.tsx]"]
  node_filter["Weakness filter<br/>[Filter.tsx]"]
  node_cards["Monster cards<br/>[MonsterCards.tsx]"]
  node_card["Monster card<br/>[MonsterCard.tsx]"]
end

subgraph group_details["Monster details"]
  node_detail["Monster detail<br/>[MonsterPage.tsx]"]
  node_fetch["Monster fetch<br/>[fetchMonsters.ts]"]
  node_gamehelpers["Game data helpers<br/>[games.ts]"]
  node_types["Monster models<br/>[monsters.ts]"]
end

subgraph group_preferences["User preferences"]
  node_favourites["Favourites page<br/>[Favourites.tsx]"]
  node_favouritebutton["Favourite control"]
  node_theme["Theme switcher<br/>[ThemeSwitcher.tsx]"]
  node_settings["Settings page<br/>[Settings.tsx]"]
end

subgraph group_catalog["Monster catalog"]
  node_assets["Monster icons"]
  node_data["Game datasets"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_main
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_favourites
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_about
node_navigation -->|"renders"| node_sidenav
node_navigation -->|"renders"| node_theme
node_main -->|"renders"| node_search
node_main -->|"renders"| node_filter
node_main -->|"renders"| node_cards
node_cards -->|"uses"| node_card
node_detail -->|"loads monsters"| node_fetch
node_detail -->|"uses helpers"| node_gamehelpers
node_gamehelpers -->|"uses models"| node_types
node_detail -->|"loads icons"| node_assets
node_favourites -->|"uses"| node_favouritebutton
node_fetch -.->|"loads datasets"| node_data

click node_app "https://github.com/alex-m-2013/mh-database/blob/master/src/App.tsx"
click node_navigation "https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/NavBar.tsx"
click node_sidenav "https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/Sidenav/Sidenav.tsx"
click node_main "https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/Main.tsx"
click node_search "https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/SearchBar.tsx"
click node_filter "https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/Filter.tsx"
click node_cards "https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/MonsterCards.tsx"
click node_card "https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/MonsterCard.tsx"
click node_detail "https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/MonsterPage.tsx"
click node_fetch "https://github.com/alex-m-2013/mh-database/blob/master/src/utils/fetchMonsters.ts"
click node_gamehelpers "https://github.com/alex-m-2013/mh-database/blob/master/src/utils/games.ts"
click node_types "https://github.com/alex-m-2013/mh-database/blob/master/src/utils/monsters.ts"
click node_assets "https://github.com/alex-m-2013/mh-database/tree/master/public/assets/icons/Monsters"
click node_data "https://github.com/alex-m-2013/mh-database/tree/master/public/data"
click node_favourites "https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/Favourites.tsx"
click node_favouritebutton "https://github.com/alex-m-2013/mh-database/blob/master/src/components/FavouriteButton.tsx"
click node_theme "https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/ThemeSwitcher.tsx"
click node_settings "https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/Settings.tsx"
click node_about "https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/About.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_app,node_navigation,node_sidenav,node_about,node_user toneBlue
class node_main,node_search,node_filter,node_cards,node_card toneAmber
class node_detail,node_fetch,node_gamehelpers,node_types toneMint
class node_favourites,node_favouritebutton,node_theme,node_settings toneRose
class node_assets,node_data toneIndigo
```

## Components

### Application navigation

- [App routes](https://github.com/alex-m-2013/mh-database/blob/master/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/NavBar.tsx): `src/components/NavBar/NavBar.tsx`
- [Side navigation](https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/Sidenav/Sidenav.tsx): `src/components/NavBar/Sidenav/Sidenav.tsx`
- [About page](https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/About.tsx): `src/components/pages/About.tsx`

### Monster browsing

- [Game listing](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/Main.tsx): `src/components/Main/Main.tsx`
- [Monster search](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/SearchBar.tsx): `src/components/Main/SearchBar.tsx`
- [Weakness filter](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/Filter.tsx): `src/components/Main/Filter.tsx`
- [Monster cards](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/MonsterCards.tsx): `src/components/Main/MonsterCards.tsx`
- [Monster card](https://github.com/alex-m-2013/mh-database/blob/master/src/components/Main/MonsterCard.tsx): `src/components/Main/MonsterCard.tsx`

### Monster details

- [Monster detail](https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/MonsterPage.tsx): `src/components/pages/MonsterPage.tsx`
- [Monster fetch](https://github.com/alex-m-2013/mh-database/blob/master/src/utils/fetchMonsters.ts): `src/utils/fetchMonsters.ts`
- [Game data helpers](https://github.com/alex-m-2013/mh-database/blob/master/src/utils/games.ts): `src/utils/games.ts`
- [Monster models](https://github.com/alex-m-2013/mh-database/blob/master/src/utils/monsters.ts): `src/utils/monsters.ts`

### User preferences

- [Favourites page](https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/Favourites.tsx): `src/components/pages/Favourites.tsx`
- [Favourite control](https://github.com/alex-m-2013/mh-database/blob/master/src/components/FavouriteButton.tsx): `src/components/FavouriteButton.tsx`
- [Theme switcher](https://github.com/alex-m-2013/mh-database/blob/master/src/components/NavBar/ThemeSwitcher.tsx): `src/components/NavBar/ThemeSwitcher.tsx`
- [Settings page](https://github.com/alex-m-2013/mh-database/blob/master/src/components/pages/Settings.tsx): `src/components/pages/Settings.tsx`

### Monster catalog

- [Monster icons](https://github.com/alex-m-2013/mh-database/tree/master/public/assets/icons/Monsters): `public/assets/icons/Monsters`
- [Game datasets](https://github.com/alex-m-2013/mh-database/tree/master/public/data): `public/data`

### Other components

- **User**

## Connections

- User → App routes: opens (evidence: `README.md`)
- App routes → Navigation: renders (evidence: `src/App.tsx`)
- App routes → Game listing: routes to (evidence: `src/App.tsx`)
- App routes → Monster detail: routes to (evidence: `src/App.tsx`)
- App routes → Favourites page: routes to (evidence: `src/App.tsx`)
- App routes → Settings page: routes to (evidence: `src/App.tsx`)
- App routes → About page: routes to (evidence: `src/App.tsx`)
- Navigation → Side navigation: renders (evidence: `src/components/NavBar/NavBar.tsx`)
- Navigation → Theme switcher: renders (evidence: `src/components/NavBar/NavBar.tsx`)
- Game listing → Monster search: renders (evidence: `src/components/Main/Main.tsx`)
- Game listing → Weakness filter: renders (evidence: `src/components/Main/Main.tsx`)
- Game listing → Monster cards: renders (evidence: `src/components/Main/Main.tsx`)
- Monster cards → Monster card: uses (evidence: `src/components/Main/MonsterCards.tsx`)
- Monster detail → Monster fetch: loads monsters (evidence: `src/components/pages/MonsterPage.tsx`)
- Monster detail → Game data helpers: uses helpers (evidence: `src/components/pages/MonsterPage.tsx`)
- Game data helpers → Monster models: uses models (evidence: `src/utils/games.ts`)
- Monster detail → Monster icons: loads icons (evidence: `src/components/pages/MonsterPage.tsx`)
- Favourites page → Favourite control: uses (evidence: `src/components/pages/Favourites.tsx`)
- Monster fetch → Game datasets: loads datasets
