# pravin8007/crypto-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/pravin8007/crypto-tracker
- Repository: https://github.com/pravin8007/crypto-tracker

## Overview

CryptoTracker is a React cryptocurrency tracker. Users can browse and search market listings, open a coin’s details and price chart, compare two coins, and view a watchlist; the dashboard also offers grid/list views and pagination. Coin lists, details, and chart data are fetched through API endpoints and cached in memory and local storage. The graph includes the documented routes and major UI branches, plus theme state and data helpers. Some components and API implementations were not excerpted, so their internal relationships are not inferred.

Main entry points: [`src/pages/ComparePage.jsx`](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/ComparePage.jsx) (Coin comparison), [`src/pages/CoinPage.jsx`](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/CoinPage.jsx) (Coin details page), [`src/App.jsx`](https://github.com/pravin8007/crypto-tracker/blob/main/src/App.jsx) (Route application), [`src/pages/DashboardPage.jsx`](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/DashboardPage.jsx) (Market dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_app["Route application<br/>[App.jsx]"]
  node_home["Landing page<br/>[Home.jsx]"]
  node_header["Site navigation<br/>[index.jsx]"]
  node_theme["Theme controls<br/>[ThemeContext.jsx]"]
end

subgraph group_discovery["Market discovery"]
  node_dashboard["Market dashboard<br/>[DashboardPage.jsx]"]
  node_search["Coin search<br/>[index.jsx]"]
  node_listing["Grid and list views<br/>[index.jsx]"]
  node_grid["Grid cards<br/>[index.jsx]"]
  node_list["Coin rows<br/>[index.jsx]"]
  node_pagination["Pagination<br/>[index.jsx]"]
  node_watchlist["Watchlist page<br/>[WatchList.jsx]"]
end

subgraph group_analysis["Coin analysis"]
  node_coinpage["Coin details page<br/>[CoinPage.jsx]"]
  node_compare["Coin comparison<br/>[ComparePage.jsx]"]
  node_coinselect["Comparison selection<br/>[index.jsx]"]
  node_chart["Price chart<br/>[index.jsx]"]
  node_coincontrols["Chart controls<br/>[index.jsx]"]
  node_pricecontrol["Price type control<br/>[index.jsx]"]
  node_coininfo["Coin description<br/>[index.jsx]"]
end

subgraph group_data["Data and preferences"]
  node_coinfetch["Coin detail fetch<br/>[getCoinData.js]"]
  node_marketfetch["Market list fetch<br/>[get100Coins.js]"]
  node_pricefetch["Price history fetch<br/>[getCoinPrices.js]"]
  node_chartprep["Chart data preparation"]
  node_cointransform["Coin data transform<br/>[convertObject.js]"]
  node_formatters["Date and number formatting<br/>[convertNumbers.js]"]
  node_watchstorage["Watchlist storage actions"]
  node_coinsapi["Coins endpoint<br/>[coins.js]"]
  node_detailsapi["Coin details endpoint<br/>[coin-details.js]"]
  node_marketapi["Market data endpoint<br/>[market-data.js]"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_coinpage
node_app -->|"routes to"| node_compare
node_app -->|"routes to"| node_watchlist
node_home -->|"renders"| node_header
node_dashboard -->|"renders"| node_header
node_coinpage -->|"renders"| node_header
node_compare -->|"renders"| node_header
node_dashboard -->|"fetches listings"| node_marketfetch
node_marketfetch -->|"requests"| node_coinsapi
node_dashboard -->|"renders"| node_search
node_dashboard -->|"renders"| node_listing
node_dashboard -->|"renders"| node_pagination
node_listing -->|"renders"| node_grid
node_listing -->|"renders"| node_list
node_grid -->|"updates watchlist"| node_watchstorage
node_list -->|"updates watchlist"| node_watchstorage
node_list -->|"formats values"| node_formatters
node_watchlist -->|"renders"| node_listing
node_coinpage -->|"loads details"| node_coinfetch
node_coinpage -->|"loads history"| node_pricefetch
node_coinpage -->|"prepares chart"| node_chartprep
node_coinpage -->|"transforms details"| node_cointransform
node_coinpage -->|"renders coin row"| node_list
node_coinpage -->|"renders chart"| node_chart
node_coinpage -->|"renders control"| node_coincontrols
node_coinpage -->|"renders control"| node_pricecontrol
node_coinpage -->|"renders description"| node_coininfo
node_compare -->|"renders selector"| node_coinselect
node_compare -->|"loads details"| node_coinfetch
node_compare -->|"loads histories"| node_pricefetch
node_compare -->|"prepares chart"| node_chartprep
node_compare -->|"transforms details"| node_cointransform
node_compare -->|"renders coin rows"| node_list
node_compare -->|"renders chart"| node_chart
node_compare -->|"renders control"| node_coincontrols
node_compare -->|"renders control"| node_pricecontrol
node_compare -->|"renders descriptions"| node_coininfo
node_coinfetch -->|"requests"| node_detailsapi
node_coinfetch -->|"fallback fetches"| node_marketfetch
node_pricefetch -->|"requests"| node_marketapi
node_header -->|"renders toggle"| node_theme
node_chartprep -->|"formats dates"| node_formatters

click node_app "https://github.com/pravin8007/crypto-tracker/blob/main/src/App.jsx"
click node_home "https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/Home.jsx"
click node_header "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Common/Header/index.jsx"
click node_theme "https://github.com/pravin8007/crypto-tracker/blob/main/src/ThemeContext.jsx"
click node_dashboard "https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/DashboardPage.jsx"
click node_search "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Search/index.jsx"
click node_listing "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Tabs/index.jsx"
click node_grid "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Grid/index.jsx"
click node_list "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/List/index.jsx"
click node_pagination "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Pagination/index.jsx"
click node_watchlist "https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/WatchList.jsx"
click node_coinpage "https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/CoinPage.jsx"
click node_compare "https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/ComparePage.jsx"
click node_coinselect "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Compare/SelectCoins/index.jsx"
click node_chart "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/LineChart/index.jsx"
click node_coincontrols "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/SelectDays/index.jsx"
click node_pricecontrol "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/Pricetype/index.jsx"
click node_coininfo "https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/CoinInfo/index.jsx"
click node_coinfetch "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/getCoinData.js"
click node_marketfetch "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/get100Coins.js"
click node_pricefetch "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/getCoinPrices.js"
click node_chartprep "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/settingChartData.js"
click node_cointransform "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/convertObject.js"
click node_formatters "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/convertNumbers.js"
click node_watchstorage "https://github.com/pravin8007/crypto-tracker/blob/main/src/function/saveItemToWatchList.jsx"
click node_coinsapi "https://github.com/pravin8007/crypto-tracker/blob/main/api/coins.js"
click node_detailsapi "https://github.com/pravin8007/crypto-tracker/blob/main/api/coin-details.js"
click node_marketapi "https://github.com/pravin8007/crypto-tracker/blob/main/api/market-data.js"

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_home,node_header,node_theme,node_user toneBlue
class node_dashboard,node_search,node_listing,node_grid,node_list,node_pagination,node_watchlist toneAmber
class node_coinpage,node_compare,node_coinselect,node_chart,node_coincontrols,node_pricecontrol,node_coininfo toneMint
class node_coinfetch,node_marketfetch,node_pricefetch,node_chartprep,node_cointransform,node_formatters,node_watchstorage,node_coinsapi,node_detailsapi,node_marketapi toneRose
```

## Components

### App and navigation

- [Route application](https://github.com/pravin8007/crypto-tracker/blob/main/src/App.jsx): `src/App.jsx`
- [Landing page](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Site navigation](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Common/Header/index.jsx): `src/component/Common/Header/index.jsx`
- [Theme controls](https://github.com/pravin8007/crypto-tracker/blob/main/src/ThemeContext.jsx): `src/ThemeContext.jsx`

### Market discovery

- [Market dashboard](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/DashboardPage.jsx): `src/pages/DashboardPage.jsx`
- [Coin search](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Search/index.jsx): `src/component/Dashboard/Search/index.jsx`
- [Grid and list views](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Tabs/index.jsx): `src/component/Dashboard/Tabs/index.jsx`
- [Grid cards](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Grid/index.jsx): `src/component/Dashboard/Grid/index.jsx`
- [Coin rows](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/List/index.jsx): `src/component/Dashboard/List/index.jsx`
- [Pagination](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Dashboard/Pagination/index.jsx): `src/component/Dashboard/Pagination/index.jsx`
- [Watchlist page](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/WatchList.jsx): `src/pages/WatchList.jsx`

### Coin analysis

- [Coin details page](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/CoinPage.jsx): `src/pages/CoinPage.jsx`
- [Coin comparison](https://github.com/pravin8007/crypto-tracker/blob/main/src/pages/ComparePage.jsx): `src/pages/ComparePage.jsx`
- [Comparison selection](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Compare/SelectCoins/index.jsx): `src/component/Compare/SelectCoins/index.jsx`
- [Price chart](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/LineChart/index.jsx): `src/component/Coin/LineChart/index.jsx`
- [Chart controls](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/SelectDays/index.jsx): `src/component/Coin/SelectDays/index.jsx`
- [Price type control](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/Pricetype/index.jsx): `src/component/Coin/Pricetype/index.jsx`
- [Coin description](https://github.com/pravin8007/crypto-tracker/blob/main/src/component/Coin/CoinInfo/index.jsx): `src/component/Coin/CoinInfo/index.jsx`

### Data and preferences

- [Coin detail fetch](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/getCoinData.js): `src/function/getCoinData.js`
- [Market list fetch](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/get100Coins.js): `src/function/get100Coins.js`
- [Price history fetch](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/getCoinPrices.js): `src/function/getCoinPrices.js`
- [Chart data preparation](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/settingChartData.js): `src/function/settingChartData.js`
- [Coin data transform](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/convertObject.js): `src/function/convertObject.js`
- [Date and number formatting](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/convertNumbers.js): `src/function/convertNumbers.js`
- [Watchlist storage actions](https://github.com/pravin8007/crypto-tracker/blob/main/src/function/saveItemToWatchList.jsx): `src/function/saveItemToWatchList.jsx`
- [Coins endpoint](https://github.com/pravin8007/crypto-tracker/blob/main/api/coins.js): `api/coins.js`
- [Coin details endpoint](https://github.com/pravin8007/crypto-tracker/blob/main/api/coin-details.js): `api/coin-details.js`
- [Market data endpoint](https://github.com/pravin8007/crypto-tracker/blob/main/api/market-data.js): `api/market-data.js`

### Other components

- **User**

## Connections

- User → Route application: opens (evidence: `src/App.jsx`)
- Route application → Landing page: routes to (evidence: `src/App.jsx`)
- Route application → Market dashboard: routes to (evidence: `src/App.jsx`)
- Route application → Coin details page: routes to (evidence: `src/App.jsx`)
- Route application → Coin comparison: routes to (evidence: `src/App.jsx`)
- Route application → Watchlist page: routes to (evidence: `src/App.jsx`)
- Landing page → Site navigation: renders (evidence: `src/pages/Home.jsx`)
- Market dashboard → Site navigation: renders (evidence: `src/pages/DashboardPage.jsx`)
- Coin details page → Site navigation: renders (evidence: `src/pages/CoinPage.jsx`)
- Coin comparison → Site navigation: renders (evidence: `src/pages/ComparePage.jsx`)
- Market dashboard → Market list fetch: fetches listings (evidence: `src/pages/DashboardPage.jsx`)
- Market list fetch → Coins endpoint: requests (evidence: `src/function/get100Coins.js`)
- Market dashboard → Coin search: renders (evidence: `src/pages/DashboardPage.jsx`)
- Market dashboard → Grid and list views: renders (evidence: `src/pages/DashboardPage.jsx`)
- Market dashboard → Pagination: renders (evidence: `src/pages/DashboardPage.jsx`)
- Grid and list views → Grid cards: renders (evidence: `src/component/Dashboard/Tabs/index.jsx`)
- Grid and list views → Coin rows: renders (evidence: `src/component/Dashboard/Tabs/index.jsx`)
- Grid cards → Watchlist storage actions: updates watchlist (evidence: `src/component/Dashboard/Grid/index.jsx`)
- Coin rows → Watchlist storage actions: updates watchlist (evidence: `src/component/Dashboard/List/index.jsx`)
- Coin rows → Date and number formatting: formats values (evidence: `src/component/Dashboard/List/index.jsx`)
- Watchlist page → Grid and list views: renders (evidence: `src/pages/WatchList.jsx`)
- Coin details page → Coin detail fetch: loads details (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Price history fetch: loads history (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Chart data preparation: prepares chart (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Coin data transform: transforms details (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Coin rows: renders coin row (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Price chart: renders chart (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Chart controls: renders control (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Price type control: renders control (evidence: `src/pages/CoinPage.jsx`)
- Coin details page → Coin description: renders description (evidence: `src/pages/CoinPage.jsx`)
- Coin comparison → Comparison selection: renders selector (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Coin detail fetch: loads details (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Price history fetch: loads histories (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Chart data preparation: prepares chart (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Coin data transform: transforms details (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Coin rows: renders coin rows (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Price chart: renders chart (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Chart controls: renders control (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Price type control: renders control (evidence: `src/pages/ComparePage.jsx`)
- Coin comparison → Coin description: renders descriptions (evidence: `src/pages/ComparePage.jsx`)
- Coin detail fetch → Coin details endpoint: requests (evidence: `src/function/getCoinData.js`)
- Coin detail fetch → Market list fetch: fallback fetches (evidence: `src/function/getCoinData.js`)
- Price history fetch → Market data endpoint: requests (evidence: `src/function/getCoinPrices.js`)
- Site navigation → Theme controls: renders toggle (evidence: `src/component/Common/Header/index.jsx`)
- Chart data preparation → Date and number formatting: formats dates (evidence: `src/function/settingChartData.js`)
