01
One generic PagingSource for three catalogs
Cities, attractions, and souvenirs all page the same way, so I wrote a single
ExplorePagingSource<V> that takes a suspending
(page, size) -> List<V> block. Each catalog is then one line
in ExplorePagingRepository. Lists show a load-state footer with a
retry button when a page fails.
02
Auth handled once, in the network layer
An OkHttp AuthenticationInterceptor reads the saved token and adds
the Authorization: Bearer header to every request, so no screen deals
with tokens. Full HTTP logging is turned on only in debug builds, so request
bodies never reach release logs.
03
Let guests explore first
The explore tabs work without an account, so people can see what the app offers
before signing up. The itinerary, My Journey, and profile screens show a
friendly sign-in prompt instead of blocking the whole app at launch.
04
Validate before calling the model
The destination list comes from the API, the trip length is limited to 1 to 5
days, and the budget must be at least Rp100.000 per day. Catching
these on the device avoids wasted calls to the model and gives instant feedback.