# arch85-km/solar-lab architecture

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

- Interactive diagram: https://gitdiagram.com/arch85-km/solar-lab
- Repository: https://github.com/arch85-km/solar-lab

## Overview

Solar Analysis Lab is a browser-based teaching tool for exploring sun paths, shadows, and surface-level solar radiation on a building model. The main workflow is to set a site and time, load or import site/model/weather data, inspect solar conditions, run an analysis, and use its summaries or exported study sheet. The README describes these capabilities, but the main implementation in index.html was not sampled; edges therefore show documented product relationships, not inferred internal calls.

Main entry points: [`index.html`](https://github.com/arch85-km/solar-lab/blob/main/index.html) (Solar Analysis Lab), [`server/tile-proxy.php`](https://github.com/arch85-km/solar-lab/blob/main/server/tile-proxy.php) (Tile proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site and context"]
  node_location["Location search<br/>[index.html]"]
  node_saved[("Saved locations<br/>[index.html]")]
  node_basemap["Site basemap<br/>[index.html]"]
  node_proxy["Tile proxy<br/>[tile-proxy.php]"]
  node_city["3D city context<br/>[index.html]"]
  node_siteimage["Scaled site image<br/>[index.html]"]
end

subgraph group_solar["Solar visualization"]
  node_sunpath["3D sun path<br/>[index.html]"]
  node_stereographic["Stereographic chart<br/>[index.html]"]
  node_shadows["Real-time shadows<br/>[index.html]"]
end

subgraph group_analysis["Analysis and results"]
  node_geometry["Geometry import<br/>[index.html]"]
  node_weather["EPW weather import<br/>[index.html]"]
  node_radiation["Surface radiation<br/>[index.html]"]
  node_summary["Orientation summary<br/>[index.html]"]
  node_csv["CSV export<br/>[index.html]"]
end

subgraph group_experience["Interface and presentation"]
  node_lab["Solar Analysis Lab<br/>[index.html]"]
  node_sheet["Study sheet export<br/>[index.html]"]
  node_tour["Guided walkthrough<br/>[index.html]"]
  node_theme["Display themes<br/>[index.html]"]
end

node_student(("Student or educator"))
node_osm["OpenStreetMap tiles"]
node_nominatim["Nominatim search"]
node_maptiler["MapTiler tiles"]
node_overpass["Overpass buildings"]
node_browserstore[("Browser persistence")]

node_student -->|"uses"| node_lab
node_lab -->|"offers search"| node_location
node_location -->|"searches places"| node_nominatim
node_lab -->|"saves locations"| node_saved
node_saved -->|"persists in"| node_browserstore
node_lab -->|"offers site map"| node_basemap
node_basemap -->|"fetches tiles"| node_osm
node_basemap -->|"requests keyed tiles"| node_proxy
node_proxy -->|"fetches imagery"| node_maptiler
node_lab -->|"offers 3D context"| node_city
node_city -->|"fetches footprints"| node_overpass
node_lab -->|"accepts site image"| node_siteimage
node_lab -->|"imports OBJ"| node_geometry
node_lab -->|"imports EPW"| node_weather
node_lab -->|"visualizes solar position"| node_sunpath
node_lab -->|"offers chart"| node_stereographic
node_lab -->|"shows shadows"| node_shadows
node_lab -->|"computes irradiance"| node_radiation
node_radiation -->|"summarizes by orientation"| node_summary
node_radiation -->|"exports analysis points"| node_csv
node_lab -->|"exports study sheet"| node_sheet
node_lab -->|"provides walkthrough"| node_tour
node_lab -->|"offers display themes"| node_theme

click node_lab "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_location "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_saved "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_basemap "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_proxy "https://github.com/arch85-km/solar-lab/blob/main/server/tile-proxy.php"
click node_city "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_siteimage "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_geometry "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_weather "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_sunpath "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_stereographic "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_shadows "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_radiation "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_summary "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_csv "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_sheet "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_tour "https://github.com/arch85-km/solar-lab/blob/main/index.html"
click node_theme "https://github.com/arch85-km/solar-lab/blob/main/index.html"

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_location,node_saved,node_basemap,node_proxy,node_city,node_siteimage toneBlue
class node_sunpath,node_stereographic,node_shadows,node_browserstore toneAmber
class node_geometry,node_weather,node_radiation,node_summary,node_csv toneMint
class node_lab,node_sheet,node_tour,node_theme toneRose
class node_student,node_osm,node_nominatim,node_maptiler,node_overpass toneIndigo
```

## Components

### Site and context

- [Location search](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Saved locations](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Site basemap](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Tile proxy](https://github.com/arch85-km/solar-lab/blob/main/server/tile-proxy.php): `server/tile-proxy.php`
- [3D city context](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Scaled site image](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`

### Solar visualization

- [3D sun path](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Stereographic chart](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Real-time shadows](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`

### Analysis and results

- [Geometry import](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [EPW weather import](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Surface radiation](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Orientation summary](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [CSV export](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`

### Interface and presentation

- [Solar Analysis Lab](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Study sheet export](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Guided walkthrough](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`
- [Display themes](https://github.com/arch85-km/solar-lab/blob/main/index.html): `index.html`

### Other components

- **Student or educator**
- **OpenStreetMap tiles**
- **Nominatim search**
- **MapTiler tiles**
- **Overpass buildings**
- **Browser persistence**

## Connections

- Student or educator → Solar Analysis Lab: uses (evidence: `README.md`)
- Solar Analysis Lab → Location search: offers search (evidence: `README.md`)
- Location search → Nominatim search: searches places (evidence: `README.md`)
- Solar Analysis Lab → Saved locations: saves locations (evidence: `README.md`)
- Saved locations → Browser persistence: persists in (evidence: `README.md`)
- Solar Analysis Lab → Site basemap: offers site map (evidence: `README.md`)
- Site basemap → OpenStreetMap tiles: fetches tiles (evidence: `README.md`)
- Site basemap → Tile proxy: requests keyed tiles (evidence: `README.md`)
- Tile proxy → MapTiler tiles: fetches imagery (evidence: `server/tile-proxy.php`)
- Solar Analysis Lab → 3D city context: offers 3D context (evidence: `README.md`)
- 3D city context → Overpass buildings: fetches footprints (evidence: `README.md`)
- Solar Analysis Lab → Scaled site image: accepts site image (evidence: `README.md`)
- Solar Analysis Lab → Geometry import: imports OBJ (evidence: `README.md`)
- Solar Analysis Lab → EPW weather import: imports EPW (evidence: `README.md`)
- Solar Analysis Lab → 3D sun path: visualizes solar position (evidence: `README.md`)
- Solar Analysis Lab → Stereographic chart: offers chart (evidence: `README.md`)
- Solar Analysis Lab → Real-time shadows: shows shadows (evidence: `README.md`)
- Solar Analysis Lab → Surface radiation: computes irradiance (evidence: `README.md`)
- Surface radiation → Orientation summary: summarizes by orientation (evidence: `README.md`)
- Surface radiation → CSV export: exports analysis points (evidence: `README.md`)
- Solar Analysis Lab → Study sheet export: exports study sheet (evidence: `README.md`)
- Solar Analysis Lab → Guided walkthrough: provides walkthrough (evidence: `README.md`)
- Solar Analysis Lab → Display themes: offers display themes (evidence: `README.md`)
