Flutter application
Accounts, saved routines, powernaps, playback controls and responsive state across Android and iOS.
TECHNICAL CASE STUDY / SLEEPSANITY LLC
A Flutter application that coordinates audio, timed routines and wearable device controls across Android and iOS.

01 / ENGINEERING PROBLEM
APPLICATION + DEVICE + AUDIOA sleep routine spans three domains: what the person hears, what the device does, and what the application shows.
Those domains advance on different clocks. Audio has playback and lifecycle state; Bluetooth has connection and notification state; a routine has phases and saved settings. The practical challenge is to make them behave as one coherent interaction, including when a device disconnects or a user changes a setting during a transition.
This is an engineering account of the mobile implementation. It does not make claims about clinical efficacy or measured sleep outcomes.
02 / SYSTEM MODEL
Accounts, saved routines, powernaps, playback controls and responsive state across Android and iOS.
Provider and Dart streams coordinate routine phases, UI updates, audio and device commands.
GATT discovery, characteristic writes and notifications carry commands and device state.
03 / MY CONTRIBUTION
JUNE 2023 TO PRESENTI developed the mobile application functionality: authentication and user settings, connected device flows, saved routines, evening and morning sequences, powernaps, audio controls and app side firmware update flows. I collaborated with hardware engineers on command behaviour and device integration. Firmware and hardware programming were outside my role.
Implemented scanning and device filtering, GATT service and characteristic discovery, write mode selection, notification subscriptions and reconnection behaviour. Connection state feeds the application so controls reflect device availability.
Built timed phases that adjust audio, light intensity, lens tint and volume together. Interpolation produces gradual transitions while pause and manual overrides preserve user control.
Used Provider, ChangeNotifier and Dart streams to connect UI and device state. Firebase Authentication and user scoped Firestore data support accounts and stored routines.
Encoded settings into device specific byte commands, mapped values to supported ranges and avoided redundant writes during transitions. Implemented the application side of firmware update workflows.
04 / INTERACTIVE EXPLANATION
Select a phase to see the relationship between playback, application timing and device controls.
Audio and device settings transition together as the routine begins.
CONCEPTUAL DIAGRAM / NOT A LIVE DEVICE CONNECTION05 / ENGINEERING EVIDENCE
DIAGNOSTIC TOOLINGThe team needed to distinguish device sampling from Bluetooth delivery. I built a separate Flutter accelerometer diagnostic application to inspect raw BLE packets, count notifications over timed windows and configure sampling and range settings.
That distinction matters: a sensor sample rate is not the same measurement as the notification rate received by a phone. The diagnostic app provides transport visibility, though this case study does not present benchmark data or claim a measured performance improvement.
Read about the diagnostic tool →TECHNICAL PERSPECTIVE
The substantive work was not a single screen or feature. It was the coordination of device commands, background audio, timed phases, persistent settings and application state into a usable mobile product.
CASE STUDY / SLEEPSANITY LLC / AAZIQ ALI SHAHFlutter, connected devices and the interfaces between them. If that fits what your team is building, I would be glad to hear from you.