# erorus/shatari-front architecture

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

- Interactive diagram: https://gitdiagram.com/erorus/shatari-front
- Repository: https://github.com/erorus/shatari-front

## Overview

Undermine Exchange is a static World of Warcraft auction-pricing frontend. Users choose a realm and locale, search or browse items, then inspect auction prices and historical detail. The TypeScript frontend consumes JSON and binary data served as static files, while account status is fetched from a same-origin endpoint. The graph preserves the major indexed modules; some connections are omitted or marked unverified because the excerpts do not show their runtime calls.

Main entry points: [`src/ts/main.ts`](https://github.com/erorus/shatari-front/blob/master/src/ts/main.ts) (Frontend entry), [`src/ts/Items.ts`](https://github.com/erorus/shatari-front/blob/master/src/ts/Items.ts) (Item catalog), [`src/ts/Search.ts`](https://github.com/erorus/shatari-front/blob/master/src/ts/Search.ts) (Search and results), [`src/ts/Auctions.ts`](https://github.com/erorus/shatari-front/blob/master/src/ts/Auctions.ts) (Auction data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_main["Frontend entry<br/>[main.ts]"]
  node_search["Search and results<br/>[Search.ts]"]
  node_categories["Category browsing<br/>[Categories.ts]"]
  node_hash["URL state<br/>[Hash.ts]"]
  node_detail["Item detail<br/>[Detail.ts]"]
end

subgraph group_catalog["Realm and item data"]
  node_items["Item catalog<br/>[Items.ts]"]
  node_locales["Localization<br/>[Locales.ts]"]
  node_realms["Realm selection<br/>[Realms.ts]"]
  node_jsondata[("Static JSON data")]
end

subgraph group_pricing["Auction pricing"]
  node_auctions["Auction data<br/>[Auctions.ts]"]
  node_suggestions["Search suggestions<br/>[Suggestions.ts]"]
  node_progress["Fetch progress<br/>[Progress.ts]"]
  node_marketdata[("Market data files")]
end

subgraph group_support["Account and presentation"]
  node_account["Account status<br/>[Account.ts]"]
  node_migration["Oribos migration"]
  node_utils["UI utilities<br/>[utils.ts]"]
  node_types["Domain types<br/>[Types.ts]"]
end

node_user(("Site visitor"))
node_page["Main page<br/>[index.html]"]

node_user -->|"opens"| node_page
node_page -.->|"hosts"| node_main
node_main -.->|"initializes"| node_search
node_main -.->|"initializes"| node_categories
node_main -.->|"initializes"| node_hash
node_main -.->|"initializes"| node_detail
node_main -.->|"initializes"| node_items
node_main -.->|"initializes"| node_locales
node_main -.->|"initializes"| node_realms
node_main -.->|"initializes"| node_account
node_main -.->|"initializes"| node_migration
node_search -->|"uses item data"| node_items
node_search -->|"gets selected realm"| node_realms
node_search -->|"checks access"| node_account
node_search -->|"reads detail settings"| node_categories
node_hash -->|"encodes realm"| node_realms
node_hash -->|"encodes item"| node_items
node_hash -->|"hydrates item"| node_auctions
node_hash -->|"opens detail"| node_detail
node_categories -.->|"imports detail view"| node_detail
node_items -->|"registers locale callbacks"| node_locales
node_items -->|"fetches catalog data"| node_jsondata
node_realms -->|"reads locale names"| node_locales
node_realms -->|"fetches realm lists"| node_jsondata
node_locales -->|"fetches global strings"| node_jsondata
node_auctions -->|"builds item keys"| node_items
node_auctions -->|"fetches auction files"| node_progress
node_progress -.->|"requests data"| node_marketdata
node_detail -.->|"uses auction data"| node_auctions
node_suggestions -->|"uses item data"| node_items
node_suggestions -->|"uses auction data"| node_auctions
node_account -->|"fetches user status"| node_progress
node_account -->|"hides search"| node_search
node_account -->|"hides detail"| node_detail
node_migration -.->|"imports utilities"| node_utils
node_search -->|"renders results"| node_utils
node_detail -->|"renders charts"| node_utils
node_auctions -->|"updates timestamps"| node_utils
node_items -.->|"uses domain types"| node_types
node_auctions -->|"uses domain types"| node_types

click node_page "https://github.com/erorus/shatari-front/blob/master/index.html"
click node_main "https://github.com/erorus/shatari-front/blob/master/src/ts/main.ts"
click node_search "https://github.com/erorus/shatari-front/blob/master/src/ts/Search.ts"
click node_categories "https://github.com/erorus/shatari-front/blob/master/src/ts/Categories.ts"
click node_hash "https://github.com/erorus/shatari-front/blob/master/src/ts/Hash.ts"
click node_detail "https://github.com/erorus/shatari-front/blob/master/src/ts/Detail.ts"
click node_items "https://github.com/erorus/shatari-front/blob/master/src/ts/Items.ts"
click node_locales "https://github.com/erorus/shatari-front/blob/master/src/ts/Locales.ts"
click node_realms "https://github.com/erorus/shatari-front/blob/master/src/ts/Realms.ts"
click node_jsondata "https://github.com/erorus/shatari-front/tree/master/json"
click node_auctions "https://github.com/erorus/shatari-front/blob/master/src/ts/Auctions.ts"
click node_suggestions "https://github.com/erorus/shatari-front/blob/master/src/ts/Suggestions.ts"
click node_progress "https://github.com/erorus/shatari-front/blob/master/src/ts/Progress.ts"
click node_account "https://github.com/erorus/shatari-front/blob/master/src/ts/Account.ts"
click node_migration "https://github.com/erorus/shatari-front/blob/master/src/ts/UndermineMigration.ts"
click node_utils "https://github.com/erorus/shatari-front/blob/master/src/ts/utils.ts"
click node_types "https://github.com/erorus/shatari-front/blob/master/src/ts/Types.ts"

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_search,node_categories,node_hash,node_detail toneBlue
class node_items,node_locales,node_realms,node_jsondata toneAmber
class node_auctions,node_suggestions,node_progress,node_marketdata toneMint
class node_account,node_migration,node_utils,node_types toneRose
class node_user toneIndigo
class node_page toneTeal
```

## Components

### Application flow

- [Frontend entry](https://github.com/erorus/shatari-front/blob/master/src/ts/main.ts): `src/ts/main.ts`
- [Search and results](https://github.com/erorus/shatari-front/blob/master/src/ts/Search.ts): `src/ts/Search.ts`
- [Category browsing](https://github.com/erorus/shatari-front/blob/master/src/ts/Categories.ts): `src/ts/Categories.ts`
- [URL state](https://github.com/erorus/shatari-front/blob/master/src/ts/Hash.ts): `src/ts/Hash.ts`
- [Item detail](https://github.com/erorus/shatari-front/blob/master/src/ts/Detail.ts): `src/ts/Detail.ts`

### Realm and item data

- [Item catalog](https://github.com/erorus/shatari-front/blob/master/src/ts/Items.ts): `src/ts/Items.ts`
- [Localization](https://github.com/erorus/shatari-front/blob/master/src/ts/Locales.ts): `src/ts/Locales.ts`
- [Realm selection](https://github.com/erorus/shatari-front/blob/master/src/ts/Realms.ts): `src/ts/Realms.ts`
- [Static JSON data](https://github.com/erorus/shatari-front/tree/master/json): `json`

### Auction pricing

- [Auction data](https://github.com/erorus/shatari-front/blob/master/src/ts/Auctions.ts): `src/ts/Auctions.ts`
- [Search suggestions](https://github.com/erorus/shatari-front/blob/master/src/ts/Suggestions.ts): `src/ts/Suggestions.ts`
- [Fetch progress](https://github.com/erorus/shatari-front/blob/master/src/ts/Progress.ts): `src/ts/Progress.ts`
- **Market data files**

### Account and presentation

- [Account status](https://github.com/erorus/shatari-front/blob/master/src/ts/Account.ts): `src/ts/Account.ts`
- [Oribos migration](https://github.com/erorus/shatari-front/blob/master/src/ts/UndermineMigration.ts): `src/ts/UndermineMigration.ts`
- [UI utilities](https://github.com/erorus/shatari-front/blob/master/src/ts/utils.ts): `src/ts/utils.ts`
- [Domain types](https://github.com/erorus/shatari-front/blob/master/src/ts/Types.ts): `src/ts/Types.ts`

### Other components

- **Site visitor**
- [Main page](https://github.com/erorus/shatari-front/blob/master/index.html): `index.html`

## Connections

- Site visitor → Main page: opens (evidence: `README.md`)
- Main page → Frontend entry: hosts
- Frontend entry → Search and results: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Category browsing: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → URL state: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Item detail: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Item catalog: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Localization: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Realm selection: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Account status: initializes (evidence: `src/ts/main.ts`)
- Frontend entry → Oribos migration: initializes (evidence: `src/ts/main.ts`)
- Search and results → Item catalog: uses item data (evidence: `src/ts/Search.ts`)
- Search and results → Realm selection: gets selected realm (evidence: `src/ts/Search.ts`)
- Search and results → Account status: checks access (evidence: `src/ts/Search.ts`)
- Search and results → Category browsing: reads detail settings (evidence: `src/ts/Search.ts`)
- URL state → Realm selection: encodes realm (evidence: `src/ts/Hash.ts`)
- URL state → Item catalog: encodes item (evidence: `src/ts/Hash.ts`)
- URL state → Auction data: hydrates item (evidence: `src/ts/Hash.ts`)
- URL state → Item detail: opens detail (evidence: `src/ts/Hash.ts`)
- Category browsing → Item detail: imports detail view (evidence: `src/ts/Categories.ts`)
- Item catalog → Localization: registers locale callbacks (evidence: `src/ts/Items.ts`)
- Item catalog → Static JSON data: fetches catalog data (evidence: `src/ts/Items.ts`)
- Realm selection → Localization: reads locale names (evidence: `src/ts/Realms.ts`)
- Realm selection → Static JSON data: fetches realm lists (evidence: `src/ts/Realms.ts`)
- Localization → Static JSON data: fetches global strings (evidence: `src/ts/Locales.ts`)
- Auction data → Item catalog: builds item keys (evidence: `src/ts/Auctions.ts`)
- Auction data → Fetch progress: fetches auction files (evidence: `src/ts/Auctions.ts`)
- Fetch progress → Market data files: requests data
- Item detail → Auction data: uses auction data (evidence: `src/ts/Detail.ts`)
- Search suggestions → Item catalog: uses item data (evidence: `src/ts/Suggestions.ts`)
- Search suggestions → Auction data: uses auction data (evidence: `src/ts/Suggestions.ts`)
- Account status → Fetch progress: fetches user status (evidence: `src/ts/Account.ts`)
- Account status → Search and results: hides search (evidence: `src/ts/Account.ts`)
- Account status → Item detail: hides detail (evidence: `src/ts/Account.ts`)
- Oribos migration → UI utilities: imports utilities (evidence: `src/ts/UndermineMigration.ts`)
- Search and results → UI utilities: renders results (evidence: `src/ts/Search.ts`)
- Item detail → UI utilities: renders charts (evidence: `src/ts/Detail.ts`)
- Auction data → UI utilities: updates timestamps (evidence: `src/ts/Auctions.ts`)
- Item catalog → Domain types: uses domain types (evidence: `src/ts/Items.ts`)
- Auction data → Domain types: uses domain types (evidence: `src/ts/Auctions.ts`)
