A modular, framework-agnostic architecture for visualizing and learning about Data Structures and Algorithms.
- π§© Modular Architecture: Clean separation between core logic and UI
- π Interactive Visualizations: Step-by-step visualization of algorithms and data structures
- π Multi-language Support: View and run code samples in TypeScript, Python, C++, and more
- π Learning Content: Detailed explanations and complexity analysis
- π Framework-Agnostic: Core logic can be used with any UI framework
π¦ dsa-visualizer/
βββ core/ # Framework-agnostic business logic
β βββ algorithms/ # Algorithm metadata, logic, code samples
β βββ data_structures/ # DS definitions, metadata, visual models
β βββ visualizer/ # Step-by-step state engine for visualization
β βββ interpreter/ # Cross-language execution layer
β βββ shared/ # Utilities, types, helpers
β
βββ ui/ # UI implementations
β βββ sveltekit/ # Initial implementation using SvelteKit
β βββ react/ # Future support
β βββ vanilla/ # Optional no-framework support
β
βββ public/ # Static assets
βββ docs/ # Markdown docs for algorithms and DS
βββ tests/ # Unit tests
- Node.js (v16+)
- npm or yarn
# Clone the repository
git clone https://.com/yourusername/dsa-visualizer.git
cd dsa-visualizer
# Install dependencies
npm install
# Start the development server
npm run dev
- Visit
http://localhost:5173
in your browser - Browse available algorithms and data structures
- Select an algorithm to visualize
- Use the controls to step through the visualization
- View and modify the code samples
- Learn about the algorithm's complexity and use cases
- Add your algorithm definition to
core/algorithms/index.ts
- Provide code samples in multiple languages
- Link it to related data structures
- Add visualization steps in the playground component
- Add your data structure definition to
core/data_structures/index.ts
- Implement the visualizer function to render the structure
- Define key operations and their complexity
- Add code samples for each operation
- Add more algorithms and data structures
- Implement WASM-based execution for non-JavaScript languages
- Add React and vanilla JS UI implementations
- Support for user-defined algorithms and data structures
- Mobile-responsive design
This project is licensed under the MIT License - see the LICENSE file for details.