# lestathriverad/interactive-convex-hull-visualizer architecture

> Architecture diagram of the GitHub repository lestathriverad/interactive-convex-hull-visualizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lestathriverad/interactive-convex-hull-visualizer
- Repository: https://github.com/lestathriverad/interactive-convex-hull-visualizer

## Overview

This is a browser-based convex-hull visualizer. A user adds points to the Graham-scan canvas, starts the algorithm, and steps through its recorded hull-building history or stops to edit the points. The React app routes to the Graham-scan page and provides sidebar navigation; the playground handles point input, drawing, simulation state, and playback controls, while the geometry module computes the hull and history. The sampled files show this main workflow; no separate storage or external services are present.

Main entry points: [`visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx`](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx) (Canvas playground), [`visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx`](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx) (Graham-scan page), [`visualizer-frontend/src/App.jsx`](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/App.jsx) (React app and routes), [`core-logic/convexHull.js`](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/core-logic/convexHull.js) (Hull and step history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["React app and routes<br/>[App.jsx]"]
end

subgraph group_algorithm["Graham scan"]
  node_scan_page["Graham-scan page<br/>[GrahamScan.jsx]"]
  node_playground["Canvas playground"]
  node_geometry["Hull and step history<br/>[convexHull.js]"]
end

subgraph group_ui["Interface components"]
  node_sidebar["Sidebar navigation<br/>[Sidebar.jsx]"]
  node_playback_icon["Playback icons<br/>[PlaybackIcon.jsx]"]
end

node_user(("User"))

node_user -->|"adds points"| node_playground
node_user -->|"controls playback"| node_playground
node_app -->|"routes to"| node_scan_page
node_app -->|"renders"| node_sidebar
node_sidebar -->|"links to"| node_scan_page
node_scan_page -->|"renders"| node_playground
node_playground -->|"computes hull"| node_geometry
node_geometry -->|"returns hull history"| node_playground
node_playground -->|"renders controls"| node_playback_icon

click node_app "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/App.jsx"
click node_sidebar "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/components/Sidebar.jsx"
click node_scan_page "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx"
click node_playground "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx"
click node_geometry "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/core-logic/convexHull.js"
click node_playback_icon "https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/components/PlaybackIcon.jsx"

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_user toneBlue
class node_scan_page,node_playground,node_geometry toneAmber
class node_sidebar,node_playback_icon toneMint
```

## Components

### Application shell

- [React app and routes](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/App.jsx): `visualizer-frontend/src/App.jsx`

### Graham scan

- [Graham-scan page](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx): `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx`
- [Canvas playground](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx): `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx`
- [Hull and step history](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/core-logic/convexHull.js): `core-logic/convexHull.js`

### Interface components

- [Sidebar navigation](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/components/Sidebar.jsx): `visualizer-frontend/src/components/Sidebar.jsx`
- [Playback icons](https://github.com/lestathriverad/interactive-convex-hull-visualizer/blob/main/visualizer-frontend/src/components/PlaybackIcon.jsx): `visualizer-frontend/src/components/PlaybackIcon.jsx`

### Other components

- **User**

## Connections

- User → Canvas playground: adds points (evidence: `README.md`)
- User → Canvas playground: controls playback (evidence: `README.md`)
- React app and routes → Graham-scan page: routes to (evidence: `visualizer-frontend/src/App.jsx`)
- React app and routes → Sidebar navigation: renders (evidence: `visualizer-frontend/src/App.jsx`)
- Sidebar navigation → Graham-scan page: links to (evidence: `visualizer-frontend/src/components/Sidebar.jsx`)
- Graham-scan page → Canvas playground: renders (evidence: `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx`)
- Canvas playground → Hull and step history: computes hull (evidence: `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx`)
- Hull and step history → Canvas playground: returns hull history (evidence: `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx`)
- Canvas playground → Playback icons: renders controls (evidence: `visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx`)
