Nightbrain
Sleep apps often reduce your sleep to a standardized score broadly applied to all users. The number I care about is directly related to how rested I feel, and that relationship is different for each person. None of the apps I used were fitting a model to my individual sleep patterns and how rested I felt each day.
- Built an iOS app in Swift and SwiftUI that pulls each night from the Oura API and pairs it with a one to five rating the next morning. The rating is the label and the biometrics are the features.
- Fit an n-of-1 model that refits itself every night, entirely on the device. The data lives in a local GRDB database and never leaves the phone.
- Designed the whole thing around honest uncertainty. Last night's data stays locked until you rate it, and no weight is shown until it clears a confidence threshold.
A working build that gets progressively more defined each morning. Early on the honest answer is usually "too uncertain to say", and the app is allowed to say it. The screens below walk through one morning.

















