How vinayakkumarr/algorithm-visualizer works
Algorithm Visualizer is a client-side learning application: users choose a topic from the catalog, open an interactive visualizer, configure input and playback, and inspect step-by-step state alongside pseudocode and theory. The routes connect topic pages to algorithm step generators and shared visualization components; theory-only topics use reference content instead. The README documents playback, presets, array views, narration, and deferred theory loading. Several page and algorithm implementations are unsampled, so those capability branches are shown at directory level and links are limited to documented or indexed evidence.
Main entry points: VisualizerLayout.jsx Visualizer shell · App.jsx App routes · algorithms Other topic pages · BinarySearch.jsx Binary search page
Components 25
Navigation and shell
- App routes
src/App.jsx - Topic catalog
src/pages/Home.jsx
Interactive visualization
- Binary search page
src/pages/algorithms/searching/BinarySearch.jsx - BST visualizer page
src/pages/algorithms/tree/BSTInsertion.jsx - Other topic pages
src/pages/algorithms - Visualizer shell
src/components/VisualizerLayout.jsx - Search display
src/components/SearchVisualizer.jsx - Tree display
src/components/TreeVisualizer.jsx - Pseudocode tracer
src/components/PseudocodeViewer.jsx - Step narrator
src/components/StepNarrator.jsx - Custom array input
src/components/CustomArrayModal.jsx
Algorithm execution
- Search generators
src/algorithms/binarySearch.js - Sorting generators
src/algorithms - Linked-list generators
src/algorithms/linkedListEngine.js - Tree generators
src/algorithms/bstAlgorithms.js - Graph generators
src/algorithms - Stack and queue generators
src/algorithms
Learning and reference
- Theory topic pages
src/pages/TheoryTopicPage.jsx - Theory reader
src/components/TheorySection.jsx - Theory manifest
src/data/theoryManifest.js - Theory content
src/data/theoryData.js
Shared state
- Playback context
src/context/VisualizerContext.jsx - Theme context
src/context/ThemeContext.jsx
Other components
- Learner
- Browser local storage
Connections 27
- Learner → Topic catalog: browses topics
- Topic catalog → App routes: opens route
src/App.jsx - App routes → Topic catalog: routes to
src/App.jsx - App routes → Binary search page: routes to
src/App.jsx - App routes → BST visualizer page: routes to
src/App.jsx - App routes → Other topic pages: routes to
src/App.jsx - Binary search page → Search generators: generates steps
src/pages/algorithms/searching/BinarySearch.jsx - Binary search page → Visualizer shell: renders shell
src/pages/algorithms/searching/BinarySearch.jsx - Binary search page → Search display: renders states
src/pages/algorithms/searching/BinarySearch.jsx - BST visualizer page → Tree generators: generates steps
src/pages/algorithms/tree/BSTInsertion.jsx - BST visualizer page → Tree display: renders tree
src/pages/algorithms/tree/BSTInsertion.jsx - BST visualizer page → Theory reader: renders guide
src/pages/algorithms/tree/BSTInsertion.jsx - Other topic pages → Sorting generators: uses generators
src/pages/algorithms/searching/BinarySearch.jsx - Other topic pages → Linked-list generators: uses generators
src/pages/algorithms/stack/BalancedParens.jsx - Other topic pages → Graph generators: uses generators
src/pages/algorithms/searching/BinarySearch.jsx - Other topic pages → Stack and queue generators: uses generators
src/pages/algorithms/searching/BinarySearch.jsx - Visualizer shell → Pseudocode tracer: renders tracer
src/components/VisualizerLayout.jsx - Visualizer shell → Step narrator: renders narration
src/components/VisualizerLayout.jsx - Visualizer shell → Custom array input: opens modal
src/components/VisualizerLayout.jsx - Visualizer shell → Playback context: provides context
src/components/VisualizerLayout.jsx - Visualizer shell → Theory manifest: resolves topic
src/components/VisualizerLayout.jsx - Visualizer shell → Theory reader: shows theory
src/components/VisualizerLayout.jsx - Theory topic pages → Theory reader: renders guide
- Theory reader → Theory content: reads content
src/components/TheorySection.jsx - Theory topic pages → Theory content: loads topic data
- App routes → Theme context: provides theme
src/App.jsx - Theme context → Browser local storage: persists preference
src/context/ThemeContext.jsx