### 💡 Inspiration: The Snooze Trap
We’ve all been there: you set five different alarms at night with the best intentions. But when morning
arrives, muscle memory takes over. In a half-asleep daze, you swipe the screen, silence the noise, and wake up
an hour later filled with guilt and rushed chaos.
Standard phone alarms fail because they demand zero physical or cognitive effort to dismiss. We asked
ourselves: What if an alarm couldn’t be turned off from the comfort of your bed? What if waking up on time was
tied to a physical location in your house and celebrated like a game? That question led to Lumi.
### 🚀 What We Built
Lumi is a smart, physical-anchor alarm companion designed to make oversleeping virtually impossible.
Instead of an easy swipe, Lumi requires you to engage with the real world:
• 🏷️ Physical Anchors (NFC & QR): Place an NFC tag on your bathroom mirror or coffee maker. The alarm will only
turn off when you walk over and scan it.
• 🧠 Cognitive & Physical Challenges: Step-counters (e.g., walk 50 steps), arithmetic puzzles, and memory
typing challenges that activate prefrontal cortex alertness before you can silence the app.
• 📊 Deterministic Heatmap & Streaks: A GitHub-style daily contribution grid that visualizes consistency.
• ✨ Lumi the Companion: An expressive in-app guide that tracks your morning momentum, adapts its mood based on
your wake-up consistency, and rewards discipline.
### 🛠️ How We Built It
We engineered Lumi with an offline-first, ultra-resilient mobile stack:
• Flutter & Riverpod: Powers a 60fps dynamic UI, fluid micro-interactions, and reactive state management across
Android and iOS.
• Isar Database: Embedded, blazing-fast NoSQL database delivering instant cold starts (<15 ms) with zero UI
layout shift.
• Supabase & PostgreSQL: Manages user authentication, profile data, and silent, idempotent cloud backup merges.
• Native Android Foreground Services & Exact Alarms: Integrated low-level system scheduling
(SCHEDULE_EXACT_ALARM, high-priority wake locks, overlay windows) so alarms ring reliably regardless of OS doze
modes.
• Mixpanel & RevenueCat: End-to-end event analytics and subscription management.
### 🧗 Challenges We Conquered
- The Modern OS Background "Battery Killers":
Modern operating systems (especially aggressive OEM skins like Samsung OneUI and Xiaomi MIUI) aggressively kill background tasks. We had to build multi-tiered failsafes—combining native foreground services, exact alarm
managers, full-screen intent window bypasses, and smart battery optimization prompts to guarantee 100% alarm
reliability. Timezones, DST Shifts & Deterministic Streaks:
Calculating streaks across daylight saving time (DST) transitions using raw 24-hour durations causes ±1 hour
drift bugs. We designed a pure calendar-space aggregation engine where each day d is mapped strictly to a local calendar key:DayKey (t) = Date ⎛year ⎛t ⎞,month ⎛t ⎞,day ⎛t ⎞⎞
⎝ ⎝ local⎠ ⎝ local⎠ ⎝ local⎠⎠
The current streak
S
current
is computed backwards as a pure recurrence relation:
N
S = ∑ 𝕀 Big (Status (d - k) ∈ { Completed,Emergency } Big)
current k=0
locking the day's status immutably to the very first alarm of the day.
- Seamless Offline-to-Cloud Sync:
Handling offline alarm dismissals without creating duplicate history entries required building a custom mutex- locked, atomic upsert pipeline that synchronizes local UUIDs seamlessly with Supabase.
### 🎓 What We Learned
Building Lumi taught us that effective habit formation requires bridging digital software with physical
friction. We mastered deep mobile lifecycle management, low-level native permissions, and building rock-solid,
offline-first architectures that users can trust with the most important part of their day: their morning.
Log in or sign up for Devpost to join the conversation.