Building NightGuard: The Irony of Sleep
How staying up late for 3 months helped me build an app to fix my sleep.
I built NightGuard for a selfish reason: I was tired.
Like many, I relied on sleep trackers and iOS Screen Time to manage my rest. But they never felt cohesive. Screen Time was too easy to ignore, and sleep trackers were just passive observers. I wanted something that actively connected the two—forcing me to disconnect before bed while tracking the quality of my rest during it.
The Journey (July - November)
I wrote the first line of code on July 1st, 2025.
The goal was simple: combine Sleep Tracking, App Blocking, and Habit Checklists into one seamless flow. I wanted to build a tool that I would actually use every night.
Learning by Doing
This project was the definition of “Learning by Doing.” I didn’t verify a theory; I built a product.
- HealthKit was complex.
- DeviceActivity API (Screen Time) was notoriously undocumented.
- SwiftUI animations required weeks of tweaking.
I spent countless hours reading documentation, scouring forums, and asking mentors. Every feature in the app represents a hurdle I tripped over and eventually climbed.
The Irony
It took three months of intense development and testing to get it right. And here is the punchline:
To build an app that helps people sleep better, I ruined my own sleep schedule. I spent nights debugging “Wind Down” notifications at 2:00 AM, ironically testing if the app would help me go to bed at 11:00 PM.
Future
NightGuard isn’t perfect. There are bugs I’m still squashing and features I want to polish. But seeing it go from a personal tool to something that 50+ other people are using is a surreal feeling.
I hope it helps you get some rest. I certainly need some now.