Algorithm Visualizer Playground — Next.js Final Year Project with Source Code (Sorting, Pathfinding, Graph)

Algorithm Visualizer Playground — Next.js Final Year Project with Source Code (Sorting, Pathfinding, Graph)

Watch 30+ algorithms run step by step sorting bars, A* mazes, MST graphs — in one Next.js app. A final year project with source code that your examiner can actually play with during viva.

Technology Used

Next.js 16 | React 19 | Tailwind CSS 4 | Zustand | Framer Motion | Web Workers

codeAj
codeAjVerified
🏆5K+ Projects Sold
Google Review
5991999

Get complete project source code + Installation guide + chat support

Project Files

Get Project Files

What This Project Actually Does

You pick an algorithm. You pick some data. You hit play, and the screen shows you exactly what the algorithm is doing — which two bars are being compared right now, which grid cell A* just expanded, which edge Kruskal's just added to the tree. Line by line, with the pseudocode highlighting along.

That's it. That's the whole product.

But the interesting part is how it does that. Every single algorithm in this project is written as a JavaScript generator function that yields tiny step objects — { type: "compare", indices: [i, j], line: 3 }. Nothing is hand-animated. A shared engine (lib/engine/stepEngine.js) runs the generator once, collects every step, counts the stats, and hands the stream to a reducer that turns each step into a renderable frame. So the bar chart, the grid, the node-link diagram, the stats panel, the GIF export, the quiz — all of them are reading from the same step stream.

Which means when your external examiner asks "beta, ye animation kaise bana hai, hardcoded to nahi hai?", you have an actual architectural answer instead of sweating.

Modules inside

  • Sorting — Bubble, Selection, Insertion, Shell, Merge, Quicksort with both Lomuto and Hoare partitioning, Heap, Counting, Radix, Cocktail Shaker, Gnome. Array size, distribution (random, nearly sorted, reversed, few-unique), and custom input are all adjustable.
  • Pathfinding — BFS, DFS, Dijkstra, A*, Greedy Best-First, Bidirectional BFS, Jump Point Search. On a paintable weighted grid, with recursive-backtracker maze generation and mazes you can save and reload.
  • Graph — BFS, DFS, both topological sort variants (Kahn's and DFS-based), Dijkstra, Bellman-Ford, Floyd-Warshall, Prim's, Kruskal's, Tarjan's SCC, cycle detection. Plus generators for random G(n,p), grid, complete, bipartite, tree, and DAG graphs.
  • Compare / Race mode — run 2 to 4 sorts side by side on the identical input, synced either by step count or by wall clock. There's a headless benchmark tab too that runs algorithms in a Web Worker and plots measured operation counts against the theoretical Big-O curve.
  • Learn mode — plain-English narration of what just happened, plus an inline quiz generated from the actual run you just watched.

Key Features

  • Scrub backwards through a 40,000-step Quicksort run and the timeline stays responsive — the replayer snapshots state every 500 steps, so seeking anywhere replays at most 500 steps from the nearest keyframe instead of re-running from zero.
  • Every run encodes its algorithm, dataset, and settings into the URL. Send that link to your guide over WhatsApp and they open the exact same run on their laptop.
  • Download the current run as an animated GIF, or grab a single frame as PNG — straight into your project report, no screen recorder needed.
  • Full keyboard transport: play, pause, single-step forward and back, scrub, reset. You can demo the entire thing without touching the trackpad.
  • The step engine caps runs at 200,000 steps (MAX_STEPS) and throws a readable error instead of freezing the tab when someone tries Bubble Sort on 5,000 elements.
  • Last-used settings, quiz high scores, and named custom mazes and graphs persist to localStorage between sessions.
  • Adding a twelfth sort takes one new file and one import line. Gnome Sort is the worked example — under 30 lines, and it instantly gets a picker entry, code highlighting, stats, GIF export, and Compare-mode support for free.

Real-World Applications

The obvious one is classroom teaching — a DSA lecturer running Dijkstra on the projector while students actually see the distance labels relaxing. Coding bootcamps and interview-prep platforms use exactly this kind of visual to explain why Quicksort's worst case shows up on already-sorted input.

Beyond teaching, the generator-plus-replayer pattern here is the same one used in game replay systems, undo/redo stacks in design tools, and debugger step-through UIs. If you can explain this architecture in an interview, you're explaining a pattern that shows up in real production code.

Also, honestly, it's a great portfolio piece. Recruiters open it, click play, and get it in three seconds.

Who Should Buy This

If you're a BCA or BTech CSE student in your final semester, your DSA fundamentals are decent but your React is shaky, and you need something that looks impressive in a 10-minute demo — this is your project. It photographs well. It demos well. And it has enough architectural depth that you can talk for twenty minutes about the step contract and the keyframed replayer without repeating yourself.

MCA students who want a heavier viva story: focus on the benchmark worker and the Big-O curve comparison. That's your "experimental validation" chapter, sorted.

One honest warning. The hard part of this project is not running it — it's understanding the reducer in lib/engine/stateReducer.js well enough to defend it. It's a pure function that maps a step to render state, and if you've never worked with reducers, budget an evening with it. The easy part, which surprises most students, is extending it: open lib/algorithms/sorting/gnome.js, copy the shape, write your own sort, register it in the index file. Done. No engine changes, no canvas changes, nothing.

Skip this one if your college specifically demands a database-backed CRUD project with login and admin panel. There's no backend here. It's a pure frontend engine, deliberately — and some guides don't like that. Check first.

Why CodeAj

You get the complete source, a college-format project report you can adapt to your university's template, and the architecture explanation written out so you're not reverse-engineering your own submission the night before viva. If npm install throws something weird or Node version fights with Next.js 16, message us and we'll get it running on your machine — the project setup service exists exactly for that. Browse more Next.js projects with source code if you want to compare, or look through the wider BTech CSE final year projects collection to see what pairs well with this in a group submission.

Frequently Asked Questions

You will get the complete source code along with an installation guide and chat support to help you set up and understand the project.
All our projects are thoroughly tested multiple times, so the code is completely error-free. But in case you still face any issue, you can reach out to us on WhatsApp (+91 8603862290) and we will fix it and provide you the updated code.
You can book a 1-on-1 Setup & Explanation Session where we connect via AnyDesk and Google Meet, set up the project on your laptop, and explain the complete code working and flow.
No, you cannot re-sell the project. This is completely illegal and a violation of our terms. If we find any such activity, we will take legal action.
Nope. Zero backend. No MySQL, no MongoDB, no .env file with database credentials. Everything runs in the browser, and your saved mazes, graphs and quiz scores go into localStorage. So the only thing standing between you and a running project is npm install.
31 total. 11 sorts (Bubble, Selection, Insertion, Shell, Merge, Quicksort with both Lomuto and Hoare partitioning, Heap, Counting, Radix, Cocktail Shaker, Gnome), 7 pathfinding ones (BFS, DFS, Dijkstra, A*, Greedy Best-First, Bidirectional BFS, Jump Point Search) and 13 graph algorithms including Bellman-Ford, Floyd-Warshall, Prim's, Kruskal's, Tarjan's SCC and cycle detection.
Yeah, and this is the part your guide will like. Write a generator function that yields step objects like { type: 'compare', indices: [i, j], line: 3 }, drop it in lib/algorithms/sorting/, and add one import line to index.js. That's it. Gnome Sort in gnome.js is the worked example and it's under 30 lines. It automatically shows up in the picker, gets stats, code highlighting, GIF export and Compare mode support.
Complete. Every component, the whole lib/engine folder, the benchmark worker, the narration and quiz generators, the Tailwind config, all of it. We don't ship stripped builds or minified files.
It works fine for BCA, BSc IT, BTech CSE and MCA. The reason it holds up is the architecture, not the feature count. When your examiner asks how the animation works, you explain the step contract and the keyframed replayer, and that's a genuinely non-trivial answer. The one thing to check first is whether your department insists on a login system and admin panel. Some colleges do. This project has neither, by design.
Node.js 20 or newer and npm. That's the whole list. Next.js 16 will complain if you're on an older Node, so check with node -v before you start. A code editor helps obviously, VS Code is fine.
Yes, college-format report with abstract, literature survey, system architecture, module breakdown, testing section and conclusion. You'll still need to swap in your university's cover page, roll number and guide name, but the content is done.
Message us and we'll get on a call. Most failures are one of three things: old Node version, port 3000 already occupied by something else, or a half-finished npm install from a bad connection. All three take five minutes to fix. The setup service is there if you'd rather someone just do it for you.
Installation Guide

Extra Add-Ons Available – Elevate Your Project

Add any of these professional upgrades to save time and impress your evaluators.

Project Setup

We'll install and configure the project on your PC via remote session (Google Meet, Zoom, or AnyDesk).

Source Code Explanation

1-hour live session to explain logic, flow, database design, and key features.

Want to know exactly how the setup works? Review our detailed step-by-step process before scheduling your session.

999

Custom Documents (College-Tailored)

  • Custom Project Report: ₹1,500
  • Custom Research Paper: ₹1,000
  • Custom PPT: ₹800

Fully customized to match your college format, guidelines, and submission standards.

Project Modification

Need feature changes, UI updates, or new features added?

Charges vary based on complexity.

We'll review your request and provide a clear quote before starting work.

Project Files

GoogleReviews

What Our Students Say

4.9(38+ reviews)
Google review 1
Google review 2
Google review 3
Google review 4
Google review 5
Google review 6
Google review 7
Google review 8
Google review 9
Google review 10
Google review 11
Google review 12
Google review 13
Google review 14
Google review 15
Google review 16
Google review 17
Google review 18
Google review 19
Google review 20
Google review 21
Google review 22
Google review 23
Google review 24
Google review 25
Google review 26
Google review 27
Google review 28
Google review 29
Google review 30
Google review 31
Google review 32
Google review 33
Google review 34
Google review 35
Google review 36
Google review 37
Google review 38
⭐ 98% SUCCESS RATE
  • Full Development
  • Documentation
  • Presentation Prep
  • 24/7 Support
Chat with us