How hhari1234/weather-app works
This is a single Spring Boot weather dashboard: a browser loads the Thymeleaf page, searches or selects a location, and requests current conditions and forecasts through the JSON API. Services call OpenWeather and map its responses into client-facing DTOs; the browser renders conditions, forecasts and charts. Location autocomplete and browser geolocation provide alternate search paths. The README documents caching, validation and clean API errors. Some service internals and UI template details were not sampled, so those links rely on README statements rather than inspected implementations.
Main entry points: WeatherApiClient.java Weather HTTP client · WeatherApiController.java Weather REST API · WeatherService.java Weather mapping and forecasts · LocationService.java Location search
Components 17
Browser experience
- Dashboard page
src/main/resources/templates/index.html - Dashboard interactions
src/main/resources/static/js/weather.js - Responsive themes
src/main/resources/static/css/style.css
Application API
- Page controller
src/main/java/com/chimtu/Weather/controller/WeatherPageController.java - Weather REST API
src/main/java/com/chimtu/Weather/controller/WeatherApiController.java
Weather domain
- Weather mapping and forecasts
src/main/java/com/chimtu/Weather/service/WeatherService.java - Location search
src/main/java/com/chimtu/Weather/service/LocationService.java - Weather API DTOs
src/main/java/com/chimtu/Weather/dto - Location result DTO
src/main/java/com/chimtu/Weather/dto/LocationDto.java
OpenWeather integration
- Weather HTTP client
src/main/java/com/chimtu/Weather/client/WeatherApiClient.java - Upstream payload models
src/main/java/com/chimtu/Weather/client
Configuration and errors
- API settings
src/main/java/com/chimtu/Weather/config/WeatherApiProperties.java - HTTP client timeouts
src/main/java/com/chimtu/Weather/config/WeatherClientConfig.java - Caffeine cache
src/main/java/com/chimtu/Weather/config/WeatherCacheConfig.java - API error mapping
src/main/java/com/chimtu/Weather/exception/GlobalExceptionHandler.java
Other components
- Browser user
- OpenWeather API
Connections 20
- Browser user → Dashboard page: opens
README.md - Page controller → Dashboard page: renders
src/main/java/com/chimtu/Weather/controller/WeatherPageController.java - Dashboard page → Dashboard interactions: loads scripts
README.md - Dashboard page → Responsive themes: uses styles
README.md - Dashboard interactions → Weather REST API: requests JSON
src/main/resources/static/js/weather.js - Weather REST API → Weather mapping and forecasts: dispatches weather
src/main/java/com/chimtu/Weather/controller/WeatherApiController.java - Weather REST API → Location search: dispatches search
src/main/java/com/chimtu/Weather/controller/WeatherApiController.java - Weather mapping and forecasts → Weather API DTOs: maps results
README.md - Weather REST API → Weather API DTOs: returns
src/main/java/com/chimtu/Weather/controller/WeatherApiController.java - Location search → Weather HTTP client: searches locations
src/main/java/com/chimtu/Weather/service/LocationService.java - Location search → Location result DTO: builds results
src/main/java/com/chimtu/Weather/service/LocationService.java - Weather mapping and forecasts → Weather HTTP client: fetches weather
README.md - Weather HTTP client → OpenWeather API: calls REST API
README.md - Weather HTTP client → Upstream payload models: decodes responses
src/main/java/com/chimtu/Weather/client/WeatherApiClient.java - Weather HTTP client → API settings: reads settings
src/main/java/com/chimtu/Weather/client/WeatherApiClient.java - HTTP client timeouts → API settings: sets timeouts
src/main/java/com/chimtu/Weather/config/WeatherClientConfig.java - Weather HTTP client → HTTP client timeouts: uses configured client
- Weather mapping and forecasts → Caffeine cache: caches lookups
README.md - Location search → Caffeine cache: caches searches
README.md - Weather REST API → API error mapping: maps API errors
README.md