<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dunoil</title>
    <description>The latest articles on DEV Community by dunoil (@dunoil).</description>
    <link>https://dev.to/dunoil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4253446%2Fd6119d17-299d-4305-ab1a-939808679aaa.jpg</url>
      <title>DEV Community: dunoil</title>
      <link>https://dev.to/dunoil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dunoil"/>
    <language>en</language>
    <item>
      <title>Firefly Cove, a night garden that breathes with you</title>
      <dc:creator>dunoil</dc:creator>
      <pubDate>Fri, 20 Nov 2026 00:24:14 +0000</pubDate>
      <link>https://dev.to/dunoil/firefly-cove-a-night-garden-that-breathes-with-you-3e92</link>
      <guid>https://dev.to/dunoil/firefly-cove-a-night-garden-that-breathes-with-you-3e92</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Firefly Cove&lt;/strong&gt; is a quiet night garden that is alive with &lt;em&gt;your&lt;/em&gt; physiology. Sit down in front of your webcam and the cove responds to you in real time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;fireflies glow with your heartbeat&lt;/strong&gt;, their brightness follows your live pulse waveform, and every detected heartbeat sends a ripple across the water.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;mist breathes with you&lt;/strong&gt;, the swell of the fog over the water is driven by your live chest-breathing waveform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moonrise&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;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 &lt;em&gt;are&lt;/em&gt; the experience, they should be visible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's built for one person, alone, taking a minute to slow down. No accounts, no wearables, nothing to install beyond the project itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2e6kx0ivdxr64ruwdkj1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2e6kx0ivdxr64ruwdkj1.png" alt="The consent card: nothing is measured until the visitor ticks the box and presses Begin" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhjaqscfxjizt7s7z58by.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhjaqscfxjizt7s7z58by.png" alt="The cove mid-session: pulse 75 bpm and breathing 16.0 br/min on the HUD, both waveforms drawing, a heartbeat ripple crossing the water" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/cDciHtuf5eg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Watch it on YouTube: &lt;a href="https://youtu.be/cDciHtuf5eg" rel="noopener noreferrer"&gt;https://youtu.be/cDciHtuf5eg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/dunoil/firefly-cove" rel="noopener noreferrer"&gt;https://github.com/dunoil/firefly-cove&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes full setup instructions (free Presage API key registration, &lt;code&gt;.env&lt;/code&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;Firefly Cove integrates the &lt;strong&gt;SmartSpectra SDK&lt;/strong&gt; through the official Node package (&lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 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 &lt;code&gt;Metrics&lt;/code&gt; packet with the SDK's own message classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pulse rate&lt;/strong&gt; (&lt;code&gt;cardio.pulseRate&lt;/code&gt;) drives the HUD readout and its confidence bar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arterial pressure trace&lt;/strong&gt; (&lt;code&gt;cardio.arterialPressureTrace&lt;/code&gt;) 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breathing rate&lt;/strong&gt; (&lt;code&gt;breathing.rate&lt;/code&gt;) drives the HUD and the Moonrise rule: stable readings at or under 10 br/min accumulate calm progress; faster breathing lets it ebb away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chest breathing trace&lt;/strong&gt; (&lt;code&gt;breathing.upperTrace&lt;/code&gt;) swells the mist and water layers through rolling min/max normalization, so the cove literally inhales and exhales with the visitor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HRV&lt;/strong&gt; (&lt;code&gt;cardio.hrv&lt;/code&gt;) is displayed whenever the SDK reports it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation status&lt;/strong&gt; events are surfaced verbatim as a guidance pill ("no face found", "too dark", …), so the SDK itself teaches the visitor how to be measured.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The SDK can also measure from a &lt;strong&gt;recorded video file&lt;/strong&gt; (&lt;code&gt;useFile()&lt;/code&gt;), 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;I'm entering &lt;strong&gt;both&lt;/strong&gt; prize categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use&lt;/strong&gt;, I wanted to see whether vitals could feel like a &lt;em&gt;place&lt;/em&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Thoughtful Real-World Use&lt;/strong&gt;, 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consent before camera&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local processing&lt;/strong&gt; The camera frames are processed locally, by the SDK inside the Node server on the visitor's own machine. No video is sent anywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing stored&lt;/strong&gt; No video, no metrics, no personal data are stored or shared. Stopping the session discards the stream; the stop button restores the idle scene.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional video-file mode&lt;/strong&gt; Judges can run the experience from a recorded file instead of a live camera.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No medical claims&lt;/strong&gt; Firefly Cove is a relaxation aid and a demo, not a medical device, and makes no diagnosis or treatment claims.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Waveforms are more useful than numbers.&lt;/strong&gt; The raw traces carry the timing of each beat and breath; the HUD numbers are only a summary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback latency is the whole UX.&lt;/strong&gt; A heartbeat ripple that arrives a second late feels broken; keeping the Server-Sent Events path short and local matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK ergonomics matter.&lt;/strong&gt; Decoding the SDK's own protobuf &lt;code&gt;Metrics&lt;/code&gt; messages in the server and sending the browser small JSON events kept the frontend simple and the data honest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation status is a feature, not an error.&lt;/strong&gt; Surfacing the SDK's "no face found" / "too dark" states as calm guidance made the measuring experience feel guided rather than broken.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tune Moonrise's difficulty&lt;/strong&gt; against more testers, so the calm threshold is challenging but reachable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a "calm session" summary&lt;/strong&gt; at the end of a run (average pulse and breathing rate, time in Moonrise).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try a second scene&lt;/strong&gt; driven by the same signals (a tide pool, a lantern festival) using the same metric pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Acknowledgements
&lt;/h2&gt;

&lt;p&gt;Thanks to the &lt;strong&gt;Presage&lt;/strong&gt; team for the SmartSpectra SDK and to the DEV team for running the challenge. The cover image is a still from the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
    </item>
  </channel>
</rss>
