• JavaScript 92.2%
  • HTML 4.6%
  • CSS 2.2%
  • Shell 0.8%
  • Nix 0.1%
Find a file
Arthur Sommer ca10b89927
All checks were successful
ci / build (push) Successful in 46s
ci / deploy (push) Successful in 21s
Document live hourly smoothing and boundary verification
2026-10-13 16:35:21 +00:00
.forgejo Show deployed commit in footer 2026-06-20 11:46:34 -04:00
tests Smooth historical curves hourly and distinguish forecast boundary from daylight 2026-10-13 16:31:58 +00:00
vendor Make radar loading reliable 2026-09-03 14:33:45 +00:00
.dockerignore Add animated NWS radar 2026-09-02 13:01:54 +00:00
.gitignore Add animated NWS radar 2026-09-02 13:01:54 +00:00
compose.yaml
Dockerfile Show deployed commit in footer 2026-06-20 11:46:34 -04:00
index.html Make radar loading reliable 2026-09-03 14:33:45 +00:00
radar.js Add radar frame timeline 2026-09-04 03:06:25 +00:00
README.md Add observation history and sky cover charts 2026-09-27 16:47:00 +00:00
server.js Smooth historical curves hourly and distinguish forecast boundary from daylight 2026-10-13 16:31:58 +00:00
shell.nix
styles.css Add touch-friendly chart timeline jump controls 2026-09-28 21:47:27 +00:00
theme-config.js
theme.js Add touch-friendly chart timeline jump controls 2026-09-28 21:47:27 +00:00
verification.md Document live hourly smoothing and boundary verification 2026-10-13 16:35:21 +00:00

NWS Weather Desk

Tailwind and htmx dashboard for weather.gov data.

Features

  • Point-based forecast lookup from api.weather.gov
  • Place search by city, ZIP, or place name
  • Hourly trend charts with up to 12 hours of station observations, 48 hours of forecast guidance, and sky cover
  • Location-centered animated NOAA/NWS MRMS precipitation radar with play/pause controls
  • Seven-day forecast cards with discussion overlays
  • Active alerts panel
  • Area Forecast Discussion rendering
  • Optional local Ollama summary for the AFD digest
  • Light and dark modes
  • Tailwind-powered shell with htmx swapping the dashboard fragment

Local development

Use the provided Nix shell:

nix-shell

Run the app directly:

node server.js

Then open http://127.0.0.1:8080.

Optional local LLM summary

If OPENAI_API_KEY is set, the AFD summary uses OpenAI first with gpt-4.1-nano by default. That is the small-model path.

If you want to force the local model instead, start Ollama and set:

export AFD_SUMMARY_PROVIDER=ollama
export AFD_SUMMARY_MODEL=llama3.2:1b

The app will try OLLAMA_HOST if you set it, otherwise it uses http://127.0.0.1:11434. If neither OpenAI nor Ollama is available, it falls back to the built-in text extractor.

Forecast results are cached per location for 5 minutes by default so refreshes do not re-hit weather.gov unless the cache expires. Set WEATHER_CACHE_TTL_MS if you want a different window.

If you want to preview just the shell as a static file, one simple option is:

python3 -m http.server 8080

Docker

Build and run locally:

docker compose up --build

Then open http://127.0.0.1:8080.

Forgejo CI and deploy

The workflow in .forgejo/workflows/ci.yml does three things:

  1. Builds and smoke-tests the image on push.
  2. On main, publishes the image to the Forgejo container registry as a package tagged with the commit SHA and latest.
  3. On main, saves the image, copies it to your target host over SSH, loads it into Docker, and restarts the container.

Required secrets for deploy:

  • DEPLOY_HOST
  • DEPLOY_USER
  • DEPLOY_SSH_KEY
  • DEPLOY_PORT if you do not want the default SSH port 22
  • APP_PORT if you do not want the default app port 8080
  • USERNAME_FORGEJO
  • TOKEN_FORGEJO

The Forgejo registry image path is ${forgejo-host}/${owner}/${repository}:${sha}.

The target host needs Docker and SSH access. The deploy job now pulls the exact image from the Forgejo registry on main before restarting the container.