# chriscodingxyz/cherrydub98 architecture

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

- Interactive diagram: https://gitdiagram.com/chriscodingxyz/cherrydub98
- Repository: https://github.com/chriscodingxyz/cherrydub98

## Overview

##### Project type and purpose
- This is a single-page, front-end web application styled after Windows 98.
- Built with React, Vite, Tailwind CSS, 98.css, and hosted as a static site (Vercel).
- Core functionality: draggable windows, PDF preview, Twitter embed, live NFT price/data fetch.

##### File structure
- Top level:
- index.html – app shell
- src/ – React source code
- package.json, vite.config.js, tailwind.config.js – build & styling config
- src breakdown:
- main.jsx → App.jsx (entry point + root component)
- windows/ – window containers & content modules
- lib/ – shared data utilities (data.ts)
- assets/styles – flicker.css, App.css, index.css
- External data: src/components/cryptoPrices.js, nftData.js, plus react-twitter-embed.

##### README insights
- Technologies: React, Vite, Tailwind, 98.css, win98icons, CRT effect, react-draggable, react-pdf, react-twitter-embed.
- Describes the nostalgic UI, draggable windows, PDF previews, Twitter feeds.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Nodes
    Browser["Client Browser"]:::frontend
    StaticHost["Static Host (Vercel/CDN)"]:::static
    PublicAssets["Public Assets\n(public/)"]:::static
    ReactApp["React App"]:::frontend

    subgraph EntryPoint["Entry Point"]
        Main["src/main.jsx"]:::frontend
        App["src/App.jsx"]:::frontend
    end

    subgraph UILayer["UI Layer"]
        UIComp["Core React Components\n(src/components/)"]:::frontend
        Windows["Windows & Content Modules\n(src/windows/)"]:::frontend
    end

    subgraph StylingLayer["Styling Layer"]
        TailwindConfig["tailwind.config.js"]:::config
        PostCSS["postcss.config.js"]:::config
        IndexCSS["src/index.css"]:::config
        AppCSS["src/App.css"]:::config
        FlickerCSS["src/flicker.css"]:::config
    end

    subgraph DataLayer["Data Layer"]
        DataTS["src/lib/data.ts"]:::data
        CryptoPrices["src/components/cryptoPrices.js"]:::data
        NFTData["src/components/crypto/nftData.js"]:::data
        TwitterEmbed["src/components/TwitterEmbed.jsx"]:::data
    end

    subgraph BuildConfig["Build & Hosting Config"]
        ViteConfig["vite.config.js"]:::config
        PackageJSON["package.json"]:::config
        ESLint[".eslintrc.cjs"]:::config
    end

    NFTAPI["NFT Price API"]:::external
    TwitterAPI["Twitter Embed API"]:::external

    %% Connections
    Browser -->|"GET index.html, bundle.js, CSS"| StaticHost
    StaticHost -->|"Serves assets"| Browser

    StaticHost -->|Hosts public files| PublicAssets
    StaticHost -->|Hosts bundle| ReactApp

    Browser -->|"Runs SPA"| Main
    Main -->|"renders App.jsx"| App
    App -->|"initializes components"| UIComp
    UIComp -->|"uses windows modules"| Windows
    UIComp -->|"applies styles"| StylingLayer
    UIComp -->|"fetches data via hooks"| DataLayer

    UIComp -->|"loads PDFs"| PublicAssets

    DataTS -->|"fetch NFT prices"| NFTAPI
    CryptoPrices -->|"calls NFT API"| NFTAPI
    NFTData -->|"provides fallback data"| UIComp
    TwitterEmbed -->|"embeds tweets"| TwitterAPI

    %% Click Events
    click Main "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/main.jsx"
    click App "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/App.jsx"
    click UIComp "https://github.com/chriscodingxyz/cherrydub98/tree/main/src/components/"
    click Windows "https://github.com/chriscodingxyz/cherrydub98/tree/main/src/windows/"
    click TailwindConfig "https://github.com/chriscodingxyz/cherrydub98/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/chriscodingxyz/cherrydub98/blob/main/postcss.config.js"
    click IndexCSS "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/index.css"
    click AppCSS "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/App.css"
    click FlickerCSS "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/flicker.css"
    click DataTS "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/lib/data.ts"
    click CryptoPrices "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/components/cryptoPrices.js"
    click NFTData "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/components/crypto/nftData.js"
    click TwitterEmbed "https://github.com/chriscodingxyz/cherrydub98/blob/main/src/components/TwitterEmbed.jsx"
    click ViteConfig "https://github.com/chriscodingxyz/cherrydub98/blob/main/vite.config.js"
    click PackageJSON "https://github.com/chriscodingxyz/cherrydub98/blob/main/package.json"
    click ESLint "https://github.com/chriscodingxyz/cherrydub98/blob/main/.eslintrc.cjs"

    %% Styles
    classDef frontend fill:#c6e2ff,stroke:#333,stroke-width:1px
    classDef static fill:#e2ffe2,stroke:#333,stroke-width:1px
    classDef data fill:#d1e7dd,stroke:#333,stroke-width:1px
    classDef config fill:#f0f0f0,stroke:#333,stroke-width:1px
    classDef external fill:#ffd8b1,stroke:#333,stroke-width:1px
```
