How sz-daniel/tarkony-react-frontend works
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: FetchCalls.ts Fetch hooks · AppRoutes.tsx Route dispatch · itemsQuery.ts Listing and detail queries · Items.tsx Items page
Components 28
App and navigation
- App shell
src/App.tsx - Route dispatch
src/routes/AppRoutes.tsx - Page layout
src/components/layout/Layout.tsx - Maintenance view
src/components/Maintenance/Maintenance.tsx
Browsing and item views
- Items page
src/pages/Items.tsx - Category selection
src/components/Items/CategoryMenu.tsx - Item listing
src/components/Items/ItemList.tsx - Expanded item detail
src/components/Items/ItemDetail.tsx - Detail tabs
src/components/Items/Tabs.tsx - Trade combinations
src/components/ui/Combination.tsx - Item detail page
src/pages/ItemSingle.tsx
Data access and shaping
- Fetch hooks
src/hooks/FetchCalls.ts - Fetch and cache
src/api/clients/fetch.ts - REST client
src/api/clients/rest.ts - GraphQL client
src/api/clients/graphql.ts - Listing and detail queries
src/api/queries/itemsQuery.ts - Single-item query
src/api/queries/itemSingleQuery.ts - DTO adapters
src/api/adapters/adapters.ts - Items adapter
src/api/adapters/itemsAdapter.ts - Single-item adapter
src/api/adapters/itemSingleAdapter.ts - Listing data types
src/api/types/Items/queryType.ts - Listing display types
src/api/types/Items/responseType.ts - Single-item data types
src/api/types/ItemSingle/queryType.ts - Single-item display types
src/api/types/ItemSingle/responseType.ts
Market history
- Bitcoin history page
src/pages/Bitcoin.tsx - Bitcoin query
src/api/queries/bitcoinQuery.ts - Price history chart
src/components/recharts/PriceHistoryChart.tsx
Other components
- Visitor
Connections 36
- Visitor → App shell: opens
src/App.tsx - App shell → Route dispatch: renders
src/App.tsx - Route dispatch → Page layout: wraps routes
src/routes/AppRoutes.tsx - Route dispatch → Items page: routes to
src/routes/AppRoutes.tsx - Route dispatch → Maintenance view: routes detail to
src/routes/AppRoutes.tsx - Route dispatch → Maintenance view: routes Bitcoin to
src/routes/AppRoutes.tsx - Items page → Category selection: renders
src/pages/Items.tsx - Items page → Item listing: renders
src/pages/Items.tsx - Items page → Fetch hooks: loads data
src/pages/Items.tsx - Category selection → Listing and detail queries: uses category query
src/components/Items/CategoryMenu.tsx - Item listing → Expanded item detail: expands item
src/components/Items/ItemList.tsx - Item listing → Listing and detail queries: uses item query
src/components/Items/ItemList.tsx - Expanded item detail → Fetch hooks: loads detail
src/components/Items/ItemDetail.tsx - Expanded item detail → Detail tabs: uses
src/components/Items/ItemDetail.tsx - Expanded item detail → Trade combinations: renders
src/components/Items/ItemDetail.tsx - Item detail page → Fetch hooks: loads item
src/hooks/FetchCalls.ts - Item detail page → Price history chart: renders history
src/pages/ItemSingle.tsx - Fetch hooks → Fetch and cache: calls
src/hooks/FetchCalls.ts - Fetch hooks → Listing and detail queries: configures
src/hooks/FetchCalls.ts - Fetch hooks → Single-item query: configures
src/hooks/FetchCalls.ts - Fetch hooks → Bitcoin query: configures
src/hooks/FetchCalls.ts - Fetch hooks → Items adapter: passes adapter
src/hooks/FetchCalls.ts - Fetch hooks → Single-item adapter: passes adapter
src/hooks/FetchCalls.ts - Fetch and cache → REST client: uses
src/api/clients/fetch.ts - Fetch and cache → GraphQL client: uses
src/api/clients/fetch.ts - Items adapter → DTO adapters: uses helpers
src/api/adapters/itemsAdapter.ts - Single-item adapter → DTO adapters: uses helpers
src/api/adapters/itemSingleAdapter.ts - Listing and detail queries → Listing data types: defines query data
src/api/queries/itemsQuery.ts - Items adapter → Listing data types: adapts
src/api/adapters/itemsAdapter.ts - Items adapter → Listing display types: produces
src/api/adapters/itemsAdapter.ts - Single-item query → Single-item data types: defines query data
src/api/queries/itemSingleQuery.ts - Single-item adapter → Single-item data types: adapts
src/api/adapters/itemSingleAdapter.ts - Single-item adapter → Single-item display types: produces
src/api/adapters/itemSingleAdapter.ts - Bitcoin history page → Fetch hooks: loads history
src/pages/Bitcoin.tsx - Bitcoin history page → Price history chart: renders history
src/pages/Bitcoin.tsx - Trade combinations → Listing and detail queries: reads query cache
src/components/ui/Combination.tsx