A full-stack interactive Data Structures & Algorithms visualizer that helps users understand how sorting algorithms work step-by-step using real-time animations.
Built using:
- โ๏ธ React (Vite + Tailwind CSS)
- ๐ FastAPI (Python backend)
- ๐ Algorithm step-engine (custom implementation)
- Step-by-step visualization of sorting algorithms
- Bubble Sort, Merge Sort, Quick Sort support
- Real-time animation of comparisons and swaps
- Step counter + progress tracking
- Algorithm selector (dropdown)
โถ๏ธ Play / โธ Pause animation- ๐ Speed control slider
- ๐ Step-by-step navigation
- ๐ Start sorting button
- Current operation display (comparison/swapping)
- Step counter (e.g., Step 5 of 24)
- Visual highlighting of active elements
- Big-O friendly structure (for teaching)
- React (Vite)
- Tailwind CSS
- JavaScript (ES6+)
- FastAPI
- Python 3
- Custom sorting algorithm engine
visualizer-frontend/
โโโ src/
โ โโโ components/
โ โ โโโ Visualizer.jsx
โ โ โโโ Controls.jsx
โ โ โโโ Bar.jsx
โ โ โโโ StatsPanel.jsx
โ โ โโโ ActionDisplay.jsx
โ โโโ pages/
visualizer_backend/
โโโ app/
โ โโโ api/routes/
โ โ โโโ sorting.py
โ โโโ algorithms/
โ โโโ sorting.py
โ โโโ merge_sort.py
โ โโโ quick_sort.py
cd visualizer_backend
python -m venv venv
venv\Scripts\activate # (Windows)
# source venv/bin/activate (Mac/Linux)
pip install fastapi uvicorn
uvicorn app.main:app --reloadBackend runs at:
http://127.0.0.1:8000
cd visualizer-frontend
npm install
npm run devFrontend runs at:
http://localhost:5173
| Algorithm | Endpoint |
|---|---|
| Bubble Sort | /sort/bubble |
| Merge Sort | /sort/merge |
| Quick Sort | /sort/quick |
This project demonstrates:
- Algorithm visualization techniques
- Step-based state management
- Full-stack API integration
- React component architecture
- Real-time UI updates
- Educational UX design for DSA concepts
- Pathfinding visualizer (Dijkstra, BFS, DFS)
- Array generator (random + custom input)
- Sound effects for swaps
- Comparison counter (Big-O visualization)
- Export animation as GIF/video
Built by Mayank Garg a Python + Frontend Developer focused on:
- DSA teaching tools
- Full-stack development
- Interactive learning systems
Give it a star โญ and feel free to fork it!
version: "3.9"
services:
backend:
build: ./visualizer_backend
ports:
- "8000:8000"
volumes:
- ./visualizer_backend:/app
command: uvicorn app.main:app --host 0.0.0.0 --reload
frontend:
build: ./visualizer-frontend
ports:
- "5173:5173"
volumes:
- ./visualizer-frontend:/app
command: npm run dev