Tree Coffee Mobile — Native Android App (Java)
Native Android client for the Tree Coffee store, written in Java. It shares one Supabase database, auth, and SvelteKit API with the web app — no new backend, no duplicated business logic. Catalogue, checkout, Midtrans, chat, reviews, flash sale, Google sign-in.

A native Android client for Tree Coffee, an Indonesian online coffee store — written in Java with the Android SDK, not a cross-platform wrapper. The point of the project is not "an app from scratch" but integrating a native mobile client into an existing web e-commerce system through a shared backend: the app talks to the same Supabase database, the same auth, and the same SvelteKit API as the website. No new backend, no new schema, no duplicated business logic.
📱 Download
The Android build is attached to this page — press Download APK. Minimum Android 7.0 (API 24). Sign in with an existing Tree Coffee account, register a new one, or continue with Google.
Architecture
Android (Java) ─┬─> Supabase PostgREST + GoTrue
│ auth, catalogue, orders, addresses, storage
└─> SvelteKit /api/* (Bearer JWT)
checkout, Midtrans, Biteship rates, uploads, chat
- Reads go straight to Supabase, writes that matter go through the web API. Orders, stock and payments are never written from the phone — the server that already validates the web checkout validates the app too.
- MVVM without frameworks: Activity → ViewModel + LiveData → Repository → Retrofit. Multi-Activity + Intent, XML layouts, Material 3, ViewBinding. No Fragments, no Hilt, no RxJava, no coroutines.
- Refresh-token rotation handled safely — the refresh is
synchronizedand checks whether another thread already refreshed, because two threads exchanging the same refresh token outside Supabase's 10-second reuse window revoke the whole session. - Prices always match the bill — the price formula mirrors the web server's
resolveUnitPrice(regular discount vs. flash-sale price, whichever is cheaper), and the cart and checkout re-quote from the server before paying.
Features
- Auth — email + password, registration with email verification, Sign in with Google (Credential Manager → Supabase
id_token), blocked accounts rejected. - Catalogue & search — home banners that auto-rotate, categories, product detail with gallery and full-screen zoom, suggestions with stale-request cancelling, search history, popular searches, sort and filter.
- Cart & checkout — per-item selection, "Buy Now" for a single item, saved addresses with area search, live shipping rates from Biteship plus the store's own courier, pay-at-store.
- Payment — Midtrans Snap in a locked-down WebView, status synced from the server, unpaid transfers expire automatically.
- Orders — list with status filter, detail, event timeline, pay again, buy again.
- Reviews, chat & complaints — reviews with reactions and replies, customer–admin chat with images, replies and edits, complaints with photo evidence.
- Account — profile and photo, change password, payment history, shopping insights, WhatsApp OTP phone verification, permanent account deletion, dark mode.
- Flash sale — charged for real: countdown, quota, and a dedicated Flash Sale page.
- Responsive by rule — every screen checked on a small phone, a large phone, 1.3× font size, 3-button and gesture navigation, light and dark theme.
Tech Stack
- Java 11 + Android SDK (compileSdk 36, targetSdk 35, minSdk 24)
- AGP 8.10, Gradle 8.11 (Kotlin DSL + version catalog)
- Material 3, ViewBinding, AndroidX Lifecycle (ViewModel + LiveData)
- Retrofit 3 + OkHttp 5 + Gson, Glide 4.16
- AndroidX Credential Manager + Google ID (Sign in with Google)
- Supabase (PostgREST, GoTrue, Storage) shared with the web app
- SvelteKit API: Midtrans Snap, Biteship, chat, reviews, complaints
Status
Active — this is an undergraduate thesis project. Every feature was verified by hand on an emulator and a physical phone against the production database, with the HTTP log as evidence. There is no automated test suite; that is the clearest gap, stated rather than hidden. The shared APK is a debug build; a signed release build is the next step.
Releases
Build debug pertama: katalog, checkout Midtrans, chat, flash sale, Masuk dengan Google.