How saadyasin/weathernow works
WeatherNow is a React weather dashboard. A user searches for a city; the selector retrieves matching locations, and choosing one prompts the app to fetch current conditions and forecast data. The app then presents current weather, details, and hourly and daily forecasts, with temperature-unit switching. OpenWeatherMap is the external data source. The excerpts show the main UI, API, formatting, and display components; other product behavior is not inferred beyond the README and source index.
Main entry points: App.tsx Dashboard · weatherApi.ts Weather API · WeatherIcon.tsx Weather icons · weather.ts Weather formatting
Components 13
Application
- React entry
src/main.tsx - Dashboard
src/App.tsx - City selector
src/components/CitySelector.tsx
Weather data
- Weather API
src/services/weatherApi.ts
Weather views
- Current conditions
src/components/CurrentWeather.tsx - Weather details
src/components/WeatherDetails.tsx - Hourly forecast
src/components/HourlyForecast.tsx - Daily forecast
src/components/DailyForecast.tsx - Weather icons
src/components/WeatherIcon.tsx
Shared logic
- Weather formatting
src/utils/weather.ts - Weather types
src/types.ts
Other components
- User
- OpenWeatherMap
Connections 19
- User → City selector: searches
src/components/CitySelector.tsx - City selector → Weather API: searches cities
src/components/CitySelector.tsx - Weather API → OpenWeatherMap: requests geocoding
src/services/weatherApi.ts - City selector → Dashboard: selects city
src/components/CitySelector.tsx - Dashboard → Weather API: fetches weather
src/App.tsx - Weather API → OpenWeatherMap: fetches conditions
src/services/weatherApi.ts - React entry → Dashboard: renders
src/main.tsx - Dashboard → Current conditions: renders
src/App.tsx - Dashboard → Weather details: renders
src/App.tsx - Dashboard → Hourly forecast: renders
src/App.tsx - Dashboard → Daily forecast: renders
src/App.tsx - Current conditions → Weather icons: renders
src/components/CurrentWeather.tsx - Hourly forecast → Weather icons: renders
src/components/HourlyForecast.tsx - Daily forecast → Weather icons: renders
src/components/DailyForecast.tsx - Weather details → Weather icons: imports icon helper
src/components/WeatherDetails.tsx - Current conditions → Weather formatting: formats values
src/components/CurrentWeather.tsx - Weather details → Weather formatting: formats values
src/components/WeatherDetails.tsx - Hourly forecast → Weather formatting: formats values
src/components/HourlyForecast.tsx - Daily forecast → Weather formatting: formats values
src/components/DailyForecast.tsx