# fractylizer/igmgdb architecture

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

- Interactive diagram: https://gitdiagram.com/fractylizer/igmgdb
- Repository: https://github.com/fractylizer/igmgdb

## Overview

This is a static browser-based IGM game catalog. A visitor opens the site, and query parameters select the index, a game, an author, a tag, or a general page; the app renders catalog metadata and, where applicable, loads accompanying text files. The data covers games, authors, tags, and pages, while the interface also supports theme preferences and random navigation. The excerpts establish routing, rendering, content fetches, and theme storage; they do not show how the HTML loads the scripts or data.

Main entry points: [`script.js`](https://github.com/fractylizer/igmgdb/blob/main/script.js) (Query router), [`data.js`](https://github.com/fractylizer/igmgdb/blob/main/data.js) (Game metadata), [`games`](https://github.com/fractylizer/igmgdb/tree/main/games) (Game descriptions), [`authors`](https://github.com/fractylizer/igmgdb/tree/main/authors) (Author descriptions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Browser application"]
  node_router["Query router<br/>[script.js]"]
  node_catalog_views["Catalog views<br/>[script.js]"]
  node_game_view["Game detail<br/>[script.js]"]
  node_author_view["Author detail<br/>[script.js]"]
  node_tag_page["Tag listing<br/>[script.js]"]
  node_general_pages["General pages<br/>[script.js]"]
  node_theme["Theme preferences<br/>[script.js]"]
end

subgraph group_catalog["Catalog data"]
  node_game_data["Game metadata<br/>[data.js]"]
  node_author_data["Author metadata<br/>[data.js]"]
  node_tag_data["Tag metadata<br/>[data.js]"]
  node_page_data["Page identifiers<br/>[data.js]"]
end

subgraph group_content["Static descriptions"]
  node_game_text["Game descriptions"]
  node_author_text["Author descriptions"]
  node_page_text["Page content"]
end

node_visitor(("Visitor"))
node_browser_storage[("Local storage")]

node_visitor -->|"selects route"| node_router
node_router -->|"dispatches to"| node_catalog_views
node_router -->|"dispatches to"| node_game_view
node_router -->|"dispatches to"| node_author_view
node_router -->|"dispatches to"| node_tag_page
node_router -->|"dispatches to"| node_general_pages
node_catalog_views -->|"reads"| node_game_data
node_catalog_views -->|"reads"| node_author_data
node_game_view -->|"reads"| node_game_data
node_game_view -->|"reads"| node_author_data
node_game_view -->|"fetches"| node_game_text
node_author_view -->|"reads"| node_author_data
node_author_view -->|"filters"| node_game_data
node_author_view -->|"fetches"| node_author_text
node_tag_page -->|"reads"| node_tag_data
node_tag_page -->|"filters"| node_game_data
node_general_pages -->|"lists"| node_game_data
node_general_pages -->|"lists"| node_author_data
node_general_pages -->|"checks"| node_page_data
node_general_pages -->|"fetches"| node_page_text
node_theme -->|"reads"| node_browser_storage
node_theme -->|"writes"| node_browser_storage

click node_router "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_catalog_views "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_game_view "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_author_view "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_tag_page "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_general_pages "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_theme "https://github.com/fractylizer/igmgdb/blob/main/script.js"
click node_game_data "https://github.com/fractylizer/igmgdb/blob/main/data.js"
click node_author_data "https://github.com/fractylizer/igmgdb/blob/main/data.js"
click node_tag_data "https://github.com/fractylizer/igmgdb/blob/main/data.js"
click node_page_data "https://github.com/fractylizer/igmgdb/blob/main/data.js"
click node_game_text "https://github.com/fractylizer/igmgdb/tree/main/games"
click node_author_text "https://github.com/fractylizer/igmgdb/tree/main/authors"
click node_page_text "https://github.com/fractylizer/igmgdb/tree/main/pages"

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_router,node_catalog_views,node_game_view,node_author_view,node_tag_page,node_general_pages,node_theme toneBlue
class node_game_data,node_author_data,node_tag_data,node_page_data,node_browser_storage toneAmber
class node_game_text,node_author_text,node_page_text toneMint
class node_visitor toneIndigo
```

## Components

### Browser application

- [Query router](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [Catalog views](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [Game detail](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [Author detail](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [Tag listing](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [General pages](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`
- [Theme preferences](https://github.com/fractylizer/igmgdb/blob/main/script.js): `script.js`

### Catalog data

- [Game metadata](https://github.com/fractylizer/igmgdb/blob/main/data.js): `data.js`
- [Author metadata](https://github.com/fractylizer/igmgdb/blob/main/data.js): `data.js`
- [Tag metadata](https://github.com/fractylizer/igmgdb/blob/main/data.js): `data.js`
- [Page identifiers](https://github.com/fractylizer/igmgdb/blob/main/data.js): `data.js`

### Static descriptions

- [Game descriptions](https://github.com/fractylizer/igmgdb/tree/main/games): `games`
- [Author descriptions](https://github.com/fractylizer/igmgdb/tree/main/authors): `authors`
- [Page content](https://github.com/fractylizer/igmgdb/tree/main/pages): `pages`

### Other components

- **Visitor**
- **Local storage**

## Connections

- Visitor → Query router: selects route (evidence: `script.js`)
- Query router → Catalog views: dispatches to (evidence: `script.js`)
- Query router → Game detail: dispatches to (evidence: `script.js`)
- Query router → Author detail: dispatches to (evidence: `script.js`)
- Query router → Tag listing: dispatches to (evidence: `script.js`)
- Query router → General pages: dispatches to (evidence: `script.js`)
- Catalog views → Game metadata: reads (evidence: `script.js`)
- Catalog views → Author metadata: reads (evidence: `script.js`)
- Game detail → Game metadata: reads (evidence: `script.js`)
- Game detail → Author metadata: reads (evidence: `script.js`)
- Game detail → Game descriptions: fetches (evidence: `script.js`)
- Author detail → Author metadata: reads (evidence: `script.js`)
- Author detail → Game metadata: filters (evidence: `script.js`)
- Author detail → Author descriptions: fetches (evidence: `script.js`)
- Tag listing → Tag metadata: reads (evidence: `script.js`)
- Tag listing → Game metadata: filters (evidence: `script.js`)
- General pages → Game metadata: lists (evidence: `script.js`)
- General pages → Author metadata: lists (evidence: `script.js`)
- General pages → Page identifiers: checks (evidence: `script.js`)
- General pages → Page content: fetches (evidence: `script.js`)
- Theme preferences → Local storage: reads (evidence: `script.js`)
- Theme preferences → Local storage: writes (evidence: `script.js`)
