How sydalwedaie/odin-project-weather-app works
A vanilla JavaScript weather app: the user searches for a place, or the browser supplies the current coordinates; the app fetches weather, reverse-geocodes the returned coordinates, and updates current conditions plus daily and hourly forecasts. The app also renders search, loading/error, and attribution UI. The graph follows the sampled entry point and view implementations; external API relationships are visible in the API client, while unsampled modules are not inferred.
Main entry points: index.js App coordinator · helpers.js DOM and icons · api.js API client · view_header.js Search header
Components 13
App workflow
- App coordinator
src/index.js
Weather data
- API client
src/api.js
Weather views
- Search header
src/view_header.js - Current conditions
src/view_current.js - Daily forecast
src/view_daily.js - Hourly forecast
src/view_hourly.js - Load status
src/view_status.js - Attribution
src/view_attr.js
Interface support
- DOM and icons
src/helpers.js
Other components
- User
- Browser geolocation
- Visual Crossing
- LocationIQ
Connections 20
- User → Search header: searches
src/view_header.js - User → Browser geolocation: requests location
README.md - Browser geolocation → App coordinator: provides coordinates
src/index.js - Search header → App coordinator: submits place
src/view_header.js - App coordinator → API client: fetches weather
src/index.js - App coordinator → API client: reverse-geocodes
src/index.js - API client → Visual Crossing: requests forecast
src/api.js - API client → LocationIQ: requests address
src/api.js - App coordinator → Current conditions: updates conditions
src/index.js - App coordinator → Daily forecast: updates forecast
src/index.js - App coordinator → Hourly forecast: updates forecast
src/index.js - App coordinator → Search header: renders and binds
src/index.js - App coordinator → Load status: shows load state
src/index.js - App coordinator → Attribution: renders attribution
src/index.js - Current conditions → DOM and icons: uses DOM and icons
src/view_current.js - Daily forecast → DOM and icons: uses DOM and icons
src/view_daily.js - Hourly forecast → DOM and icons: uses DOM and icons
src/view_hourly.js - Search header → DOM and icons: builds markup
src/view_header.js - Load status → DOM and icons: builds markup
src/view_status.js - Attribution → DOM and icons: builds markup
src/view_attr.js