Loading

iOS App · 2026

Pet Medication iOS App

A native iPhone app for managing a chronically ill pet's medications, meals and doses, with server-side rescheduling and on-device reminders.

Year

2026

Type

iOS App

Role

iOS & Backend Developer

Tech Stack

  • Swift
  • SwiftUI
  • Supabase
  • PostgreSQL
  • Deno
  • TypeScript
  • Core Data
  • XCTest
  • Sentry
  • XcodeGen
NDAClient work. Source code for this project cannot be shared due to a non-disclosure agreement.

Project Summary

A native iOS app for people caring for a pet with a chronic condition. The caretaker sets up medications and meals, logs doses as given, skipped or refused, and gets reminders on the phone. When a dose is logged late or out of order, the rest of the day is recalculated on the server and shown as a preview before anything is saved. The 1.0 scope is one caretaker, one pet and iPhone only.

The scheduling engine, base database schema, API contracts and UI copy were supplied by the client; the work covered the SwiftUI app and the Supabase edge function and migration layer around them. Edge functions run under the caller's JWT, so row level security applies to every read and write, and commits go through a Postgres RPC in one transaction with advisory locks and fingerprint-based idempotency. Previews come back as HMAC-signed tokens that expire after five minutes, and a commit is rejected if the underlying state has changed since the preview.

Problem & Solution

Problem
  • A late or missed dose can break minimum gaps, food windows and spacing rules for the rest of the day
  • No schedule change may be saved without the caretaker seeing and approving it
  • Reminders must work offline and follow schedule changes without duplicates
  • Network retries and lost responses could create duplicate dose logs
  • Times must follow the pet's time zone, not the phone's
Solution
  • The constraint engine runs only in Deno edge functions; the app sends actions and renders results, with no schedule math on the device
  • Every change is previewed first and committed only after explicit confirmation, with an undo option afterwards
  • Local notifications use stable identifiers, so changed doses are cancelled and rescheduled within iOS's 64 pending-notification budget
  • Atomic commits with fingerprint idempotency; offline actions wait in a Core Data FIFO queue and go through preview again on reconnect
  • Anchor times are resolved on the server against the pet's time zone; the app only sends the pet's calendar day

Key Features

01

Guided pet intake

After Sign in with Apple, a step-by-step intake collects species, name, age, weight, allergies and photo, then sets up notification permissions.

02

Today view

A chronological list of the day's doses and meals with Coming up, Overdue, Now and Check timing states, and a one-tap Given action.

03

Preview before save

Late logs, reschedules and medication edits open a 'Here's what will change' screen. Nothing is saved until the caretaker confirms.

04

Conflict decisions

When a dose cannot fit a timing rule, the app offers give it now, find the next safe time, or skip, and warns before a manual override.

05

Local reminders

Standard or Time Sensitive notifications with Given, Snooze and Skip actions, plus a 30-minute follow-up for doses that are still unlogged.

06

Flexible medication setup

Daily, specific weekdays, every few days and monthly schedules, as-needed (PRN) medications, meal rules and 49 bundled medication presets.

Technical Details

iOS App

SwiftUI on iOS 17 with strict concurrency and an XcodeGen project; supabase-swift for auth and function calls, Core Data for the offline queue and schedule cache, and crash-only Sentry with PII capture off.

Edge Functions

Five Deno functions (schedule, log, reminders, reminder-window, delete-account). The schedule function maps database state to engine input and returns signed previews; the reminders endpoint serves a rolling notification window.

Database

47 SQL migrations on Supabase Postgres, starting from the supplied schema and RLS, that add atomic commit and undo RPCs (SECURITY INVOKER, advisory locks), operation receipts and occurrence identity.

Testing

49 Deno test files, 40 SQL test files and 30 XCTest files (18 unit, 12 UI), plus QA scripts for TestFlight acceptance. The supplied engine test suite is kept green as a release gate.

Have a project? Let's talk.

Have a project in mind or a question about my work? Email or LinkedIn is the best way to reach me.