# subayel-wali/sorting-algorithm-visualizer architecture

> Architecture diagram of the GitHub repository subayel-wali/sorting-algorithm-visualizer, 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/subayel-wali/sorting-algorithm-visualizer
- Repository: https://github.com/subayel-wali/sorting-algorithm-visualizer

## Overview

This is a zero-dependency sorting-visualizer single-page application. Users configure an array and animation, choose a sorting algorithm, and watch its operations in a live visualization; the interface also presents complexity information and supports theme switching. The README describes these capabilities but provides no source excerpts, so the relationships below are limited to documented behavior. All application responsibilities share index.html.

Main entry points: [`index.html`](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html) (Visualizer Controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Controls"]
  node_controls["Visualizer Controls<br/>[index.html]"]
  node_array["Random Array<br/>[index.html]"]
  node_theme["Theme Toggle<br/>[index.html]"]
end

subgraph group_sorting["Sorting"]
  node_algorithm["Algorithm Selection<br/>[index.html]"]
  node_sorts["Sorting Algorithms<br/>[index.html]"]
end

subgraph group_display["Visualization"]
  node_animation["Animation Sequencing<br/>[index.html]"]
  node_visualization["Array Visualization<br/>[index.html]"]
  node_complexity["Complexity Display<br/>[index.html]"]
end

node_user(("User"))

node_user -->|"sets options"| node_controls
node_controls -->|"requests array"| node_array
node_array -->|"shows elements"| node_visualization
node_controls -->|"selects algorithm"| node_algorithm
node_algorithm -->|"chooses algorithm"| node_sorts
node_controls -->|"sets speed"| node_animation
node_sorts -->|"sequences operations"| node_animation
node_animation -->|"animates operations"| node_visualization
node_algorithm -->|"selects metrics"| node_complexity
node_user -->|"switches theme"| node_theme

click node_controls "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_array "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_algorithm "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_sorts "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_animation "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_visualization "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_complexity "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"
click node_theme "https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html"

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_controls,node_array,node_theme,node_user toneBlue
class node_algorithm,node_sorts toneAmber
class node_animation,node_visualization,node_complexity toneMint
```

## Components

### User Controls

- [Visualizer Controls](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`
- [Random Array](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`
- [Theme Toggle](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`

### Sorting

- [Algorithm Selection](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`
- [Sorting Algorithms](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`

### Visualization

- [Animation Sequencing](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`
- [Array Visualization](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`
- [Complexity Display](https://github.com/subayel-wali/sorting-algorithm-visualizer/blob/main/index.html): `index.html`

### Other components

- **User**

## Connections

- User → Visualizer Controls: sets options (evidence: `README.md`)
- Visualizer Controls → Random Array: requests array (evidence: `README.md`)
- Random Array → Array Visualization: shows elements (evidence: `README.md`)
- Visualizer Controls → Algorithm Selection: selects algorithm (evidence: `README.md`)
- Algorithm Selection → Sorting Algorithms: chooses algorithm (evidence: `README.md`)
- Visualizer Controls → Animation Sequencing: sets speed (evidence: `README.md`)
- Sorting Algorithms → Animation Sequencing: sequences operations (evidence: `README.md`)
- Animation Sequencing → Array Visualization: animates operations (evidence: `README.md`)
- Algorithm Selection → Complexity Display: selects metrics (evidence: `README.md`)
- User → Theme Toggle: switches theme (evidence: `README.md`)
