Algorithms & visualization · PROJECT

RouteLab

Interactive graph route lab that runs entirely in the browser. BFS, DFS, Dijkstra, A* and Bellman-Ford over ready-made scenarios or visitor-drawn graphs, with JSON export and import. Project in active development.

The challenge

Make the behavior of classic graph path algorithms observable, comparing expansions, costs and the limits of each one.

The solution

A static lab in the browser: the visitor picks a scenario or draws their own graph, sets origin and destination and watches each algorithm work.

Main features

  • BFS, DFS, Dijkstra, A* and Bellman-Ford, each with a short explanation.
  • Ready-made scenarios: city map, expensive shortcut, negative weights, negative cycle, disconnected graph, directed with cycles and obstacle grid.
  • Custom graph editing with vertices and edges, random generation and JSON export and import.
  • Directed or undirected graphs, with weight as distance, time or cost.

Architecture

Static application in React, TypeScript and Vite, with no server and no account. All execution happens in the browser.

  1. Scenario or custom graph
  2. Chosen algorithm
  3. Browser execution
  4. Result and comparison

Decisions and lessons

  • Bellman-Ford accepts negative weights and detects reachable negative cycles; Dijkstra requires non-negative weights.
  • A* reaches the same minimum cost as Dijkstra; the expansion gain depends on the heuristic and the graph.

Scope and limitations

Educational lab with no backend, no account and no persistence outside the browser.

Availability

Source code
Public
Demo
Available
Case study
Unavailable
Status
Public site

Context and problem

Graph path algorithms show up in routing, networks and games, but their behavior stays abstract without visualization. RouteLab makes that execution observable and comparable in the browser.

How it works

  1. Scenario or custom graph
  2. Origin and destination
  3. Algorithm run
  4. Cost and expansion comparison

Business rules

  • BFS minimizes edge count and ignores weights.
  • Dijkstra and A* return the minimum cost with non-negative weights.
  • Bellman-Ford accepts negative weights and detects reachable negative cycles.

Technical challenges and solutions

  • Challenge: Showing real differences between algorithms. Solution: Ready-made scenarios that isolate each case: negative weights, negative cycle, disconnected graph and obstacles.

Security and privacy

  • Static application, no account and no data sent anywhere.
  • JSON graph import and export, local in the browser.

Tests and evidence

  • Manual validation of the ready-made scenarios and browser runs.

Lessons learned

  • The A* heuristic only helps when weights follow the graph geometry.

Current status

Public, usable site.

Documented evidence

  • Public, usable site
  • Ready-made scenarios documented in the interface itself
  • Full in-browser execution, no backend
Real capture of RouteLab.
Real capture of RouteLab.