hayley-ssg-template

A minimal Dioxus 0.7 starter with SSG + mise + Tailwind.

Weather (NWS API)

Client-side reqwest calls to api.weather.gov — starting with wet bulb globe temperature (WBGT).

Weather demo uses the shared location store. Coordinates come from whichever provider is active (see Manage location).

No active location yet — open Manage location and refresh a provider.

SSG & hydration

Build / SSG: This page renders static placeholders only. NWS and geolocation requests run after you click — never in the component body or on mount.

Browser: reqwest talks to api.weather.gov directly (CORS is open). Set a descriptive User-Agent header — this demo uses hayley-ssg-template (Hayley SSG Demo, ssgdemo@vortex.cx).

Location

Use either the combined latitude, longitude field or the separate boxes — not all three at once. Fields sync after a short debounce. Fetch forecast below uses whatever coordinates are valid here.

To refresh providers or change which one is active, use Manage location (or the Geolocation / GeoJS demos).

or

Enter coordinates above or use Get my locationFetch forecast stays disabled until latitude and longitude are valid.

Forecast

Two NWS requests: /points/{lat},{lon} then grid forecastGridData (currently wetBulbGlobeTemperature). Runs only when you click — not on mount.

Set valid coordinates in the location section above to enable this button.

No forecast yet. Set a location, then click Fetch forecast.

Tips

  • Flow: /points/{lat},{lon} → read forecastGridDatawetBulbGlobeTemperature.values.
  • Fill from active location copies the shared active coordinates into the fields; Fetch forecast is a separate step. Refresh providers on Manage location.
  • Coordinate fields use use_debounce from dioxus-sdk-time so typing in one format does not fight the others mid-keystroke.
  • WBGT intervals use validTime like 2026-06-01T18:00:00+00:00/PT3H — expand to one value per UTC hour before building the table.
  • Grid updateTime is when NWS last refreshed the grid; individual hours may still start earlier. Refresh is available but the grid may not change every minute.
  • County name lookup is deferred; relativeLocation from /points is shown instead.
  • Do not provide multiple use_context_provider(|| Signal<String>) values — context is keyed by type; use a struct (see WeatherCoordinates in this file).

Built with Dioxus. Static output goes to target/dx/<app>/release/web/public/.