Back to projects

Case Study

DoseLatch

A smart pill box with a companion iOS app, built to track what was actually taken rather than only reminding you. Bluetooth keeps app and hardware in step; push notifications catch the dose that slipped.

My Role

Backend, database, and iOS integration, built with a team.

Tech Stack

SwiftUINode.jsPostgreSQLCore BluetoothApple AuthenticationPush Notifications

DoseLatch was a challenge project at the Apple Developer Academy in Bali. The brief was to build an iOS app that works with Apple's IoT frameworks, so the product had to be a real piece of hardware and a real app, not one pretending to be the other.

What we made is a smart pill box with a companion app for scheduling and tracking medicine. A sensor inside the box detects when it is opened, and that becomes the record.

I was the backend engineer. I shaped the business logic and user flow with the team, designed and managed the PostgreSQL schema, and built the REST API. On the app side I handled the Apple framework integrations.

The problem

  • A reminder app only reminds. It has no idea whether you took the dose, so its history is a list of things it hoped happened.
  • Tapping "done" records intent, not action. People mark a dose taken and then get distracted, and the record is wrong in the direction that matters.
  • A missed dose goes unnoticed. By the time anyone realises, the useful moment to do something about it has passed.
  • Someone caring for a relative has no visibility. They are managing medication they cannot see.

What I built

The schedule, and the data behind it

I designed the PostgreSQL schema and built the REST API for everything the app reads and writes: medicines, schedules, doses, stock levels and devices. Schedules carry an interval and a grace period, which is what lets the system decide a dose is late rather than just early.

I shaped the business logic and user flow with the team first. On a product like this the rules are the product, so getting them agreed before writing the schema saved rewriting it later.

Keeping the box and the app in step

I integrated Core Bluetooth so the SwiftUI app and the hardware stay in sync. The box detects the interaction and the app records it, which is the whole idea: the history reflects what actually happened at the box rather than what someone remembered to tap.

Apple Authentication handles sign-in, so nobody is inventing another password for something they use half asleep.

Reminders that follow up

Push Notifications remind ahead of a schedule, and flag a dose once it has passed its grace period without the box being opened. A reminder you can ignore silently is not much of a reminder.

The result

  • Doses are recorded from the box itself, so schedules, dose history and stock reflect real behaviour rather than self-reporting.
  • A missed dose is noticed and raised rather than quietly skipped.
  • The app and the hardware agree, because the record only ever has one source.

Built with SwiftUI, Node.js and PostgreSQL, using Core Bluetooth, Apple Authentication and Push Notifications.