About this template
An interactive computer-science monograph and sandbox showing how maps and games find shortest paths. Paint Walls, Mud (cost 3), and Water (cost 6), toggle between Square Grid and Hex Grid, drag Start and Goal pins, and run BFS, Dijkstra, Greedy Best-First, and A* individually or side-by-side with step controls, frontier teal (#2BB3A3) and visited lavender (#B9A7FF) heatmaps, glowing orange paths (#FF7A1A), live explored-node and path-cost counters, and live line-highlighted pseudocode. Includes dedicated views for Heuristics Compared (Manhattan, Euclidean, Chebyshev), a Recursive Maze Generator, and Weighted Routing on a Code-Drawn City Road Map.
The template prompt
The live demo was built from exactly this text — nothing added.
# Pathfinding Algorithms Visualizer
Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.
## Brief
Build an interactive pathfinding algorithms visualizer titled [BRAND] ([SUBTITLE]) on warm off-white paper (#FAFAF7) with crisp ink (#1F2430), frontier teal (#2BB3A3), visited lavender (#B9A7FF), and glowing route orange (#FF7A1A). Frame 1 opens directly onto a live pre-solved A* path across a clean interactive grid with an obvious mud/water/wall obstacle layout so visitors immediately see the frontier, visited heatmap, and glowing orange route. Provide four hash-routed views synced to window.location.hash: (1) #/sandbox — Interactive Square Grid + Hex Grid toggle, brush tools (Wall, Mud cost 3, Water cost 6, Erase), draggable Start & Goal pins, algorithm selector (BFS, Dijkstra, Greedy Best-First, A*), Side-by-Side Comparison mode running two algorithms in lockstep on the exact same map, Play/Pause/Step/Reset/Speed controls, live Nodes Explored & Path Cost counters, and an Algorithm Explainer with live line-highlighted pseudocode; (2) #/heuristics — Interactive side-by-side comparison of Manhattan, Euclidean, and Chebyshev distance heuristics with selectable weight multipliers; (3) #/maze — Recursive Backtracker, Prim's, and Random Weighted Terrain Maze Generators feeding directly into the live solver; (4) #/city — Weighted A* vs Dijkstra routing on a procedural code-drawn SVG road map of fictional city [CITY_NAME] with clickable street intersections, live congestion toggles, and turn-by-turn edge distance totals.
- Audience: Computer science students, game developers, algorithm educators, and curious builders.
- Goal: Make graph search algorithms visually unforgettable by letting learners paint weighted terrain, drag pins, step line-by-line through live pseudocode, and compare algorithms side by side.
- Tone: Lucid, tactile academic notebook—clean drafting clarity with crisp mathematical precision.
## Stack
- Framework: Vite 6 + React 18 + TypeScript
- Styling: Tailwind CSS 4
- Libraries: lucide-react (ISC), @fontsource/plus-jakarta-sans (OFL-1.1), @fontsource/inter (OFL-1.1), @fontsource/jetbrains-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
- Set base: './' and build: { sourcemap: false } in vite.config.ts.
- Import @fontsource/plus-jakarta-sans (600, 700), @fontsource/inter (400, 500, 600), and @fontsource/jetbrains-mono (400, 500, 600) in src/main.tsx.
- Sync the 4 top-level views (#/sandbox, #/heuristics, #/maze, #/city) bidirectionally with window.location.hash on mount and hashchange.
- Implement deterministic step-recording engines for BFS, Dijkstra, Greedy Best-First, and A* supporting both 4-neighbor Square Grids and 6-neighbor Offset Hex Grids in src/engine/pathfinding.ts.
## Variables
- [BRAND] — Lab Name (default: "GraphCraft Lab"). Interactive pathfinding visualizer title
- [SUBTITLE] — Subtitle (default: "How Maps & Games Find the Shortest Route"). Short header subtitle
- [CITY_NAME] — Fictional City Map Name (default: "Northbridge"). Name of the code-drawn city road network in the City Map tab
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/pathfinding-algorithms-visualizer in the footer (default: yes; delete this line to remove it)
The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.
## Design
### Colors
- Drafting Paper `#FAFAF7` — Primary background surface
- Ink Slate `#1F2430` — Primary typography, borders, and wall cells
- Frontier Teal `#2BB3A3` — Active open-set frontier nodes
- Visited Lavender `#B9A7FF` — Closed-set explored heatmap nodes
- Route Orange `#FF7A1A` — Final shortest path glow and primary action accent
### Typography
- Display Title & Section Headings: Plus Jakarta Sans (OFL), weights 600/700
- Explanatory Prose & Controls: Inter (OFL), weights 400/500/600
- Pseudocode, Coordinates & Counters: JetBrains Mono (OFL), weights 400/500/600
### Layout & motion
- Spacing: Crisp top workbench navigation + compact toolbar + responsive 12-col workspace pairing the interactive grid/hex canvas beside live metrics and line-highlighted pseudocode.
- Radius: 12px crisp drafting cards with 1px ink/12 hairlines; tactile pill buttons for brushes and algorithm selectors.
- Motion: Smooth step-by-step expansion wave showing frontier teal cells turning into visited lavender and tracing the glowing orange shortest path.
- Motion: Instant recomputation when dragging Start/Goal pins or painting walls, mud, and water.
- Motion: Live line highlighting inside the pseudocode block synced to the current algorithm step.
- Imagery: 100% procedural SVG & Canvas interactive grids, hexagonal tiles, generated mazes, and code-drawn city road network.
## Pages & Sections
### [BRAND] · Grid & Hex Sandbox (`#/sandbox`)
1. **Interactive Grid / Hex Visualizer & Side-by-Side Comparison** — Paint Walls, Mud (cost 3), Water (cost 6), or Clear; drag Start and Goal pins; switch between Square Grid and Hex Grid; run BFS, Dijkstra, Greedy Best-First, or A* individually or in Side-by-Side Comparison mode; scrub Step / Play / Pause / Speed; monitor live Nodes Explored, Frontier Size, and Path Cost counters.
Layout: Full workbench width with toolbar on top, interactive grid/hex stage on left (or twin split grids in Compare mode), and live Algorithm Explainer + line-highlighted pseudocode card on right.
Motion: Animated frontier expansion and instant pin-drag route updates.
### [BRAND] · Heuristics Compared (`#/heuristics`)
1. **Manhattan vs Euclidean vs Chebyshev Distance Explorer** — Side-by-side comparison of heuristic metrics and heuristic weight (1.0× admissible vs 2.0× weighted greedy) on an obstacle field, showing exact formula readouts, explored-node reductions, and path optimality tradeoffs.
Layout: Three synchronized mini-grid visualizers with shared obstacle preset and heuristic weight slider.
Motion: Synchronized step playback across all three heuristics.
### [BRAND] · Maze Generator (`#/maze`)
1. **Procedural Maze & Terrain Generator** — Generate Recursive Backtracker labyrinths, Prim's branching corridors, or Weighted River & Marsh landscapes with one click, watch maze carving step-by-step or instant, and immediately race A* vs BFS through the generated maze.
Layout: Control strip + large interactive generated maze canvas with live solver stats.
Motion: Animated maze solving wave.
### [BRAND] · City Road Map Routing (`#/city`)
1. **Code-Drawn City Road Network of [CITY_NAME]** — Interactive SVG street network for fictional city [CITY_NAME] featuring river bridges, avenues, and intersections. Click any intersection to set Start or Destination, toggle bridge traffic congestion (3× travel weight), and watch A* vs Dijkstra compute the fastest route with live travel time and explored intersection markers.
Layout: Split map canvas + intersection/route inspector panel.
Motion: Animated intersection exploration and highlighted orange street route.
## Assets
- font: Install @fontsource/plus-jakarta-sans, @fontsource/inter, and @fontsource/jetbrains-mono via npm.
## Don'ts
- Never open on a blank empty grid — frame 1 must show a pre-solved weighted obstacle map with teal frontier, lavender visited nodes, and a clear orange route.
- Never reference real-world websites, authors, or copyrighted map tiles.
- Never display calendar dates or 4-digit years on the frontend.
---
— Prompt by VibeFather · https://vibefather.ai/t/pathfinding-algorithms-visualizer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
Free for personal projects under CC BY-NC 4.0. Commercial use comes with Pro.
DESIGN.md
The design system on its own — colors, type, spacing and motion. Apply this look to a project you already have.
---
name: "Pathfinding Algorithms Visualizer"
colors:
drafting_paper: "#FAFAF7"
ink_slate: "#1F2430"
frontier_teal: "#2BB3A3"
visited_lavender: "#B9A7FF"
route_orange: "#FF7A1A"
typography:
display_title_section_headings: { family: "Plus Jakarta Sans", weights: [600, 700] }
explanatory_prose_controls: { family: "Inter", weights: [400, 500, 600] }
pseudocode_coordinates_counters: { family: "JetBrains Mono", weights: [400, 500, 600] }
spacing: "Crisp top workbench navigation + compact toolbar + responsive 12-col workspace pairing the interactive grid/hex canvas beside live metrics and line-highlighted pseudocode."
radius: "12px crisp drafting cards with 1px ink/12 hairlines; tactile pill buttons for brushes and algorithm selectors."
---
# Pathfinding Algorithms Visualizer — Design System
Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.
## Colors
- **Drafting Paper** `#FAFAF7` — Primary background surface
- **Ink Slate** `#1F2430` — Primary typography, borders, and wall cells
- **Frontier Teal** `#2BB3A3` — Active open-set frontier nodes
- **Visited Lavender** `#B9A7FF` — Closed-set explored heatmap nodes
- **Route Orange** `#FF7A1A` — Final shortest path glow and primary action accent
## Typography
- **Display Title & Section Headings** — Plus Jakarta Sans (OFL), weights 600/700. Self-host the font files.
- **Explanatory Prose & Controls** — Inter (OFL), weights 400/500/600. Self-host the font files.
- **Pseudocode, Coordinates & Counters** — JetBrains Mono (OFL), weights 400/500/600. Self-host the font files.
## Spacing & shape
- Spacing: Crisp top workbench navigation + compact toolbar + responsive 12-col workspace pairing the interactive grid/hex canvas beside live metrics and line-highlighted pseudocode.
- Radius: 12px crisp drafting cards with 1px ink/12 hairlines; tactile pill buttons for brushes and algorithm selectors.
## Motion
- Smooth step-by-step expansion wave showing frontier teal cells turning into visited lavender and tracing the glowing orange shortest path.
- Instant recomputation when dragging Start/Goal pins or painting walls, mud, and water.
- Live line highlighting inside the pseudocode block synced to the current algorithm step.
## Imagery
100% procedural SVG & Canvas interactive grids, hexagonal tiles, generated mazes, and code-drawn city road network.
## Tone
Lucid, tactile academic notebook—clean drafting clarity with crisp mathematical precision.
---
— Prompt by VibeFather · https://vibefather.ai/t/pathfinding-algorithms-visualizer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
Make it yours
- A university algorithms course: set [BRAND] to the module name and [SUBTITLE] to the week's topic, then paint obstacle presets that match each lecture's exercise.
- A game studio onboarding deck: rename [BRAND] to your studio and use the Square Grid sandbox to show how A* handles weighted terrain in your level design.
- A coding bootcamp demo day: set [CITY_NAME] to your city and use the road map view to walk visitors through A* versus Dijkstra on a familiar street network.
- An educator's classroom page: keep the Maze view as a warm-up, then have students compare Manhattan and Euclidean heuristics on the same obstacle field.
Pathfinding Algorithms Visualizer: questions and answers
Is the Pathfinding Algorithms Visualizer template free to use?
The Pathfinding Algorithms Visualizer template is free for personal, non-commercial use under CC BY-NC 4.0. The prompt and every DESIGN.md are free to read and adapt for learning. Commercial or client work, including source code of the demos, needs a VibeFather Pro license. You can install it with the VibeFather CLI command and start editing the four views right away.
What can I change first in the Pathfinding Algorithms Visualizer template to make it my own?
Start with the four variables: set [BRAND] to your lab or course name, [SUBTITLE] to the question your site answers, and [CITY_NAME] to the fictional city used in the road map view. Then rewrite the headlines and explainer copy for your audience. The grid, hex, maze and city views keep their layout and colors, so the fastest path to a distinct site is new copy and new obstacle presets.
How do I add a wine club signup to a winery website built with AI?
This page is about the Pathfinding Algorithms Visualizer, not a winery site. The template has no signup form or mailing list section, so a wine club form would need to be added separately. If you want a winery site, look at the winery and restaurant templates on VibeFather instead. For this template, the useful edits are the four views, the brush costs and the algorithm labels.
Which pathfinding algorithms does the Pathfinding Algorithms Visualizer template demonstrate?
The Pathfinding Algorithms Visualizer template demonstrates BFS, Dijkstra, Greedy Best-First and A*, each runnable alone or in Side-by-Side Comparison mode on the same map. The Heuristics Compared view adds Manhattan, Euclidean and Chebyshev distance with selectable weight multipliers. The Maze view generates Recursive Backtracker, Prim's and weighted terrain mazes, and the City view races A* against Dijkstra on a code-drawn road network.
How do I turn the Pathfinding Algorithms Visualizer into a teaching tool for a computer science course?
Set [BRAND] to your course or department name, [SUBTITLE] to the lecture topic, and [CITY_NAME] to a fictional place your students will recognize. Use the sandbox to paint walls, mud at cost 3 and water at cost 6, then step through the line-highlighted pseudocode while students predict the next frontier. The maze and city views give you ready-made exercises on weighted search and heuristic choice.
How do I build a pathfinding algorithms visualizer with AI?
Copy the prompt from this page or run npx vibefather add pathfinding-algorithms-visualizer, replace the variables with your own content, and paste it into Claude Code, Codex, Cursor or another AI coding agent. The live demo was built from exactly that text.
Which AI model built the Pathfinding Algorithms Visualizer demo?
The GraphCraft Lab (Square & Hex Edition) case was built by Gemini 4 Neon in Antigravity. Each build used the published prompt with nothing added.
What tech stack and pages does the Pathfinding Algorithms Visualizer template use?
Pathfinding Algorithms Visualizer is a 4-page site built with React, Tailwind CSS and Typescript, with micro-interactions and interactive canvas. The prompt fixes the stack so every AI tool builds the same kind of project, and the result runs as a static site you can host anywhere.
Can I use the Pathfinding Algorithms Visualizer template for a client or a business?
The Pathfinding Algorithms Visualizer prompt and DESIGN.md are free for personal, non-commercial projects under CC BY-NC 4.0. Client work and commercial use need VibeFather Pro, which also includes the source code of the live demo.
Does the Pathfinding Algorithms Visualizer template work on mobile?
Yes. Every Pathfinding Algorithms Visualizer build was tested on a phone-sized screen as well as desktop before it went live, checking layout, text size and touch targets. Open the live demo on your phone, or switch the preview on this page to mobile view, to check it yourself.