Back to projects

Kofiko

Not deployed

A coffee-ordering Android app built with Kotlin and Jetpack Compose: browse the menu, build a cart, and place orders against a PHP and MySQL backend with token-based auth.

  • Kotlin
  • Jetpack Compose
  • Retrofit
  • PHP
  • MySQL

Kofiko is a coffee-ordering Android app. Customers browse the menu, build a cart, and place an order, with the app handling everything from sign-in to checkout against a real backend rather than faking it with local data.

What it does

  • Browse the menu: coffee items with images and details, loaded from the server.
  • Cart and checkout: add items, review the cart, and place an order.
  • Accounts: sign in and keep a profile, with a token attached to each request so orders are tied to the right customer.
  • Real order processing: orders are handled server-side, including pricing and stock, not just recorded blindly.

How it works

The app is a Kotlin, Jetpack Compose front end talking to a PHP and MySQL backend over HTTP:

  • Android (Kotlin + Compose): an MVVM structure where Compose screens (home, menu, detail, cart, login, profile) only render state and report events, while view models hold the logic. A data layer of repositories, models, and API services keeps networking out of the UI.
  • Networking: Retrofit declares the HTTP contract and OkHttp carries it, with an auth interceptor attaching the user’s token to every request.
  • Backend (PHP + MySQL): a front controller routes requests behind default-deny auth (a signed token checked for signature and expiry). Placing an order runs as a single database transaction that locks rows, prices the order, writes it, and deducts stock atomically across the tables, so a failure never leaves a half-finished order.

What I learned