Skip to content

Architecture ​

The architecture is small enough to understand in one sitting, which is a strength.

text
index.html
  ├── style.css
  ├── weather-data.js
  ├── audio.js
  └── main.js

game.html
  ├── game.css
  ├── weather-data.js
  └── game.js

index.html ​

Defines the application shell: brand, city search, unit toggle, sound toggle, theme toggle, weather hero, city chips, statistics grid, forecast area, and the link to 9jaRun.

main.js ​

Controls the principal weather experience. It reads saved preferences, selects the active city, requests Open-Meteo data, prevents stale requests from overwriting newer ones, formats values, generates contextual copy, and rerenders the interface.

weather-data.js ​

Acts as shared domain data. It contains the curated Nigerian city list, coordinates, geopolitical-zone labels, featured-city metadata, and WMO weather-code interpretation.

Both the main weather application and 9jaRun use this module. That shared source is germane because it keeps the two experiences from developing competing definitions of the same weather state.

audio.js ​

Contains the ambient weather sound system using the browser's Web Audio API.

game.js ​

Implements 9jaRun, including live-weather context and its own interaction logic.

No server-side layer ​

The repository contains no application server, database, authentication system, server-side secrets, or custom API endpoints. The browser talks directly to Open-Meteo.

Built around the Naija skies.