This project is being revamped! A new version is coming soon with updated features and improvements.
This current version may soon be outdated.
Interactive web application that visualizes 7 sorting algorithms in real-time. Built with React 18 and Tailwind CSS.
Live page: https://sorting-visualization-tool.vercel.app/
Sorting-Visualization-Showcase.mp4
- 7 sorting algorithms with real-time visualization:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Radix Sort
- Bucket Sort
- Visualization Controls:
- Start/Pause/Resume sorting
- Reset array generation
- Adjustable speed (slow, medium, fast)
- Real-time step counter
- Swap and comparison counters
- Responsive Design:
- Adapts to different screen sizes
- Dynamic array size based on viewport width
- Touch-friendly controls
- Algorithm Information:
- Detailed descriptions of each algorithm
- Time and space complexity analysis
- Step-by-step pseudocode
- Comparison table of all algorithms
- Theme Support:
- Multiple color themes (purple, darkPurple, ocean, forest, sunset)
- Theme persistence across sessions
- System preference detection
- Multi-language Support:
- English and German language options
- Easy to add more languages
- Optimized Visualization:
- Smooth animations
- Efficient state management with React Context
- Abort and pause/resume functionality
- Testing:
- Comprehensive test suite with Vitest
- Component testing with React Testing Library
- Code coverage reporting
- CI/CD integration
- React 18.2.0 - Frontend library for building user interfaces
- Vite - Next Generation Frontend Tooling
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Component library for Tailwind CSS
- React Context API - For global state management
- Custom Hooks - For reusable logic
- Vitest - Fast unit testing framework
- React Testing Library - For component testing
- Codecov - Code coverage reporting
- Vite - Build tool and dev server
- GitHub Actions - CI/CD pipeline
- Vercel - Deployment platform
git clone https://github.com/aaronwittchen/Sorting-Visualization-Tool.git
cd Sorting-Visualization-Tool
npm install
npm run devOpen http://localhost:5173
- Select an algorithm
- Click "Reset" to generate new data
- Click "Start" to begin visualization
- Use speed dropdown to adjust speed
- Pause/resume as needed
- Click "?" for algorithm information
- Click the theme button to change themes
npm run dev # Development server
npm run build # Production build
npm test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportThe application includes comprehensive test coverage with a focus on reliability and maintainability:
- Unit tests for all 7 sorting algorithms
- Edge case testing
- Performance validation
- Interactive component testing
- State management testing
- Event handling verification
- Accessibility compliance
- State management integration
- Component interaction testing
- End-to-end workflow testing
src/
βββ components/ # React components
β βββ Modal/ # Algorithm information modal
β βββ Overlay.jsx # Main UI component
β βββ ThemeSelector.jsx # Theme switching component
βββ contexts/ # State management
β βββ Context.jsx # Main application context
βββ helpers/ # Algorithms and utilities
β βββ sortingAlgorithms.js # Sorting algorithm implementations
β βββ math.js # Math utilities
β βββ speedConfig.js # Animation speed configurations
βββ data/ # Algorithm descriptions
β βββ aboutAlgorithm.en.json # English algorithm info
β βββ aboutAlgorithm.de.json # German algorithm info
βββ __tests__/ # Test files
β βββ components/ # Component tests
β βββ helpers/ # Algorithm tests
βββ assets/ # Static assets