HiltAndroidApp, Inject, Module

Three annotations turn on the whole system

@HiltAndroidApp goes on your Application subclass β€” exactly one, app-wide. It's the switch that turns Hilt on: it triggers the code generation for the app-level container everything else hangs off of.

@Inject on a constructor is for classes you own β€” your own Kotlin source, like WalkerRepository or a ViewModel. Annotate the constructor, and Hilt knows how to build one whenever something asks for it, automatically supplying whatever its constructor asks for in turn.

@Module + @Provides is for classes you do not own β€” Retrofit, OkHttpClient, the Room Database β€” third-party or SDK types you can't add an @Inject annotation to because you don't control their source. A @Module is a Kotlin object holding @Provides functions that build those types by hand, once, and hand the result to Hilt. Every module needs @InstallIn(SingletonComponent::class) telling Hilt which container the bindings live in.