DEV Community

Cover image for Prelude: a calm pause before your standup, guided by your own breath
Mario Bustos Jimenez
Mario Bustos Jimenez

Posted on

Prelude: a calm pause before your standup, guided by your own breath

Presage SmartSpectra SDK Challenge Submission

This is a submission for the Presage SmartSpectra SDK Challenge

What I Built

Prelude is a 90-second breathing pause for right before the daily standup.

I kept jumping from a bug straight into the standup, still wound up. So I built the pause in between. Prelude reads your breathing from the webcam with the SmartSpectra SDK, starts the guide at your current pace and slows it down from there. At the end it tells you (and only you) how you're arriving.

Guided pause with the live signal, cropped from the video

A few things I cared about:

  • The guide adapts. It starts at the breathing rate the SDK just measured and eases down to the technique's pace. A lavender ring around the circle shows your actual chest movement, so you can see if you're in step.
  • Honest signals. Each signal has a real countdown ("ready in 18 s"). If the SDK can't stabilise a reading, the app says so and leaves it out instead of faking a number.
  • Your face doesn't decide. Expression is shown as a hint but never used for the result. Facial expressions don't reliably map to emotions (Barrett et al., 2019), and the EU AI Act bans emotion inference at work.
  • Small touches: four breathing techniques with sources, generated sounds (including your own breathing turned into sound), an optional spoken guide, a "meetings up next" strip (from a local PRELUDE_MEETINGS setting or a labelled example, no calendar access), and a 1–5 mood check before and after. English and Spanish, light and dark.

Demo

One take with the live signal: consent, getting ready, the guided pause, and the result. This is the summary from that take (straight from Copy my summary):

Reading: You are arriving calm
Breathing: 11.1 br/min before, 6.1 br/min at the end
Pulse: 84 bpm before, 92 bpm at the end
Stress index: 1.05 (low confidence) before, 0.53 (low confidence) at the end
You breathed in step with the guide for 1:28 (98%). Calm moments: 2.
⭐ Football Update: mario bustosjimenez fd/prelude a calm pause before your standup guided by your own breath io - Info Live Streaming 2026 ⭐ Football Update: mario bustosjimenez fd/prelude a calm pause before your standup guided by your own breath io - Info Live Streaming 2026

HRV never stabilised on my webcam, so stress shows as low confidence and doesn't count. The "calm" result is a read of how you arrive (breathing and pulse both under the thresholds), not a claim that the pause lowered your pulse. Mine actually went up a bit.

The live take, cropped from the video

Code

Repo: github.com/mariobustosjmz/respira-presage-challenge

Node 22.12+ and a free Presage key:

git clone https://github.com/mariobustosjmz/respira-presage-challenge.git
cd respira-presage-challenge
npm install
echo "SMARTSPECTRA_API_KEY=your_key" > .env
npm start
⭐ Football Update: mario bustosjimenez fd/prelude a calm pause before your standup guided by your own breath io - Info Live Streaming 2026 ⭐ Football Update: mario bustosjimenez fd/prelude a calm pause before your standup guided by your own breath io - Info Live Streaming 2026

npm test runs 65 unit tests, no camera needed. There's a demo mode if you don't have a key, and npm run dist:mac builds a macOS installer.

How It Responds to Human Signals

Electron + TypeScript on @smartspectra/node-sdk 3.5.0. All SDK code lives in one folder. The decisions (pacer, readiness, the result rule) are plain functions with tests.

Signal SDK field What Prelude does with it
Breathing rate breathing.rate Readiness, the guide's starting pace, "in step" feedback, before/after
Chest movement breathing.upperTrace Live meter, the ring around the guide, the "your breath as sound" mode
Pulse, HRV, stress cardio.* Before/after, only when the SDK marks them stable
Expression face.expression Shown as a hint, never decides
Talking face.talking "Readings need silence" note; those seconds don't count
Setup check checkDeviceReadiness() Optional check before starting (~23 s on my MacBook)

Things I learned from the real SDK:

  • A sandboxed preload can only require Electron modules, so I bundle the preload with esbuild.
  • Packets arrive with partial fields, so I merge them as they come.
  • face.talking flickers mid-sentence. Bridging gaps under 600 ms fixed it.
  • face.blinking fires per blink, not "eyes closed". I'd built "close your eyes and the voice starts" and removed it after testing. The spoken guide is a toggle now.
  • destroy() frees the camera right away. stop() can wait up to 30 s.
  • Closing the window mid-session crashed the native layer. Now the app releases the SDK first, then closes.

The result rule is on screen: "tense" if stress rose more than 10% (only when reliable), breathing on arrival was over 20 br/min, or pulse over 100 bpm. The 10% is my design choice, not a clinical threshold, and the app says that too.

Prize Categories

Best Thoughtful Real-World Use. It targets one everyday moment, meets you at your own pace, asks for consent per signal, shows signal quality instead of fake precision, and stores nothing.

Consent and Data Handling

  • Consent first. The camera stays off until you tick "I agree to turn on my camera". Pulse/HRV/stress is a separate opt-in. While it's on you see a preview, a "Camera on" badge and a Stop button.
  • Camera only. Electron grants the camera to the app's own page, never the microphone. No remote content.
  • No video kept. Prelude never records, saves or sends camera frames itself; it only hands them to the SDK to read the signals.
  • Nothing stored. Numbers live in memory and are gone when you close the window. No accounts, no analytics. Copy my summary only touches your clipboard when you press it.
  • Network. The app makes no requests of its own. The SDK talks to Presage to check the key and count credits. SDK telemetry is off.
  • Not medical, not monitoring. General wellness only. It's a personal check, not a way to evaluate anyone on a team.

References: Balban et al. 2023 (doi:10.1016/j.xcrm.2022.100895), Lehrer & Gevirtz 2014 (doi:10.3389/fpsyg.2014.00756), Zaccaro et al. 2018 (doi:10.3389/fnhum.2018.00353), Barrett et al. 2019 (doi:10.1177/1529100619832930), EU AI Act Art. 5(1)(f).

Top comments (0)