This is a submission for the Presage SmartSpectra SDK Challenge
What I Built
Firefly Cove is a quiet night garden that is alive with your physiology. Sit down in front of your webcam and the cove responds to you in real time:
- The fireflies glow with your heartbeat, their brightness follows your live pulse waveform, and every detected heartbeat sends a ripple across the water.
- The mist breathes with you, the swell of the fog over the water is driven by your live chest-breathing waveform.
- Moonrise is a tiny game played with no controller: breathe slowly (a stable rate under 10 breaths/min) and hold it, and the moon climbs, the stars come out, and the fireflies turn gold.
- A live HUD shows your pulse (bpm), breathing rate (br/min), HRV when the SDK reports it, per-measurement confidence, and a waveform strip plotting the actual breathing and pulse traces, because the signals are the experience, they should be visible.
It's built for one person, alone, taking a minute to slow down. No accounts, no wearables, nothing to install beyond the project itself.
Demo
Watch it on YouTube: https://youtu.be/cDciHtuf5eg
Code
https://github.com/dunoil/firefly-cove
The repository includes full setup instructions (free Presage API key registration, .env configuration, camera mode and video-file mode). The whole app is one Node server plus a static page, no build step, no database, no framework.
How It Responds to Human Signals
Firefly Cove integrates the SmartSpectra SDK through the official Node package (@smartspectra/node-sdk v3.5.0), running in its headless camera mode inside a small Node server. The server requests the SDK's breathing and cardio metric bundles and decodes every protobuf Metrics packet with the SDK's own message classes:
-
Pulse rate (
cardio.pulseRate) drives the HUD readout and its confidence bar. -
Arterial pressure trace (
cardio.arterialPressureTrace) is the heartbeat of the scene: it modulates firefly glow continuously, and a mean-crossing detector on the trace fires a water ripple for each beat. -
Breathing rate (
breathing.rate) drives the HUD and the Moonrise rule: stable readings at or under 10 br/min accumulate calm progress; faster breathing lets it ebb away. -
Chest breathing trace (
breathing.upperTrace) swells the mist and water layers through rolling min/max normalization, so the cove literally inhales and exhales with the visitor. -
HRV (
cardio.hrv) is displayed whenever the SDK reports it. - Validation status events are surfaced verbatim as a guidance pill ("no face found", "too dark", …), so the SDK itself teaches the visitor how to be measured.
Decoded metrics are normalized into small JSON events and streamed to the browser over Server-Sent Events; all scene rendering happens locally in a canvas. When no signal is present, the scene idles dimly and the HUD shows dashes, the experience never pretends to have data it doesn't.
The SDK can also measure from a recorded video file (useFile()), which the project supports as a first-class mode: it makes the experience testable without a camera and gives judges a reproducible way to run it.
Prize Categories
I'm entering both prize categories:
Most Creative or Delightful Use, I wanted to see whether vitals could feel like a place instead of a dashboard. Firefly Cove turns two physiological waveforms into weather: your pulse becomes light, your breath becomes mist, and calming your own body becomes the only game mechanic. The win state isn't a score, it's a moonrise you caused by actually relaxing.
Best Thoughtful Real-World Use, Slow, deliberate breathing is one of the simplest evidence-informed ways to downshift during a stressful workday, but it's hard to stick with when you're just counting in your head. Firefly Cove gives the practice a gentle, visible feedback loop with zero wearables and zero setup. It is designed for exactly the people who would never open a "wellness dashboard": consent-first, nothing stored, nothing shared, and a stop button that forgets everything. It is a relaxation aid only, it makes no diagnosis or treatment claims and is not a medical device.
Consent and Data Handling
- Consent before camera The camera cannot start until the visitor reads an in-app consent card, covering what is measured, how it is processed, and what is (not) stored, and actively ticks a checkbox. The Begin button is disabled until they do.
- Local processing The camera frames are processed locally, by the SDK inside the Node server on the visitor's own machine. No video is sent anywhere.
- Nothing stored No video, no metrics, no personal data are stored or shared. Stopping the session discards the stream; the stop button restores the idle scene.
- Optional video-file mode Judges can run the experience from a recorded file instead of a live camera.
- No medical claims Firefly Cove is a relaxation aid and a demo, not a medical device, and makes no diagnosis or treatment claims.
What I Learned
- Waveforms are more useful than numbers. The raw traces carry the timing of each beat and breath; the HUD numbers are only a summary.
- Feedback latency is the whole UX. A heartbeat ripple that arrives a second late feels broken; keeping the Server-Sent Events path short and local matters.
-
SDK ergonomics matter. Decoding the SDK's own protobuf
Metricsmessages in the server and sending the browser small JSON events kept the frontend simple and the data honest. - Validation status is a feature, not an error. Surfacing the SDK's "no face found" / "too dark" states as calm guidance made the measuring experience feel guided rather than broken.
What's Next
- Tune Moonrise's difficulty against more testers, so the calm threshold is challenging but reachable.
- Add a "calm session" summary at the end of a run (average pulse and breathing rate, time in Moonrise).
- Try a second scene driven by the same signals (a tide pool, a lantern festival) using the same metric pipeline.
Acknowledgements
Thanks to the Presage team for the SmartSpectra SDK and to the DEV team for running the challenge. The cover image is a still from the app.


Top comments (0)