How plemery/weather-dashboard works
This React dashboard locates the user or accepts a city search, selects and remembers cities, fetches Open-Meteo weather, and presents current conditions, a seven-day forecast, and a 24-hour chart. The graph distinguishes app orchestration, search/location, weather retrieval, and presentation. Source excerpts show these relationships; external APIs are identified by the README and implementation URLs.
Main entry points: App.tsx App state and layout · SearchBar.tsx City search · useWeather.ts Weather fetching and mapping · weather.ts Weather and city types
Components 15
Dashboard app
- React entry
weather-dashboard/src/main.tsx - App state and layout
weather-dashboard/src/App.tsx - Saved cities
weather-dashboard/src/components/CityList.tsx
City discovery
- City search
weather-dashboard/src/components/SearchBar.tsx - City geocoding
weather-dashboard/src/utils/weatherHelpers.ts - Browser location
weather-dashboard/src/utils/geolocation.ts - Reverse geocoding
Weather data
- Weather fetching and mapping
weather-dashboard/src/hooks/useWeather.ts - Open-Meteo API
- Weather and city types
weather-dashboard/src/types/weather.ts - Weather formatting
weather-dashboard/src/utils/weatherHelpers.ts
Weather views
- Current conditions
weather-dashboard/src/components/CurrentWeather.tsx - Seven-day forecast
weather-dashboard/src/components/ForecastCard.tsx - Hourly chart
weather-dashboard/src/components/HourlyChart.tsx
Other components
- Dashboard user
Connections 21
- Dashboard user → React entry: opens dashboard
weather-dashboard/src/main.tsx - React entry → App state and layout: renders
weather-dashboard/src/main.tsx - App state and layout → City search: renders
weather-dashboard/src/App.tsx - App state and layout → Saved cities: renders
weather-dashboard/src/App.tsx - App state and layout → Weather fetching and mapping: fetches for city
weather-dashboard/src/App.tsx - App state and layout → Browser location: requests location
weather-dashboard/src/App.tsx - App state and layout → Reverse geocoding: reverse geocodes
weather-dashboard/src/App.tsx - City search → City geocoding: searches cities
weather-dashboard/src/components/SearchBar.tsx - City geocoding → Dashboard user: queries
weather-dashboard/src/utils/weatherHelpers.ts - Browser location → Dashboard user: reads coordinates
weather-dashboard/src/utils/geolocation.ts - App state and layout → Open-Meteo API: reverse-geocode request
weather-dashboard/src/App.tsx - Weather fetching and mapping → Open-Meteo API: fetches forecast
weather-dashboard/src/hooks/useWeather.ts - App state and layout → Current conditions: renders current data
weather-dashboard/src/App.tsx - App state and layout → Seven-day forecast: renders daily data
weather-dashboard/src/App.tsx - App state and layout → Hourly chart: renders hourly data
weather-dashboard/src/App.tsx - Current conditions → Weather formatting: formats conditions
weather-dashboard/src/components/CurrentWeather.tsx - Seven-day forecast → Weather formatting: converts temperatures
weather-dashboard/src/components/ForecastCard.tsx - Hourly chart → Weather formatting: converts temperatures
weather-dashboard/src/components/HourlyChart.tsx - City search → Weather and city types: uses city types
weather-dashboard/src/components/SearchBar.tsx - Weather fetching and mapping → Weather and city types: maps weather types
weather-dashboard/src/hooks/useWeather.ts - Saved cities → Weather and city types: uses city types
weather-dashboard/src/components/CityList.tsx