Skip to content

yuvrajkarna2717/Sorting_Visualizer

Repository files navigation

Sorting Visualizer 🌀

An interactive visual tool to learn and explore sorting algorithms like Quick Sort, Merge Sort, Bubble Sort, and more — powered by React, TypeScript, and Vite.

Sorting Visualizer Preview

✨ Features

  • Visualize popular sorting algorithms in real-time
  • Beautiful animated transitions and color-coded states
  • Responsive design with a stunning UI using TailwindCSS
  • Algorithm statistics (e.g., total runs, elements sorted, most used)
  • Built with Vite for fast development experience
  • SEO-optimized meta tags and Open Graph sharing
  • GitHub and LinkedIn links included

🚀 Live Demo

👉 Live App

📦 Tech Stack

  • ⚛️ React 18
  • ⛓ TypeScript
  • ⚡ Vite
  • 💅 TailwindCSS
  • 📊 Custom Stats API with Node.js + Express
  • 🔍 SEO-ready with meta tags and OG images

🛠️ Getting Started

1. Clone the repository

git clone https://github.com/your-username/sorting-visualizer.git
cd sorting-visualizer

2. Install dependencies

npm install
# or
yarn install
# or
pnpm install

💡 Make sure you have Node.js (>=18) installed for best compatibility.


3. Run the development server

npm run dev

The app will start locally at http://localhost:5173. You can now interact with the visualizer in real-time and tweak animations or algorithms.


4. Build for production

npm run build

This creates an optimized production build inside the dist/ folder — ready to deploy.


5. Preview production build (optional)

npm run preview

Preview your optimized build before deployment.


📈 Stats Tracking (Optional API)

If you enable the Stats API (Node.js + Express backend):

  • Tracks user interactions like:

    • Total sorting runs
    • Average array size
    • Most-used algorithm
  • The API exposes endpoints like:

  • You can connect it to MongoDB / SQLite for persistence.

If you don’t need stats, the visualizer works entirely client-side.


💅 Customization

  • 🎨 Edit colors and sizes in tailwind.config.js
  • ⚙️ Change animation speed in config/constants.ts
  • 🧩 Modify array generation logic in utils/generateArray.ts

🤝 Contributing

Contributions are always welcome!

  1. Fork the repository

  2. Create your feature branch

    git checkout -b feature/new-algorithm
  3. Commit your changes

    git commit -m "Added heap sort visualization"
  4. Push and open a pull request 🚀


🧾 License

This project is licensed under the MIT License — feel free to use, modify, and share.


🧑‍💻 Author

Yuvraj Karna 🔗 LinkedIn 💻 GitHub


About

The Sorting Visualizer is an interactive web-based tool that visually demonstrates how popular sorting algorithms work in real-time. It animates the step-by-step process of sorting an array, helping users intuitively understand the behavior and efficiency of different algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors