Retrofit manages HTTP requests and maps API endpoints to Kotlin interfaces.
Gson converts JSON responses into Kotlin data classes such as WeatherResponse. The mapping happens automatically based on field names.
API calls are executed in background threads using suspend functions and coroutines. The UI updates when the coroutine returns the data.
A ViewModel holds a WeatherUiState object that represents the screen state. Jetpack Compose observes state changes and recomposes the UI automatically.
The API key is placed in local.properties, injected into BuildConfig at build time, and accessed by Retrofit at runtime.