# gyanangshu/nft-token-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/gyanangshu/nft-token-tracker
- Repository: https://github.com/gyanangshu/nft-token-tracker

## Overview

##### Project type and purpose
- This is a single‐page frontend application built with React 18, Redux Toolkit, and Vite.
- Its purpose is to let users connect cryptocurrency wallets, fetch live token prices, and display portfolio analytics in charts and tables.

##### File structure
- Top level:
- index.html, vite.config.js – entry point and build config
- src/ – all source code
- src/main.jsx: React bootstrap and Redux <Provider> setup
- src/App.jsx + index.css: global layout and styling
- src/pages/Dashboard.jsx: primary route container
- src/components/: presentational UI widgets (Button, Table, DoughnutChart, Sparkline, Modal, WalletConnect)
- src/actions/ & src/reducers/ & src/store.js: Redux “Flux” architecture
- src/util/wagmiConfig.js: external wallet integration (wagmi + RainbowKit)
- package.json: NPM dependencies (React, Redux Toolkit, Tailwind, Chart.js, wagmi, RainbowKit…)

##### README for additional insights
- Core features: wallet integration, portfolio analytics, real‐time updates
- Tech stack: React, Redux Toolkit, Tailwind CSS, Chart.js, wagmi + RainbowKit, Vite

##### Final advice
- Essential third-party integrations (Chart.js, wagmi) so newcomers see where key logic resides.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Deployment Layer
    subgraph "Build & Deployment"
        direction TB
        DEV["index.html & vite.config.js"]:::dev
        NETLIFY["Netlify Hosting"]:::dev
    end

    %% Bootstrap Layer
    subgraph "Bootstrap"
        direction TB
        MAIN["src/main.jsx"]:::frontend
    end

    %% App Layer
    subgraph "App & Layout"
        direction TB
        APP["src/App.jsx"]:::frontend
        CSS["src/index.css"]:::frontend
    end

    %% UI Layer
    subgraph "UI Layer"
        direction TB
        DASH["Dashboard Page"]:::frontend
        subgraph "Presentational Components"
            direction TB
            BTN["Button"]:::frontend
            TBL["Table"]:::frontend
            DOC["DoughnutChart"]:::frontend
            SPR["Sparkline"]:::frontend
            MOD["Modal"]:::frontend
            WC["WalletConnect"]:::frontend
        end
    end

    %% State Management Layer
    subgraph "State Management"
        direction TB
        STORE["src/store.js"]:::state
        subgraph "Actions"
            direction TB
            TYPES["Action Types"]:::state
            WL["Watchlist Actions"]:::state
        end
        subgraph "Reducers"
            direction TB
            COINS["Coins Reducer"]:::state
            PORT["Portfolio Reducer"]:::state
        end
    end

    %% External Services
    subgraph "External Services"
        direction TB
        WAGMI["wagmiConfig"]:::external
        PRICE["Price API"]:::external
        BLOCK["Blockchain Nodes"]:::external
    end

    %% Connections
    DEV --> MAIN
    MAIN --> APP
    APP --> CSS
    APP --> DASH
    DASH --> BTN
    DASH --> TBL
    DASH --> DOC
    DASH --> SPR
    DASH --> MOD
    DASH --> WC
    WC --> WAGMI
    DASH -->|dispatch actions| TYPES
    DASH -->|dispatch actions| WL
    TYPES --> STORE
    WL --> STORE
    STORE --> COINS
    STORE --> PORT
    COINS --> STORE
    PORT --> STORE
    STORE --> DOC
    STORE --> SPR
    STORE --> TBL
    STORE -->|fetch prices| PRICE
    PRICE --> STORE
    WAGMI --> BLOCK

    %% Deployment arrow
    MAIN -->|dev/build| DEV
    DEV --> NETLIFY

    %% Click Events
    click DEV "https://github.com/gyanangshu/nft-token-tracker/blob/main/index.html"
    click DEV "https://github.com/gyanangshu/nft-token-tracker/blob/main/vite.config.js"
    click MAIN "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/main.jsx"
    click APP "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/App.jsx"
    click CSS "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/index.css"
    click DASH "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/pages/Dashboard.jsx"
    click BTN "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/Button.jsx"
    click TBL "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/Table.jsx"
    click DOC "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/DoughnutChart.jsx"
    click SPR "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/Sparkline.jsx"
    click MOD "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/Modal.jsx"
    click WC "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/components/WalletConnect.jsx"
    click STORE "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/store.js"
    click TYPES "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/actions/types.js"
    click WL "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/actions/watchlistActions.js"
    click COINS "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/reducers/coinsReducer.js"
    click PORT "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/reducers/portfolioReducer.js"
    click WAGMI "https://github.com/gyanangshu/nft-token-tracker/blob/main/src/util/wagmiConfig.js"
    click PRICE "https://github.com/gyanangshu/nft-token-tracker/blob/main/package.json"

    %% Styles
    classDef frontend fill:#E0F7FA,stroke:#006064,stroke-width:1px
    classDef state fill:#E8F5E9,stroke:#1B5E20,stroke-width:1px
    classDef external fill:#FFF3E0,stroke:#E65100,stroke-width:1px
    classDef dev fill:#ECEFF1,stroke:#455A64,stroke-width:1px
```
