This is a submission for the Presage SmartSpectra SDK Challenge
General Wellness Disclaimer: CadenceDesk is a focus ergonomics and personal wellness companion tool. It is not a medical device, has not been evaluated by the FDA, and does not diagnose, treat, cure, prevent, or guide clinical decisions for any condition.
What I Built
Modern desk workers frequently fall victim to two invisible, unconscious physical habits during deep cognitive focus:
- Desk-Worker Breath-Holding: Holding or excessively shallowing one's breath during intense debugging, writing, or reading stressful messages.
- Reduced Blink Cadence: Prolonged screen staring causes natural blink frequency to plummet from ~18 blinks/minute down to fewer than 5, causing dry eyes and digital ocular fatigue.
CadenceDesk is an open-source, cross-platform desktop application built on Electron 43 + Node.js 24 LTS + @smartspectra/node-sdk v3.5.0 that turns standard webcams into a contactless, privacy-hardened focus ergonomics workstation.
Instead of building a passive medical dashboard that displays noisy, uncalibrated numbers, CadenceDesk implements a unit-tested Signal Trust & Gating Engine with closed-loop adaptive interventions:
- Breath-Hold Pause Cue: Real-time variance tracking on the chest respiratory trace triggers a soft, expanding peripheral breathing halo when an 8-second cessation occurs, gently restoring diaphragmatic pacing without jarring popups.
- Blink-Cadence Reminder: Tracks rolling blink rate and eye-closure intervals; when blink gaps exceed 12 seconds, subtle peripheral luminance reminders stimulate the natural involuntary blink reflex.
- Dual-Trace Oscilloscope: High-performance 60 FPS native HTML5 Canvas visualizer rendering live Arterial Pulse Plethysmogram and Chest Respiration waveforms side-by-side.
- Signal-Gated Ambient Breath Audio: Pure Web Audio API procedural synthesizer whose low-pass filter cutoff (180 Hz → 850 Hz) sweeps with live chest expansion, fading to silence whenever signal confidence drops.
- Honest Session Trust Receipt: Generates a post-session verification report displaying exact valid-frame percentages and coverage metrics—refusing to fake scores on noisy or low-light data.
- Calibrated Bio-Simulator Mode: Reviewers and judges can immediately test the entire application pipeline even without a physical camera or API key.
Demo
Video Walkthrough (48s): Click to Watch Full Demo Video (MP4)
Key Demo Milestones:
- 0:00 – 0:10: Explicit In-App Consent Shield & General Wellness Framing
- 0:10 – 0:25: Progressive 4-Tier Warm-Up progression (Face 0s → Pulse 12s → Respiration 30s → HRV 60s)
-
0:25 – 0:35: Speech Guard demonstration (
face.talkingpausing respiration scoring with 600ms debounce) - 0:35 – 0:42: Breath-Hold Pause detection & restorative breathing halo
- 0:42 – 0:48: Session Signal Trust Receipt review, JSON export, and instant memory purge
Code
GitHub Repository: https://github.com/SriRamKunamsetty/cadencedesk
Setup & Reproducible Execution:
# 1. Clone repository
git clone https://github.com/SriRamKunamsetty/cadencedesk.git
cd cadencedesk
# 2. Install dependencies (Node 24 LTS recommended)
npm install
# 3. Run the automated unit test suite (15 tests passing in <1s)
npm test
# 4. Configure your Presage API Key
export SMARTSPECTRA_API_KEY="YOUR_KEY_HERE" # or $env:SMARTSPECTRA_API_KEY="YOUR_KEY_HERE" on Windows
# 5. Launch CadenceDesk
npm start
(Note: If no webcam or API key is provided, the app automatically offers the **Calibrated Bio-Simulator Mode* to verify all waveforms, gating states, and ergonomics triggers).*
How It Responds to Human Signals
CadenceDesk integrates the official @smartspectra/node-sdk (v3.5.0) via Koffi C-ABI pure-FFI bindings into Electron. Every incoming protobuf packet decoded via @smartspectra/node-sdk/messages passes through our pure-function Signal Gate (src/core/signal-gate.js):
┌────────────────────────┐ ┌────────────────────────┐ ┌────────────────────────┐
│ SmartSpectra SDK 3.5 │ ───► │ Signal Trust Gate │ ───► │ Ergonomics & Work UI │
│ - 640x480 @ 30fps │ │ - Warm-Up Validation │ │ - Dual-Trace Canvas │
│ - decodeMetrics Proto │ │ - Speech Guard │ │ - Breath Halo Cue │
│ - Telemetry: Disabled │ │ - Multi-Face Pause │ │ - Ambient Breath Synth │
└────────────────────────┘ └────────────────────────┘ └────────────────────────┘
The Progressive 4-Tier Gating Contract:
-
Face Presence & Speech Guard (0s Warm-Up):
- Validated on
validationStatus === kOk. -
Multi-Face Auto-Pause: If a second person enters the frame (
kMultipleFacesFound), sensing pauses immediately and the screen blurs to protect bystander privacy. -
Speech Guard: When
face.talking.detected === true, breathing rate updates are temporarily held with a 600ms debounce window after talking ends, preventing conversational speech from corrupting respiratory statistics.
- Validated on
-
Pulse Rate & Arterial Waveform (12s Warm-Up):
- Gated on
stable === true && confidence >= 40(40–180 BPM range). - Feeds the cyan channel on our 60 FPS dual-trace oscilloscope.
- Gated on
-
Respiration Rate & Chest Trace (30s Warm-Up):
- Gated on
stable === true && confidence >= 45(5–40 BR/min range). - Evaluates rolling variance over the last 8 seconds of
breathing.upperTrace. When variance drops below 0.035 for 8 continuous seconds during silence, the Breath-Hold Pause Cue activates the recovery halo.
- Gated on
-
Heart Rate Variability (60s Warm-Up):
- Gated on
stable === true && confidence >= 50. - Computes RMSSD, SDNN, and Baevsky Stress Index only after the full 60s stabilization window locks; never faked or estimated prematurely.
- Gated on
Prize Categories
1. Best Thoughtful Real-World Use (Primary Entry)
- The Real-World Need: Desk workers, programmers, and knowledge workers unconsciously hold their breath and reduce blink frequency by over 70% during intense concentration, accumulating ocular fatigue and physical stress without realizing it.
- Non-Punitive Ergonomic Design: Unlike apps that interrupt users with jarring popups or modal lockouts, CadenceDesk uses ambient peripheral cues (a soft breathing halo and gentle light shimmers) that guide natural physiological recovery without breaking cognitive flow.
- Responsible Data Handling: Features main-process consent enforcement, multi-face auto-pause, explicit non-medical disclaimers, and a Session Trust Receipt that transparently scores session data fidelity.
2. Best Overall Human-Sensing Experience
- Deep Multi-Modal Fusion: Combines Face, Cardio, Respiration, and HRV into a unified 60 FPS workstation.
- Production-Grade Engineering: Verified with 15 automated Vitest unit tests covering timestamp parsing, warm-up progression, talking debounce, and privacy invariants.
- Pre-Flight Camera Diagnostics: Automatically checks camera capture speed ($\ge 28\text{ FPS}$) before initiating sensing to protect user developer credits from low-light degraded runs.
3. Most Creative or Delightful Use
-
Bio-Generative Ambient Audio: Uses the Web Audio API to procedurally synthesize a warm harmonic drone whose low-pass filter tracks the user's real-time lung inflation (
upperTrace), automatically fading to silence if signal trust drops.
Consent and Data Handling
CadenceDesk was engineered under strict privacy-by-design principles in accordance with the official challenge rules:
-
Explicit Per-Session Camera Consent:
- Electron's main process blocks all camera permissions by default. Camera access is granted only after the user reviews our in-app disclosure and checks: "I am 18+, I am the only person in camera view, and I consent to live on-device optical sensing."
- Microphone access is denied unconditionally (
audio: false).
-
100% On-Device Processing in RAM:
- Raw video frames captured from the local camera feed are processed entirely in volatile memory (RAM) via
@smartspectra/node-sdkand native Koffi FFI. - Zero video or audio frames are ever recorded, saved to local disk, or transmitted over the internet.
- Raw video frames captured from the local camera feed are processed entirely in volatile memory (RAM) via
-
SDK Telemetry Disabled by Default:
-
enableTelemetry: falseis hardcoded at SDK initialization (and validated by our automated test suite intests/privacy-defaults.test.js).
-
-
Network Access & Third-Party Disclosures:
- The application connects to Presage's servers (
https://*.presagetech.com) strictly for API key authentication and license gating. - As disclosed in community audits of SmartSpectra SDK v3.5.0, the native SDK emits periodic background insight check-in events (~once per minute); CadenceDesk never requests insights and discards these payloads silently unread.
- Zero external analytics, zero tracking cookies, and zero cloud AI services are used.
- The application connects to Presage's servers (
-
Data Retention & Instant Memory Purge:
- All metrics exist solely in memory for the duration of the active session.
- Users can click "Export JSON" to save an anonymized audit log locally, or click "Purge Memory" to immediately erase all buffers.
Agent Session
This project was built with the assistance of Google Antigravity. The architectural reasoning, competitive analysis across all 56 submitted projects, and automated unit test suite verification were developed in a dedicated agentic session. All API keys and credentials were scrubbed prior to publishing.

Top comments (0)