case_study/tips_n_trip.kt

Tips n Trip

A travel-planning app that turns a destination, a trip length, and a budget into a day-by-day itinerary generated by a Machine Learning model, built as a Bangkit Academy capstone and named a Top 68 project out of 700+ teams.

Role
Android developer, wrote most of the Android client
Team
Cross-disciplinary: Mobile, Machine Learning, and Backend
Context
Bangkit Academy 2023 capstone · Top 68 of 700+
Stack
Kotlin · MVVM · Retrofit · OkHttp · Paging 3
Tips n Trip welcome screen
01_problem.kt

The problem

Planning a trip usually means jumping between search results, maps, and travel blogs, then fitting everything into a few days and a fixed budget by hand. The capstone brief asked us to make that easier with Machine Learning.

Our answer had two parts:

  • One place to explore cities, attractions, and local souvenirs, without needing an account.
  • A generated itinerary: pick a destination, a trip length, and a budget, and get a plan for each day.
02_solution.kt

How it works

Exploring is open to everyone. Creating and saving itineraries needs an account.

  1. Guest

    Explore

    Browse cities, attractions, and souvenirs in tabbed lists that load more as you scroll.

  2. Signed in

    Plan a trip

    Choose a destination city, a trip of 1 to 5 days, and a budget, which is checked before sending.

  3. ML model

    Get an itinerary

    The backend runs the team's recommendation model and returns an agenda, shown in one tab per day.

  4. Signed in

    Save to My Journey

    Save, unsave, or delete itineraries and reopen them later from My Journey.

03_architecture.kt

Architecture

MVVM on the client. The Android app talks to the team's REST API, which serves the catalog data and runs the Machine Learning model.

04_decisions.kt

Key decisions

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.

05_demo.kt

Demo

06_teamwork.kt

Working across disciplines

Bangkit capstone teams mix learning paths. On Tips n Trip, the Machine Learning members built the recommendation model, the Backend members exposed it and the catalog through a REST API, and I built the Android client that brings it all together. The client depends on that API in three places: authentication, catalog pages requested with page and size, and the itinerary endpoint that wraps the model.

The project was named a Top 68 product-based capstone out of 700+ teams.

07_retrospective.kt

What I'd do differently today

We built this under a tight capstone deadline. With what I know now, I would change:

  • One day fragment instead of five. DayOneFragment to DayFiveFragment are near copies. A single fragment that takes the day as an argument would remove the duplication and lift the 5-day limit.
  • Suspend everywhere. Paging calls are suspend, but the other endpoints still use Retrofit Call callbacks. Making them all suspending and exposing Flow would give one consistent error-handling path.
  • Store the token securely. It sits in plain SharedPreferences. Encrypted storage, or DataStore with encryption, is the safer default.
  • Hilt and a cleaner build. Replace the hand-written ViewModel factories with Hilt, and drop the Room and DataStore dependencies that are declared but never used.
  • Tests for the paging source and ViewModels, with a fake ApiService.

> cd ../projects

Want to see more?