# jonwheatley/pixel-path architecture

> Architecture diagram of the GitHub repository jonwheatley/pixel-path, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jonwheatley/pixel-path
- Repository: https://github.com/jonwheatley/pixel-path

## Overview

Pixel Path is a Claude Code skill and Node-based pipeline for turning a real-world road into a pixel-art fly-through. The principal workflow routes named places, bakes map and elevation data, plans and produces scenery art, then installs a static viewer. The viewer renders streamed road chunks using shared layout logic; a self-check audits layout and screenshots. README-described capabilities include code-drawn signs, landmarks, varied terrain, and interactive travel controls. Edges reflect shown calls or README statements; the bake’s detailed data sources and some art-stage wiring are not fully excerpted.

Main entry points: [`scripts/route.mjs`](https://github.com/jonwheatley/pixel-path/blob/main/scripts/route.mjs) (Geocode and route), [`scripts/bake.mjs`](https://github.com/jonwheatley/pixel-path/blob/main/scripts/bake.mjs) (Map and terrain bake), [`templates/layout.js`](https://github.com/jonwheatley/pixel-path/blob/main/templates/layout.js) (Roadside layout), [`scripts/check.mjs`](https://github.com/jonwheatley/pixel-path/blob/main/scripts/check.mjs) (Route and art audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Route planning"]
  node_route["Geocode and route<br/>[route.mjs]"]
end

subgraph group_world["World baking"]
  node_bake["Map and terrain bake<br/>[bake.mjs]"]
  node_tripdata[("Route data")]
end

subgraph group_art["Scenery art"]
  node_artplan["Art-kit planning<br/>[plan-art.mjs]"]
  node_kitrecipes["Kit recipes and levels<br/>[kit.mjs]"]
  node_placeholders["Placeholder art"]
  node_rd["Art generation<br/>[rd.mjs]"]
  node_cleanup["Art cleanup<br/>[clean.mjs]"]
  node_kitdata[("Art kit data")]
end

subgraph group_runtime["Fly-through viewer"]
  node_layout["Roadside layout<br/>[layout.js]"]
  node_road["Road renderer<br/>[road.js]"]
  node_viewer["Static viewer install<br/>[viewer.mjs]"]
  node_traveleresult["Interactive fly-through"]
end

subgraph group_review["Self-check"]
  node_check["Route and art audit<br/>[check.mjs]"]
end

node_traveler(("Route requester"))
node_nominatim{{"Nominatim"}}
node_osrm{{"OSRM routing"}}
node_terrain{{"Terrain Tiles"}}
node_osm{{"OpenStreetMap services"}}
node_retro{{"RetroDiffusion"}}

node_traveler -->|"requests route"| node_route
node_route -->|"geocodes places"| node_nominatim
node_route -->|"fetches route"| node_osrm
node_route -->|"provides route"| node_bake
node_bake -->|"writes map data"| node_tripdata
node_bake -->|"fetches elevation"| node_terrain
node_bake -.->|"fetches map features"| node_osm
node_tripdata -->|"informs art plan"| node_artplan
node_artplan -->|"uses recipes"| node_kitrecipes
node_artplan -->|"writes plan"| node_kitdata
node_kitdata -.->|"supplies plan"| node_placeholders
node_kitdata -->|"supplies jobs"| node_rd
node_rd -->|"generates pictures"| node_retro
node_cleanup -->|"updates art kit"| node_kitdata
node_kitdata -.->|"provides pictures"| node_layout
node_tripdata -->|"provides chunks"| node_layout
node_layout -->|"builds chunks"| node_road
node_viewer -->|"installs viewer"| node_traveleresult
node_road -->|"renders drive"| node_traveleresult
node_check -->|"installs for audit"| node_viewer
node_check -->|"audits layout"| node_layout
node_check -->|"checks screenshots"| node_road

click node_route "https://github.com/jonwheatley/pixel-path/blob/main/scripts/route.mjs"
click node_bake "https://github.com/jonwheatley/pixel-path/blob/main/scripts/bake.mjs"
click node_artplan "https://github.com/jonwheatley/pixel-path/blob/main/scripts/plan-art.mjs"
click node_kitrecipes "https://github.com/jonwheatley/pixel-path/blob/main/scripts/kit.mjs"
click node_placeholders "https://github.com/jonwheatley/pixel-path/blob/main/scripts/placeholder-art.mjs"
click node_rd "https://github.com/jonwheatley/pixel-path/blob/main/scripts/rd.mjs"
click node_cleanup "https://github.com/jonwheatley/pixel-path/blob/main/scripts/clean.mjs"
click node_layout "https://github.com/jonwheatley/pixel-path/blob/main/templates/layout.js"
click node_road "https://github.com/jonwheatley/pixel-path/blob/main/templates/road.js"
click node_viewer "https://github.com/jonwheatley/pixel-path/blob/main/scripts/viewer.mjs"
click node_check "https://github.com/jonwheatley/pixel-path/blob/main/scripts/check.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_route toneBlue
class node_bake,node_tripdata toneAmber
class node_artplan,node_kitrecipes,node_placeholders,node_rd,node_cleanup,node_kitdata,node_traveler toneMint
class node_layout,node_road,node_viewer,node_traveleresult toneRose
class node_check,node_nominatim,node_osrm,node_terrain,node_osm,node_retro toneIndigo
```

## Components

### Route planning

- [Geocode and route](https://github.com/jonwheatley/pixel-path/blob/main/scripts/route.mjs): `scripts/route.mjs`

### World baking

- [Map and terrain bake](https://github.com/jonwheatley/pixel-path/blob/main/scripts/bake.mjs): `scripts/bake.mjs`
- **Route data**

### Scenery art

- [Art-kit planning](https://github.com/jonwheatley/pixel-path/blob/main/scripts/plan-art.mjs): `scripts/plan-art.mjs`
- [Kit recipes and levels](https://github.com/jonwheatley/pixel-path/blob/main/scripts/kit.mjs): `scripts/kit.mjs`
- [Placeholder art](https://github.com/jonwheatley/pixel-path/blob/main/scripts/placeholder-art.mjs): `scripts/placeholder-art.mjs`
- [Art generation](https://github.com/jonwheatley/pixel-path/blob/main/scripts/rd.mjs): `scripts/rd.mjs`
- [Art cleanup](https://github.com/jonwheatley/pixel-path/blob/main/scripts/clean.mjs): `scripts/clean.mjs`
- **Art kit data**

### Fly-through viewer

- [Roadside layout](https://github.com/jonwheatley/pixel-path/blob/main/templates/layout.js): `templates/layout.js`
- [Road renderer](https://github.com/jonwheatley/pixel-path/blob/main/templates/road.js): `templates/road.js`
- [Static viewer install](https://github.com/jonwheatley/pixel-path/blob/main/scripts/viewer.mjs): `scripts/viewer.mjs`
- **Interactive fly-through**

### Self-check

- [Route and art audit](https://github.com/jonwheatley/pixel-path/blob/main/scripts/check.mjs): `scripts/check.mjs`

### Other components

- **Route requester**
- **Nominatim**
- **OSRM routing**
- **Terrain Tiles**
- **OpenStreetMap services**
- **RetroDiffusion**

## Connections

- Route requester → Geocode and route: requests route (evidence: `README.md`)
- Geocode and route → Nominatim: geocodes places (evidence: `scripts/route.mjs`)
- Geocode and route → OSRM routing: fetches route (evidence: `scripts/route.mjs`)
- Geocode and route → Map and terrain bake: provides route (evidence: `README.md`)
- Map and terrain bake → Route data: writes map data (evidence: `scripts/bake.mjs`)
- Map and terrain bake → Terrain Tiles: fetches elevation (evidence: `scripts/bake.mjs`)
- Map and terrain bake → OpenStreetMap services: fetches map features
- Route data → Art-kit planning: informs art plan (evidence: `scripts/plan-art.mjs`)
- Art-kit planning → Kit recipes and levels: uses recipes (evidence: `scripts/plan-art.mjs`)
- Art-kit planning → Art kit data: writes plan (evidence: `scripts/plan-art.mjs`)
- Art kit data → Placeholder art: supplies plan
- Art kit data → Art generation: supplies jobs (evidence: `scripts/rd.mjs`)
- Art generation → RetroDiffusion: generates pictures (evidence: `scripts/rd.mjs`)
- Art cleanup → Art kit data: updates art kit (evidence: `scripts/clean.mjs`)
- Art kit data → Roadside layout: provides pictures
- Route data → Roadside layout: provides chunks
- Roadside layout → Road renderer: builds chunks (evidence: `templates/road.js`)
- Static viewer install → Interactive fly-through: installs viewer (evidence: `scripts/viewer.mjs`)
- Road renderer → Interactive fly-through: renders drive (evidence: `README.md`)
- Route and art audit → Static viewer install: installs for audit (evidence: `scripts/check.mjs`)
- Route and art audit → Roadside layout: audits layout (evidence: `scripts/check.mjs`)
- Route and art audit → Road renderer: checks screenshots (evidence: `scripts/check.mjs`)
