# sfazailhaider/fifa-sustainability-hackathon architecture

> Architecture diagram of the GitHub repository sfazailhaider/fifa-sustainability-hackathon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sfazailhaider/fifa-sustainability-hackathon
- Repository: https://github.com/sfazailhaider/fifa-sustainability-hackathon

## Overview

Houston Route Comparison is a browser app for comparing routes by travel mode and Houston-specific comfort, sustainability, and exposure measures. The user selects endpoints and a mode; the app obtains road or METRO itineraries, enriches and scores candidates, then presents directions and route profiles. Additional branches cover demand, economic and priority layers, and scenario analysis. The graph follows documented capabilities, indexed module references, and shown calls; some unsampled UI wiring is therefore omitted or marked unverified.

Main entry points: [`js/app.js`](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/app.js) (Map and comparison UI), [`js/scoring.js`](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/scoring.js) (Route scoring), [`js/places.js`](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/places.js) (Place search), [`js/routing.js`](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/routing.js) (Road route candidates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Route experience"]
  node_app["Map and comparison UI<br/>[app.js]"]
  node_directions["Turn directions<br/>[directions.js]"]
  node_profile["Route profile<br/>[profile.js]"]
  node_sheet["Results sheet<br/>[sheet.js]"]
end

subgraph group_routing["Routing and places"]
  node_places["Place search<br/>[places.js]"]
  node_aliases["Place aliases<br/>[aliases.js]"]
  node_roadrouting["Road route candidates<br/>[routing.js]"]
  node_transit["METRO trip planning<br/>[transit.js]"]
end

subgraph group_analysis["Route analysis"]
  node_scoring["Route scoring<br/>[scoring.js]"]
  node_greenspace["Green and shade data<br/>[greenspace.js]"]
  node_water["Water access<br/>[water.js]"]
  node_walkability["Walkability surface<br/>[walkability.js]"]
end

subgraph group_context["Houston context"]
  node_economy["Economic intensity<br/>[economy.js]"]
  node_demand["Demand estimates<br/>[demand.js]"]
  node_priority["Priority sites<br/>[priority.js]"]
  node_scenario["Scenario analysis<br/>[scenario.js]"]
  node_weather["Heat and air quality<br/>[weather.js]"]
end

subgraph group_support["Shared foundations"]
  node_geo["Geometry toolkit<br/>[geo.js]"]
  node_config["App configuration<br/>[config.js]"]
end

node_traveler(("Traveler"))
node_osrm{{"OSRM"}}
node_transitous{{"Transitous router"}}
node_overpass{{"Overpass API"}}
node_geocoders{{"Photon and Nominatim"}}
node_openmeteo{{"Open-Meteo"}}
node_datafiles["Bundled data layers"]

node_traveler -->|"sets trip"| node_app
node_app -->|"resolves places"| node_places
node_places -->|"matches aliases"| node_aliases
node_places -->|"searches and geocodes"| node_geocoders
node_app -->|"requests road routes"| node_roadrouting
node_roadrouting -->|"fetches candidates"| node_osrm
node_app -->|"plans transit"| node_transit
node_transit -->|"requests itineraries"| node_transitous
node_roadrouting -->|"measures detours"| node_geo
node_app -->|"scores routes"| node_scoring
node_scoring -->|"measures green cover"| node_greenspace
node_scoring -->|"finds water stops"| node_water
node_scoring -->|"samples surface"| node_walkability
node_scoring -->|"samples geometry"| node_geo
node_greenspace -->|"fetches map features"| node_overpass
node_app -->|"builds directions"| node_directions
node_directions -->|"scores steps"| node_scoring
node_app -->|"renders profile"| node_profile
node_app -.->|"updates results"| node_sheet
node_app -->|"loads conditions"| node_weather
node_weather -->|"fetches forecasts"| node_openmeteo
node_app -.->|"loads context"| node_economy
node_app -.->|"loads estimates"| node_demand
node_app -->|"loads sites"| node_priority
node_app -.->|"supports scenarios"| node_scenario
node_app -.->|"uses data layers"| node_datafiles
node_app -.->|"reads settings"| node_config

click node_app "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/app.js"
click node_directions "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/directions.js"
click node_profile "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/profile.js"
click node_sheet "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/sheet.js"
click node_places "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/places.js"
click node_aliases "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/aliases.js"
click node_roadrouting "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/routing.js"
click node_transit "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/transit.js"
click node_scoring "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/scoring.js"
click node_greenspace "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/greenspace.js"
click node_water "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/water.js"
click node_walkability "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/walkability.js"
click node_economy "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/economy.js"
click node_demand "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/demand.js"
click node_priority "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/priority.js"
click node_scenario "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/scenario.js"
click node_weather "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/weather.js"
click node_geo "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/geo.js"
click node_config "https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/config.js"
click node_datafiles "https://github.com/sfazailhaider/fifa-sustainability-hackathon/tree/main/data"

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_app,node_directions,node_profile,node_sheet toneBlue
class node_places,node_aliases,node_roadrouting,node_transit toneAmber
class node_scoring,node_greenspace,node_water,node_walkability,node_transitous,node_overpass toneMint
class node_economy,node_demand,node_priority,node_scenario,node_weather toneRose
class node_geo,node_config,node_traveler,node_osrm,node_geocoders,node_openmeteo toneIndigo
class node_datafiles toneTeal
```

## Components

### Route experience

- [Map and comparison UI](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/app.js): `js/app.js`
- [Turn directions](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/directions.js): `js/directions.js`
- [Route profile](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/profile.js): `js/profile.js`
- [Results sheet](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/sheet.js): `js/sheet.js`

### Routing and places

- [Place search](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/places.js): `js/places.js`
- [Place aliases](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/aliases.js): `js/aliases.js`
- [Road route candidates](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/routing.js): `js/routing.js`
- [METRO trip planning](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/transit.js): `js/transit.js`

### Route analysis

- [Route scoring](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/scoring.js): `js/scoring.js`
- [Green and shade data](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/greenspace.js): `js/greenspace.js`
- [Water access](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/water.js): `js/water.js`
- [Walkability surface](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/walkability.js): `js/walkability.js`

### Houston context

- [Economic intensity](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/economy.js): `js/economy.js`
- [Demand estimates](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/demand.js): `js/demand.js`
- [Priority sites](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/priority.js): `js/priority.js`
- [Scenario analysis](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/scenario.js): `js/scenario.js`
- [Heat and air quality](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/weather.js): `js/weather.js`

### Shared foundations

- [Geometry toolkit](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/geo.js): `js/geo.js`
- [App configuration](https://github.com/sfazailhaider/fifa-sustainability-hackathon/blob/main/js/config.js): `js/config.js`

### Other components

- **Traveler**
- **OSRM**
- **Transitous router**
- **Overpass API**
- **Photon and Nominatim**
- **Open-Meteo**
- [Bundled data layers](https://github.com/sfazailhaider/fifa-sustainability-hackathon/tree/main/data): `data`

## Connections

- Traveler → Map and comparison UI: sets trip (evidence: `README.md`)
- Map and comparison UI → Place search: resolves places (evidence: `js/app.js`)
- Place search → Place aliases: matches aliases (evidence: `js/places.js`)
- Place search → Photon and Nominatim: searches and geocodes (evidence: `js/places.js`)
- Map and comparison UI → Road route candidates: requests road routes (evidence: `js/app.js`)
- Road route candidates → OSRM: fetches candidates (evidence: `js/routing.js`)
- Map and comparison UI → METRO trip planning: plans transit (evidence: `README.md`)
- METRO trip planning → Transitous router: requests itineraries (evidence: `js/transit.js`)
- Road route candidates → Geometry toolkit: measures detours (evidence: `js/routing.js`)
- Map and comparison UI → Route scoring: scores routes (evidence: `js/app.js`)
- Route scoring → Green and shade data: measures green cover (evidence: `js/scoring.js`)
- Route scoring → Water access: finds water stops (evidence: `js/scoring.js`)
- Route scoring → Walkability surface: samples surface (evidence: `js/scoring.js`)
- Route scoring → Geometry toolkit: samples geometry (evidence: `js/scoring.js`)
- Green and shade data → Overpass API: fetches map features (evidence: `js/greenspace.js`)
- Map and comparison UI → Turn directions: builds directions (evidence: `js/app.js`)
- Turn directions → Route scoring: scores steps (evidence: `js/directions.js`)
- Map and comparison UI → Route profile: renders profile (evidence: `js/app.js`)
- Map and comparison UI → Results sheet: updates results (evidence: `js/app.js`)
- Map and comparison UI → Heat and air quality: loads conditions (evidence: `js/app.js`)
- Heat and air quality → Open-Meteo: fetches forecasts (evidence: `js/weather.js`)
- Map and comparison UI → Economic intensity: loads context (evidence: `js/app.js`)
- Map and comparison UI → Demand estimates: loads estimates (evidence: `js/app.js`)
- Map and comparison UI → Priority sites: loads sites (evidence: `js/app.js`)
- Map and comparison UI → Scenario analysis: supports scenarios (evidence: `js/app.js`)
- Map and comparison UI → Bundled data layers: uses data layers
- Map and comparison UI → App configuration: reads settings (evidence: `js/app.js`)
