# dx2102/web architecture

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

- Interactive diagram: https://gitdiagram.com/dx2102/web
- Repository: https://github.com/dx2102/web

## Overview

##### Main Components
- Interactive Demo Modules: Make a list of each HTML file (e.g., 2d_rubik.html, fixed_point.html, fixed_point2.html, swap_torus.html, reverse_audio.html, rgb.html, etc.) as individual components.
- Supporting/Configuration Files: Include configuration files such as tailwind.config.js (indicating styling frameworks) and any developer environment specifics (e.g., .vscode settings).
- Supplementary Files: Although files like .DS_Store and .gitattributes do not play a core role in functionality, acknowledge that these support the project’s maintenance and version control.

##### Relationships and Architecture
- Overall Container: Treat the project as a single “Interactive Demos Repository” container.
- Individual Demo Isolation: Each HTML file functions as an independent unit. Although they likely share common web technologies (HTML, CSS, possibly JavaScript frameworks or libraries), represent them as standalone modules.
- Common Styling or Assets: If there is any shared styling or resources managed via the Tailwind configuration or other assets, show a centralized “Assets / Styles” component that provides these common dependencies.
- Deployment: Note that the README links refer to a hosted version on GitHub Pages (dx2102.github.io/web/…), so add a “Deployment” node indicating GitHub Pages (or similar static hosting) that serves the demos.

##### Architectural Patterns and Design Principles
- Componentization: Each demo is self-contained, hinting at the modularity of the project.
- Separation of Concerns: Although the demos are bundled in one repository, the separation means each interactive visualization is an independent “micro” application.
- Configuration Management: The presence of configuration files like tailwind.config.js points to a standardized approach to styling.

##### Relevant Technologies and Frameworks
- Core: HTML, CSS, and possibly vanilla or framework-based JavaScript.
- Styling: Tailwind CSS (as evidenced by tailwind.config.js) is used for styling consistency.
- Deployment: The hosting on GitHub Pages indicates the project uses static site deployment practices.
- Version Control: Git files (such as .gitattributes) represent best practices in code management.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Repo["Interactive Demos Repository"]:::repo

    subgraph "Interactive Demo Modules"
        node2d["2D Rubik's Cube Demo"]:::demo
        nodeDeepseek["Deepseek Translate Demo"]:::demo
        nodeFixed1["Fixed Point Iteration Demo (Logistic/Tent Map) 1"]:::demo
        nodeFixed2["Fixed Point Iteration Demo (Logistic/Tent Map) 2"]:::demo
        nodeReverse["Reverse Audio Demo"]:::demo
        nodeRGB["RGB Demo"]:::demo
        nodeSoftTopK["Soft Top K Demo"]:::demo
        nodeSoftmax3D["Softmax in 3D Demo"]:::demo
        nodeSwapPixels["Swap Pixels Demo"]:::demo
        nodeSwapTorus["Swap Torus Demo"]:::demo
        nodeTokenProb["Token Probability Demo"]:::demo
        nodeTorusPlane["Torus to Plane Demo"]:::demo
    end

    subgraph "Assets & Configuration"
        Assets["Assets/Supporting Media"]:::asset
        Config["Styling & Configuration"]:::config
        DevTools["Developer Tools/Environment Configurations"]:::config
        VC["Repository Management & Meta Files"]:::config
    end

    Docs["Project Documentation"]:::docs
    Deployment["Static Web Hosting (GitHub Pages)"]:::external

    %% Relationships
    Repo -->|"contains"| node2d
    Repo -->|"contains"| nodeDeepseek
    Repo -->|"contains"| nodeFixed1
    Repo -->|"contains"| nodeFixed2
    Repo -->|"contains"| nodeReverse
    Repo -->|"contains"| nodeRGB
    Repo -->|"contains"| nodeSoftTopK
    Repo -->|"contains"| nodeSoftmax3D
    Repo -->|"contains"| nodeSwapPixels
    Repo -->|"contains"| nodeSwapTorus
    Repo -->|"contains"| nodeTokenProb
    Repo -->|"contains"| nodeTorusPlane

    Repo -->|"includes"| Assets
    Repo -->|"includes"| Config
    Repo -->|"includes"| DevTools
    Repo -->|"includes"| VC
    Repo -->|"includes"| Docs

    node2d -->|"deployed"| Deployment
    nodeDeepseek -->|"deployed"| Deployment
    nodeFixed1 -->|"deployed"| Deployment
    nodeFixed2 -->|"deployed"| Deployment
    nodeReverse -->|"deployed"| Deployment
    nodeRGB -->|"deployed"| Deployment
    nodeSoftTopK -->|"deployed"| Deployment
    nodeSoftmax3D -->|"deployed"| Deployment
    nodeSwapPixels -->|"deployed"| Deployment
    nodeSwapTorus -->|"deployed"| Deployment
    nodeTokenProb -->|"deployed"| Deployment
    nodeTorusPlane -->|"deployed"| Deployment

    Assets -->|"resources"| node2d
    Config -->|"styles"| node2d

    %% Click Events
    click node2d "https://github.com/dx2102/web/blob/main/2d_rubik.html"
    click nodeDeepseek "https://github.com/dx2102/web/blob/main/deepseek_translate.html"
    click nodeFixed1 "https://github.com/dx2102/web/blob/main/fixed_point.html"
    click nodeFixed2 "https://github.com/dx2102/web/blob/main/fixed_point2.html"
    click nodeReverse "https://github.com/dx2102/web/blob/main/reverse_audio.html"
    click nodeRGB "https://github.com/dx2102/web/blob/main/rgb.html"
    click nodeSoftTopK "https://github.com/dx2102/web/blob/main/soft_top_k.html"
    click nodeSoftmax3D "https://github.com/dx2102/web/blob/main/softmax_in_3d.html"
    click nodeSwapPixels "https://github.com/dx2102/web/blob/main/swap_pixels.html"
    click nodeSwapTorus "https://github.com/dx2102/web/blob/main/swap_torus.html"
    click nodeTokenProb "https://github.com/dx2102/web/blob/main/token_prob.html"
    click nodeTorusPlane "https://github.com/dx2102/web/blob/main/torus_to_plane.html"
    click Assets "https://github.com/dx2102/web/tree/main/diffuse_img"
    click Config "https://github.com/dx2102/web/blob/main/tailwind.config.js"
    click DevTools "https://github.com/dx2102/web/blob/main/.vscode"
    click VC "https://github.com/dx2102/web/blob/main/.gitattributes"
    click Docs "https://github.com/dx2102/web/blob/main/README.md"

    %% Styles
    classDef repo fill:#D7BDE2,stroke:#8E44AD,stroke-width:2px;
    classDef demo fill:#AEDFF7,stroke:#1D8FCE,stroke-width:2px;
    classDef config fill:#F9E79F,stroke:#D4AC0D,stroke-width:2px;
    classDef asset fill:#ABEBC6,stroke:#28B463,stroke-width:2px;
    classDef external fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
    classDef docs fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
