How lylio/whether-the-weather works
This repository contains two weather-app entry points: a Spring web application and a Swing desktop application. The web workflow accepts a city request, resolves its location, fetches current conditions, and renders a result or error. The desktop workflow launches a search GUI, fetches weather for the entered location, and updates its display. The sampled web service uses Open-Meteo geocoding and forecast endpoints; the legacy desktop client does too. The README’s API description differs from the sampled implementation. Unsampled template and styling behavior is not inferred beyond the controller’s view name.
Main entry points: WeatherService.java Weather lookup · WeatherController.java Weather routes · WeatherApp.java Desktop weather client · AppLauncher.java Desktop launcher
Components 13
Web application
- Web startup
src/main/java/com/lylio/weather/WeatherApplication.java - Weather routes
src/main/java/com/lylio/weather/WeatherController.java - Weather page
src/main/resources/templates/index.html
Desktop application
- Desktop launcher
src/main/java/AppLauncher.java - Weather GUI
src/main/java/WeatherAppGui.java - Desktop weather client
src/main/java/WeatherApp.java
Weather data
- API errors
src/main/java/com/lylio/weather/WeatherApiException.java - Weather lookup
src/main/java/com/lylio/weather/WeatherService.java - Weather result
src/main/java/com/lylio/weather/WeatherResponse.java
External APIs
- Geocoding API
- Forecast API
Other components
- Web visitor
- Desktop user
Connections 14
- Web visitor → Weather routes: requests weather
src/main/java/com/lylio/weather/WeatherController.java - Web startup → Weather routes: serves routes
src/main/java/com/lylio/weather/WeatherApplication.java - Weather routes → Weather lookup: looks up city
src/main/java/com/lylio/weather/WeatherController.java - Weather lookup → Geocoding API: resolves location
src/main/java/com/lylio/weather/WeatherService.java - Weather lookup → Forecast API: fetches conditions
src/main/java/com/lylio/weather/WeatherService.java - Weather lookup → Weather result: builds result
src/main/java/com/lylio/weather/WeatherService.java - Weather routes → Weather page: renders index
src/main/java/com/lylio/weather/WeatherController.java - Weather lookup → API errors: throws errors
src/main/java/com/lylio/weather/WeatherService.java - Weather routes → API errors: handles errors
src/main/java/com/lylio/weather/WeatherController.java - Desktop user → Desktop launcher: starts app
src/main/java/AppLauncher.java - Desktop launcher → Weather GUI: opens window
src/main/java/AppLauncher.java - Weather GUI → Desktop weather client: requests weather
src/main/java/WeatherAppGui.java - Desktop weather client → Geocoding API: resolves location
src/main/java/WeatherApp.java - Desktop weather client → Forecast API: fetches conditions
src/main/java/WeatherApp.java