Skip to content

jgrapht/jgrapht-algo-visualization

License License

JGraphT Algorithm Visualizations

Interactive, step-by-step visualizations of graph algorithms from JGraphT.

Live: https://algo-visualization.jgrapht.org/  ·  JGraphT  ·  Discussion (jgrapht-dev)

A small static site: a navigation homepage at / plus one self-contained HTML page per topic (no external JS, no external CSS, no build step). Each step in every animation is annotated in plain English; a per-topic glossary covers the relevant terminology.

Topics

Path Topic Algorithms
/shortest-paths/ Shortest paths Yen, Eppstein, Bounded-pruned Yen + A*, Dijkstra, A*, AllDirectedPaths with forward pruning
/hamiltonian/ Hamiltonian path Backtracking (vanilla and with connectivity / degree-1 / cut-vertex / bridge-tree / SCC condensation prechecks + MRV + reachability prune), polynomial DAG longest-path. Coming soon: Held-Karp subset DP

Each topic page reproduces the algorithms exactly as they're implemented in JGraphT.

Running

Any static file server works — there is nothing to build.

1. Open files directly (zero infra)

Open index.html in a modern browser, then click through to a topic page. Some Chromium policies disable file:// cross-directory navigation; if a link looks broken, use one of the local server options below.

2. Local Python HTTP server

python -m http.server 8080
# then visit http://localhost:8080/

3. Docker (the "deploy anywhere" option)

A ~20 MB nginx-alpine image is provided.

docker build -t jgrapht-algo-viz:latest .
docker run --rm -p 8080:8080 --name jgrapht-algo-viz jgrapht-algo-viz:latest
# then visit http://localhost:8080/

Stop it with Ctrl-C (or docker stop jgrapht-algo-viz from another shell). A docker-compose.yml is also provided (docker compose up -d). The image runs nginx as a non-root user on port 8080, has a basic healthcheck (HEAD /), no persistent volumes, no network egress.

4. GitHub Pages (canonical hosting)

The site is published from main via GitHub Pages' built-in branch source (Settings → Pages → Source: Deploy from a branchmain / / root). No build step, no workflow — every push to main is picked up by GitHub's static builder. .nojekyll is committed at the root so Jekyll is skipped.

Canonical URL: https://algo-visualization.jgrapht.org/.

Repository layout

Path Purpose
index.html Navigation homepage (cards linking to each topic).
shortest-paths/index.html The shortest-paths visualization (single self-contained HTML).
hamiltonian/index.html The Hamiltonian-path visualization (Backtracking vanilla + full and DAG longest-path live; Held-Karp coming).
favicon.ico, apple-touch-icon.png Site icons (referenced as /favicon.ico etc. from every page).
CNAME Custom-domain claim for algo-visualization.jgrapht.org.
.nojekyll Empty marker so GitHub Pages skips Jekyll.
Dockerfile, docker-compose.yml, nginx.conf, .dockerignore Self-host via nginx-alpine.
vercel.json Static-routing config for matching Vercel deployments.

Contributing

See CONTRIBUTING.md. Discussion happens on jgrapht-dev. We follow the JGraphT Code of Conduct.

License

Dual-licensed under either:

SPDX-License-Identifier: LGPL-2.1-or-later OR EPL-2.0

Matches the license terms of JGraphT itself.

About

Web visualizations of how JGraphT algorithms work

Resources

License

EPL-2.0, LGPL-2.1 licenses found

Licenses found

EPL-2.0
license-EPL.txt
LGPL-2.1
license-LGPL.txt

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors