Skip to content

Repository files navigation

UB StructStudio

Live SiteReactTailwind CSSMaterial-UILicense: BSD 2-Clause

An interactive data structure and algorithm visualization tool built for CSE 250 at the University at Buffalo. Explore 57 algorithms through step-by-step canvas animations, pseudocode walkthroughs, and Big O analysis.

Live site:cse.buffalo.edu/structstudio

UB StructStudio landing page

Features

  • 57 visualizations spanning lists, trees, sorting, hashing, graphs, string matching, and dynamic programming
  • Step-through animations with play, pause, step forward, step back, and adjustable speed controls
  • Sidebar reference panel with three tabs per algorithm:
    • About — description, operations, and use cases
    • Pseudocode — line-by-line highlighting synchronized with the animation
    • Big O — best, average, and worst case complexity breakdowns
  • Dark theme interface with canvas color remapping

Screenshots

Graph algorithmsSorting algorithms
Dijkstra's algorithm mid-run, showing the priority queue, visited set, and live distance mapQuicksort mid-run, showing the pivot, i/j pointers, and comparison/swap counts
Dijkstra's shortest path, stepping through the priority queue and distance map liveQuicksort partitioning, tracking pivot choice, pointers, comparisons, and swaps

Getting Started

Prerequisites

  • Node.js (LTS recommended)
  • npm (included with Node.js)

Installation

git clone https://github.com/JoshuaCongHu/dsa-visualizer.git
cd dsa-visualizer
npm install

Usage

npm start

Open http://localhost:3000 in your browser.

Production Build

npm run build

The optimized output is written to the build/ directory.

Deployment

Development happens on your laptop and is pushed to GitHub. The university web server (cerf) hosts the app at /shared/web/structstudio/ — that directory contains both the git checkout and the files Apache serves. To update the live site, SSH into cerf and run ./deploy.sh; the script pulls the latest commit, rebuilds, and overlays the built files in place.

One-time setup on cerf:

cd /shared/web/structstudio
git clone https://github.com/JoshuaCongHu/dsa-visualizer.git .
npm install
chmod +x deploy.sh

To update:

./deploy.sh

Supported Algorithms

CategoryAlgorithms
ListsArrayList, LinkedList, DoublyLinkedList, CircularlyLinkedList, StackArray, StackLL, QueueArray, QueueLL, DequeArray, DequeLL
TreesBST, AVL, Red-Black Tree, B-Tree, Splay Tree, Skip List, TreeMap
SortingBubbleSort, CocktailSort, InsertionSort, SelectionSort, QuickSort, QuickSelect, MergeSort, HeapSort, LSD Radix Sort
HashingOpen Hashing, Closed Hashing
HeapsMin/Max Heap
GraphsBFS, DFS, Dijkstra, Prim, Kruskal, Floyd-Warshall, Disjoint Set, Create Graph
StringsBrute Force, Boyer-Moore, KMP, Rabin-Karp
Dynamic ProgrammingLCS

Tech Stack

  • React 18 — component architecture and state management
  • Tailwind CSS 3 — utility-first styling
  • Material-UI 5 — UI components
  • HTML5 Canvas — custom animation engine for all visualizations

Project Structure

src/
├── algo/ # Algorithm implementations (one file per algorithm)
├── anim/ # Canvas animation engine
├── components/ # Reusable UI components
├── screens/ # Top-level page components
├── css/ # Stylesheets and CSS custom properties
├── pseudocode.json # Pseudocode content for sidebar tab
└── time_complexities.json # Big O content for sidebar tab

Contributing

See CONTRIBUTING.md for development setup, project structure details, and pull request guidelines.

Team & Acknowledgments

Co-developed with Amaan Sheikh — see the About page for the full team and project background.

Built on the visualization framework originally created by David Galles at the University of San Francisco, with subsequent contributions by Rodrigo Pontes at the Georgia Institute of Technology.

License

BSD 2-Clause. See LICENSE.md for details.

About

StructStudio — interactive DSA visualizer with 57 algorithm animations, used in UB CSE 250

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages