A local weather web app built on Open-Meteo — free, no API key.
Enter any city name to get current conditions, a 12-hour rain-probability chart, and a 7-day forecast.
Option A — Python (no install)
git clone https://github.com/your-username/weather-scout.git
cd weather-scout
python3 -m http.server 8080Open http://localhost:8080 in your browser.
Option B — Node (if you have it)
npx serve .That's it. No .env, no npm install, no build step. Open-Meteo is public and free.
Why a local server? The app uses ES modules (
type="module"), which browsers block onfile://for security reasons. Any HTTP server fixes this.
- Type a city name → if it's ambiguous (e.g. "Springfield") you get a picker showing country/region so you choose the right one
- Current conditions + apparent temperature (feels-like)
- 12-hour precipitation probability bar chart
- 7-day high/low forecast
- Handles slow API (8-second timeout with a clear message), API errors, and bad input (empty field, typos, unknown cities)
index.html Entry point + all styles
src/
api.js Geocoding + forecast fetch, timeout logic, WMO code map
ui.js DOM rendering (card, picker, errors, loading state)
main.js Event wiring, orchestrates geocode → weather flow
- Temperatures in Celsius (Open-Meteo default). Pass
temperature_unit=fahrenheitto the URL params inapi.jsto change it. - The app works fine on mobile; the 7-day forecast collapses to 4 days below 440px.