Inspiration
Reflex was inspired by a simple problem: we can track steps and sleep, but most of us still miss the moment when mental fatigue starts while working on a laptop. During long coding and study sessions, we noticed burnout creeping in before we realized it. We wanted a tool that could quietly detect cognitive strain from normal computer behavior, then intervene early with gentle break nudges, without requiring a wearable.
What it does
Reflex is a native macOS menu bar app that estimates cognitive load in real time using passive interaction signals like typing rhythm variance, backspace ratio, inter-key pauses, mouse jitter, scrolling behavior, and context switching. It converts these signals into a live 0–100 cognitive load score and surfaces trends in a dashboard. When sustained strain or long continuous focus is detected, it triggers smart break flows, including quick reminders, breathing overlays, and eye-rest prompts (20-20-20 style). Everything runs locally with no telemetry.
How we built it
We built Reflex in Swift using SwiftUI/AppKit patterns for a lightweight menu bar experience, plus background services for keyboard/mouse/app-switch monitoring and persistence. The scoring core is a weighted heuristic engine with baseline calibration and smoothing to reduce noise. Conceptually, the model follows:
[ L_t = \mathrm{EMA}\left(\sum_{i=1}^{n} w_i s_i + f(t)\right), \quad \sum_{i=1}^{n} w_i = 1 ]
where (s_i) are normalized behavior signals, (w_i) are tuned weights, and (f(t)) is a fatigue term that grows during long uninterrupted sessions. We then map (L_t) to break triggers and escalation logic for missed breaks.
Challenges we ran into
Getting reliable signal quality without capturing sensitive content was the hardest challenge. macOS accessibility and event monitoring required careful permission handling and robust fallbacks. Another challenge was reducing false positives: early prototypes were too sensitive and interrupted flow. We also had to balance “effective” reminders with “annoying” reminders, which pushed us to add snooze/skip controls and natural-break detection.
Accomplishments that we're proud of
We shipped a fully local, privacy-first cognitive load monitor with a polished menu bar UX and actionable interventions. We’re proud of the multi-trigger break system (load-based, time-based, and eye-rest), baseline adaptation, and fatigue-aware scoring that still works during “steady” flow states. The app feels practical in day-to-day use instead of being just a dashboard.
What we learned
We learned that behavior-aware wellness tools are as much a UX problem as a modeling problem. A “good” score is useless if interventions are mistimed or feel punitive. We also learned how far simple, interpretable heuristics can go when combined with thoughtful smoothing, calibration, and feedback loops. Finally, privacy constraints forced better engineering decisions and improved user trust.
What's next for Reflex
Next, we plan to add deeper personalization with on-device adaptation, better long-term insights across sessions, and smarter context-aware reminders based on workload patterns. We also want to improve calibration speed, expose clearer “why this score” explanations, and refine break coaching modes for different work styles (coding, writing, studying, meetings). The goal is to make Reflex feel less like a timer and more like a cognitive co-pilot.
Built With
- appkit
- applicationservices
- charts
- combine
- core-ml
- foundationdb
- json
- macos
- servicemanagement
- swift
- swiftui
- usernotifications
- xcode
- xcodegen
Log in or sign up for Devpost to join the conversation.