# sz-daniel/tarkony-react-frontend architecture

> Architecture diagram of the GitHub repository sz-daniel/tarkony-react-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sz-daniel/tarkony-react-frontend
- Repository: https://github.com/sz-daniel/tarkony-react-frontend

## Overview

Tarkony is a React frontend for browsing video-game item listings, trading and crafting details, and price history. The intended user flow is item browsing, category selection, then item-detail inspection; the README also describes a Bitcoin history view. Queries and fetch hooks obtain API data, adapters shape it for display, and page/components render it. Important evidence limit: the sampled router currently sends item-detail and Bitcoin routes to a maintenance page, despite those pages and capabilities being present in the repository. The README documents REST-first retrieval with GraphQL fallback; no persistence store is shown.

Main entry points: [`src/hooks/FetchCalls.ts`](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/hooks/FetchCalls.ts) (Fetch hooks), [`src/routes/AppRoutes.tsx`](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/routes/AppRoutes.tsx) (Route dispatch), [`src/api/queries/itemsQuery.ts`](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/itemsQuery.ts) (Listing and detail queries), [`src/pages/Items.tsx`](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/Items.tsx) (Items page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_app["App shell<br/>[App.tsx]"]
  node_routes["Route dispatch<br/>[AppRoutes.tsx]"]
  node_layout["Page layout<br/>[Layout.tsx]"]
  node_maintenance["Maintenance view<br/>[Maintenance.tsx]"]
end

subgraph group_experience["Browsing and item views"]
  node_items_page["Items page<br/>[Items.tsx]"]
  node_category_menu["Category selection<br/>[CategoryMenu.tsx]"]
  node_item_list["Item listing<br/>[ItemList.tsx]"]
  node_item_detail["Expanded item detail<br/>[ItemDetail.tsx]"]
  node_tabs["Detail tabs<br/>[Tabs.tsx]"]
  node_combination["Trade combinations<br/>[Combination.tsx]"]
  node_item_single_page["Item detail page<br/>[ItemSingle.tsx]"]
end

subgraph group_data["Data access and shaping"]
  node_fetch_hooks["Fetch hooks<br/>[FetchCalls.ts]"]
  node_fetch_cache["Fetch and cache<br/>[fetch.ts]"]
  node_rest_client["REST client<br/>[rest.ts]"]
  node_graphql_client["GraphQL client<br/>[graphql.ts]"]
  node_items_queries["Listing and detail queries<br/>[itemsQuery.ts]"]
  node_single_query["Single-item query<br/>[itemSingleQuery.ts]"]
  node_adapters["DTO adapters<br/>[adapters.ts]"]
  node_items_adapter["Items adapter<br/>[itemsAdapter.ts]"]
  node_single_adapter["Single-item adapter"]
  node_items_types["Listing data types<br/>[queryType.ts]"]
  node_items_response["Listing display types<br/>[responseType.ts]"]
  node_single_types["Single-item data types<br/>[queryType.ts]"]
  node_single_response["Single-item display types<br/>[responseType.ts]"]
end

subgraph group_market["Market history"]
  node_bitcoin_page["Bitcoin history page<br/>[Bitcoin.tsx]"]
  node_bitcoin_query["Bitcoin query<br/>[bitcoinQuery.ts]"]
  node_price_chart["Price history chart"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"wraps routes"| node_layout
node_routes -->|"routes to"| node_items_page
node_routes -->|"routes detail to"| node_maintenance
node_routes -->|"routes Bitcoin to"| node_maintenance
node_items_page -->|"renders"| node_category_menu
node_items_page -->|"renders"| node_item_list
node_items_page -->|"loads data"| node_fetch_hooks
node_category_menu -->|"uses category query"| node_items_queries
node_item_list -->|"expands item"| node_item_detail
node_item_list -->|"uses item query"| node_items_queries
node_item_detail -->|"loads detail"| node_fetch_hooks
node_item_detail -->|"uses"| node_tabs
node_item_detail -->|"renders"| node_combination
node_item_single_page -->|"loads item"| node_fetch_hooks
node_item_single_page -->|"renders history"| node_price_chart
node_fetch_hooks -->|"calls"| node_fetch_cache
node_fetch_hooks -->|"configures"| node_items_queries
node_fetch_hooks -->|"configures"| node_single_query
node_fetch_hooks -->|"configures"| node_bitcoin_query
node_fetch_hooks -->|"passes adapter"| node_items_adapter
node_fetch_hooks -->|"passes adapter"| node_single_adapter
node_fetch_cache -->|"uses"| node_rest_client
node_fetch_cache -->|"uses"| node_graphql_client
node_items_adapter -->|"uses helpers"| node_adapters
node_single_adapter -->|"uses helpers"| node_adapters
node_items_queries -->|"defines query data"| node_items_types
node_items_adapter -->|"adapts"| node_items_types
node_items_adapter -->|"produces"| node_items_response
node_single_query -->|"defines query data"| node_single_types
node_single_adapter -->|"adapts"| node_single_types
node_single_adapter -->|"produces"| node_single_response
node_bitcoin_page -->|"loads history"| node_fetch_hooks
node_bitcoin_page -->|"renders history"| node_price_chart
node_combination -->|"reads query cache"| node_items_queries

click node_app "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/App.tsx"
click node_routes "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/routes/AppRoutes.tsx"
click node_layout "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/layout/Layout.tsx"
click node_maintenance "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Maintenance/Maintenance.tsx"
click node_items_page "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/Items.tsx"
click node_category_menu "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/CategoryMenu.tsx"
click node_item_list "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/ItemList.tsx"
click node_item_detail "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/ItemDetail.tsx"
click node_tabs "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/Tabs.tsx"
click node_combination "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/ui/Combination.tsx"
click node_item_single_page "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/ItemSingle.tsx"
click node_fetch_hooks "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/hooks/FetchCalls.ts"
click node_fetch_cache "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/fetch.ts"
click node_rest_client "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/rest.ts"
click node_graphql_client "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/graphql.ts"
click node_items_queries "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/itemsQuery.ts"
click node_single_query "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/itemSingleQuery.ts"
click node_adapters "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/adapters.ts"
click node_items_adapter "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/itemsAdapter.ts"
click node_single_adapter "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/itemSingleAdapter.ts"
click node_items_types "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/Items/queryType.ts"
click node_items_response "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/Items/responseType.ts"
click node_single_types "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/ItemSingle/queryType.ts"
click node_single_response "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/ItemSingle/responseType.ts"
click node_bitcoin_page "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/Bitcoin.tsx"
click node_bitcoin_query "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/bitcoinQuery.ts"
click node_price_chart "https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/recharts/PriceHistoryChart.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_routes,node_layout,node_maintenance toneBlue
class node_items_page,node_category_menu,node_item_list,node_item_detail,node_tabs,node_combination,node_item_single_page toneAmber
class node_fetch_hooks,node_fetch_cache,node_rest_client,node_graphql_client,node_items_queries,node_single_query,node_adapters,node_items_adapter,node_single_adapter,node_items_types,node_items_response,node_single_types,node_single_response toneMint
class node_bitcoin_page,node_bitcoin_query,node_price_chart toneRose
class node_visitor toneIndigo
```

## Components

### App and navigation

- [App shell](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Route dispatch](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/routes/AppRoutes.tsx): `src/routes/AppRoutes.tsx`
- [Page layout](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`
- [Maintenance view](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Maintenance/Maintenance.tsx): `src/components/Maintenance/Maintenance.tsx`

### Browsing and item views

- [Items page](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/Items.tsx): `src/pages/Items.tsx`
- [Category selection](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/CategoryMenu.tsx): `src/components/Items/CategoryMenu.tsx`
- [Item listing](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/ItemList.tsx): `src/components/Items/ItemList.tsx`
- [Expanded item detail](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/ItemDetail.tsx): `src/components/Items/ItemDetail.tsx`
- [Detail tabs](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/Items/Tabs.tsx): `src/components/Items/Tabs.tsx`
- [Trade combinations](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/ui/Combination.tsx): `src/components/ui/Combination.tsx`
- [Item detail page](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/ItemSingle.tsx): `src/pages/ItemSingle.tsx`

### Data access and shaping

- [Fetch hooks](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/hooks/FetchCalls.ts): `src/hooks/FetchCalls.ts`
- [Fetch and cache](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/fetch.ts): `src/api/clients/fetch.ts`
- [REST client](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/rest.ts): `src/api/clients/rest.ts`
- [GraphQL client](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/clients/graphql.ts): `src/api/clients/graphql.ts`
- [Listing and detail queries](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/itemsQuery.ts): `src/api/queries/itemsQuery.ts`
- [Single-item query](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/itemSingleQuery.ts): `src/api/queries/itemSingleQuery.ts`
- [DTO adapters](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/adapters.ts): `src/api/adapters/adapters.ts`
- [Items adapter](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/itemsAdapter.ts): `src/api/adapters/itemsAdapter.ts`
- [Single-item adapter](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/adapters/itemSingleAdapter.ts): `src/api/adapters/itemSingleAdapter.ts`
- [Listing data types](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/Items/queryType.ts): `src/api/types/Items/queryType.ts`
- [Listing display types](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/Items/responseType.ts): `src/api/types/Items/responseType.ts`
- [Single-item data types](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/ItemSingle/queryType.ts): `src/api/types/ItemSingle/queryType.ts`
- [Single-item display types](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/types/ItemSingle/responseType.ts): `src/api/types/ItemSingle/responseType.ts`

### Market history

- [Bitcoin history page](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/pages/Bitcoin.tsx): `src/pages/Bitcoin.tsx`
- [Bitcoin query](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/api/queries/bitcoinQuery.ts): `src/api/queries/bitcoinQuery.ts`
- [Price history chart](https://github.com/sz-daniel/tarkony-react-frontend/blob/main/src/components/recharts/PriceHistoryChart.tsx): `src/components/recharts/PriceHistoryChart.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → App shell: opens (evidence: `src/App.tsx`)
- App shell → Route dispatch: renders (evidence: `src/App.tsx`)
- Route dispatch → Page layout: wraps routes (evidence: `src/routes/AppRoutes.tsx`)
- Route dispatch → Items page: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Route dispatch → Maintenance view: routes detail to (evidence: `src/routes/AppRoutes.tsx`)
- Route dispatch → Maintenance view: routes Bitcoin to (evidence: `src/routes/AppRoutes.tsx`)
- Items page → Category selection: renders (evidence: `src/pages/Items.tsx`)
- Items page → Item listing: renders (evidence: `src/pages/Items.tsx`)
- Items page → Fetch hooks: loads data (evidence: `src/pages/Items.tsx`)
- Category selection → Listing and detail queries: uses category query (evidence: `src/components/Items/CategoryMenu.tsx`)
- Item listing → Expanded item detail: expands item (evidence: `src/components/Items/ItemList.tsx`)
- Item listing → Listing and detail queries: uses item query (evidence: `src/components/Items/ItemList.tsx`)
- Expanded item detail → Fetch hooks: loads detail (evidence: `src/components/Items/ItemDetail.tsx`)
- Expanded item detail → Detail tabs: uses (evidence: `src/components/Items/ItemDetail.tsx`)
- Expanded item detail → Trade combinations: renders (evidence: `src/components/Items/ItemDetail.tsx`)
- Item detail page → Fetch hooks: loads item (evidence: `src/hooks/FetchCalls.ts`)
- Item detail page → Price history chart: renders history (evidence: `src/pages/ItemSingle.tsx`)
- Fetch hooks → Fetch and cache: calls (evidence: `src/hooks/FetchCalls.ts`)
- Fetch hooks → Listing and detail queries: configures (evidence: `src/hooks/FetchCalls.ts`)
- Fetch hooks → Single-item query: configures (evidence: `src/hooks/FetchCalls.ts`)
- Fetch hooks → Bitcoin query: configures (evidence: `src/hooks/FetchCalls.ts`)
- Fetch hooks → Items adapter: passes adapter (evidence: `src/hooks/FetchCalls.ts`)
- Fetch hooks → Single-item adapter: passes adapter (evidence: `src/hooks/FetchCalls.ts`)
- Fetch and cache → REST client: uses (evidence: `src/api/clients/fetch.ts`)
- Fetch and cache → GraphQL client: uses (evidence: `src/api/clients/fetch.ts`)
- Items adapter → DTO adapters: uses helpers (evidence: `src/api/adapters/itemsAdapter.ts`)
- Single-item adapter → DTO adapters: uses helpers (evidence: `src/api/adapters/itemSingleAdapter.ts`)
- Listing and detail queries → Listing data types: defines query data (evidence: `src/api/queries/itemsQuery.ts`)
- Items adapter → Listing data types: adapts (evidence: `src/api/adapters/itemsAdapter.ts`)
- Items adapter → Listing display types: produces (evidence: `src/api/adapters/itemsAdapter.ts`)
- Single-item query → Single-item data types: defines query data (evidence: `src/api/queries/itemSingleQuery.ts`)
- Single-item adapter → Single-item data types: adapts (evidence: `src/api/adapters/itemSingleAdapter.ts`)
- Single-item adapter → Single-item display types: produces (evidence: `src/api/adapters/itemSingleAdapter.ts`)
- Bitcoin history page → Fetch hooks: loads history (evidence: `src/pages/Bitcoin.tsx`)
- Bitcoin history page → Price history chart: renders history (evidence: `src/pages/Bitcoin.tsx`)
- Trade combinations → Listing and detail queries: reads query cache (evidence: `src/components/ui/Combination.tsx`)
