<?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: Nicholas Kipngetich</title>
    <description>The latest articles on DEV Community by Nicholas Kipngetich (@nicholas_kipngetich_c1a1b).</description>
    <link>https://dev.to/nicholas_kipngetich_c1a1b</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%2F4202700%2Fcca5e039-f644-44f3-b800-68bac3350a72.jpg</url>
      <title>DEV Community: Nicholas Kipngetich</title>
      <link>https://dev.to/nicholas_kipngetich_c1a1b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nicholas_kipngetich_c1a1b"/>
    <language>en</language>
    <item>
      <title>CalmDesk AI — a workspace that responds to your breathing, and never shows a number it can't trust</title>
      <dc:creator>Nicholas Kipngetich</dc:creator>
      <pubDate>Sun, 08 Nov 2026 16:11:48 +0000</pubDate>
      <link>https://dev.to/nicholas_kipngetich_c1a1b/calmdesk-ai-a-workspace-that-responds-to-your-breathing-and-never-shows-a-number-it-cant-trust-1opa</link>
      <guid>https://dev.to/nicholas_kipngetich_c1a1b/calmdesk-ai-a-workspace-that-responds-to-your-breathing-and-never-shows-a-number-it-cant-trust-1opa</guid>
      <description>&lt;p&gt;What I Built&lt;br&gt;
Your laptop already has a sensor pointed at you all day: the webcam. CalmDesk AI turns it into a privacy-first, consent-first wellness companion for Windows (Electron + React + TypeScript) that responds to how you actually are instead of showing another dashboard nobody opens.&lt;/p&gt;

&lt;p&gt;It combines live breathing rate and pulse rate from the camera — via the Presage SmartSpectra SDK — with a workspace that acts on them:&lt;/p&gt;

&lt;p&gt;Live monitoring with full transparency. The camera preview is always visible while monitoring; you always know exactly what is captured.&lt;br&gt;
A breathing guide that adapts to your biology. Its pacing is derived from your last trusted measured breathing rate (slightly slower, ~40% inhale / 60% exhale), and the UI always tells you which mode you're in: "Adaptive pacing · from your measured 17 BPM" — or honestly "Fixed pattern · 4s in / 6s out" when no trusted signal exists.&lt;br&gt;
Offers, never nags. When your trusted measured breathing stays elevated (≥16 breaths/min for ≥20 consecutive frames), the dashboard offers a short guided pause. You can dismiss it; it never forces itself on you.&lt;br&gt;
Trust-first display. Numbers appear only when the SDK's confidence is real (post-warm-up, stable). Everything else is honestly labeled "Processing…", "unreliable", or shows the SDK's own quality hint verbatim — like "Use a camera mode that provides at least 25 frames per second."&lt;br&gt;
Privacy as a feature, not a checkbox. Blocking consent gate on first launch, withdrawable anytime; summary-only local history; one-click real deletion; SDK telemetry disabled; the exact data folder path disclosed in-app.&lt;br&gt;
Resilience. An app-wide error boundary replaces any crash with a calm recovery screen, and a clearly-labeled demo source lets every feature work offline when the camera or network can't cooperate.&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%2Fphotos.app.goo.gl%2Fkqwvc2rCbY9aYLtE9" 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%2Fphotos.app.goo.gl%2Fkqwvc2rCbY9aYLtE9" alt="Dashboard with valid readings" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://drive.google.com/file/d/1sSSHt8_EZH5n3GBMjvnaZqzX6BMhHyW5/view?usp=sharing" rel="noopener noreferrer" class="c-link"&gt;
            CalmDesk AI 2026-11-08 19-07-49.mp4 - Google Drive
          &lt;/a&gt;
        &lt;/h2&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fssl.gstatic.com%2Fdocs%2Fdoclist%2Fimages%2Fdrive_favicon_2026_32dp.png" width="32" height="32"&gt;
          drive.google.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Code&lt;br&gt;
Public repository: &lt;a href="https://github.com/Nicholas-Kipngetich/calmdesk-ai" rel="noopener noreferrer"&gt;https://github.com/Nicholas-Kipngetich/calmdesk-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup instructions &lt;br&gt;
git clone &lt;a href="https://github.com/Nicholas-Kipngetich/calmdesk-ai.git" rel="noopener noreferrer"&gt;https://github.com/Nicholas-Kipngetich/calmdesk-ai.git&lt;/a&gt;&lt;br&gt;
cd calmdesk-ai&lt;br&gt;
npm install&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Register a free Presage API key at https://physiology.presagetech.com/auth/register, then create a `.env` file in the project root (gitignored — keys never touch source):

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SMARTSPECTRA_API_KEY=your_key_here&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Run it:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
bash&lt;br&gt;
npm run dev&lt;/p&gt;

&lt;p&gt;On first launch the app asks for explicit consent before any camera use (declining keeps the app usable but monitoring off). Brand-new API keys can take ~45–60 s for first-start server provisioning — the app tolerates that deliberately. No key? The error card offers &lt;strong&gt;demo mode&lt;/strong&gt;: a clearly-labeled simulated source so every downstream feature works offline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing tips for judges:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs on Windows (tested on Windows 11); &lt;code&gt;npm run dev&lt;/code&gt; is the easiest path.&lt;/li&gt;
&lt;li&gt;The SDK's native runtime performs Windows certificate-revocation checks over plain HTTP port 80 (&lt;code&gt;crl/ocsp&lt;/code&gt; Amazon Trust endpoints). On networks that block all outbound port-80 HTTP, authorization cannot complete — documented with reproduction steps in &lt;code&gt;docs/INTEGRATION-NOTES.md&lt;/code&gt;. A phone hotspot or usual home/office network works.&lt;/li&gt;
&lt;li&gt;In dim rooms, webcams drop below the SDK's 25 fps requirement — the app surfaces the SDK's own guidance rather than showing untrustworthy numbers. Brighten the room for best results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/Nicholas-Kipngetich/calmdesk-ai.git" rel="noopener noreferrer"&gt;https://github.com/Nicholas-Kipngetich/calmdesk-ai.git&lt;/a&gt;&lt;br&gt;
cd calmdesk-ai&lt;br&gt;
npm install&lt;br&gt;
Register a free Presage API key at &lt;a href="https://physiology.presagetech.com/auth/register" rel="noopener noreferrer"&gt;https://physiology.presagetech.com/auth/register&lt;/a&gt;, then create a .env file in the project root (gitignored — keys never touch source):&lt;/p&gt;

&lt;p&gt;SMARTSPECTRA_API_KEY=your_key_here&lt;br&gt;
Run it:&lt;/p&gt;

&lt;p&gt;npm run dev&lt;br&gt;
On first launch the app asks for explicit consent before any camera use (declining keeps the app usable but monitoring off). Brand-new API keys can take ~45–60 s for first-start server provisioning — the app tolerates that deliberately. No key? The error card offers demo mode: a clearly-labeled simulated source so every downstream feature works offline.&lt;/p&gt;

&lt;p&gt;Testing tips for judges:&lt;/p&gt;

&lt;p&gt;Runs on Windows (tested on Windows 11); npm run dev is the easiest path.&lt;br&gt;
The SDK's native runtime performs Windows certificate-revocation checks over plain HTTP port 80 (crl/ocsp Amazon Trust endpoints). On networks that block all outbound port-80 HTTP, authorization cannot complete — documented with reproduction steps in docs/INTEGRATION-NOTES.md. A phone hotspot or usual home/office network works.&lt;br&gt;
In dim rooms, webcams drop below the SDK's 25 fps requirement — the app surfaces the SDK's own guidance rather than showing untrustworthy numbers. Brighten the room for best results.&lt;br&gt;
How It Responds to Human Signals&lt;br&gt;
Live Presage signals used: breathing rate (always) and pulse rate (pulse bundle requested when the API key supports cardio, with a graceful breathing-only fallback if configuration reports otherwise). Raw frames are decoded from the SDK's metrics payload and mapped into the app's typed SignalFrame contract.&lt;/p&gt;

&lt;p&gt;Real-time responses:&lt;/p&gt;

&lt;p&gt;Adaptive breathing pacing: target = clamp(0.85 × measured BPM, 6–12 BPM), 40% inhale / 60% exhale — applied between breaths, never mid-breath, so the guided circle never jerks. Labelled with its source: "from your measured X BPM".&lt;br&gt;
Sustained-elevation prompt: trusted breathing ≥16 BPM across ≥20 consecutive frames → a dismissible offer to open the breathing guide. After dismissal it only returns on new sustained evidence.&lt;br&gt;
Workspace modes: Focus / Breathing / Break ambience, plus a global Quiet mode that slows every animation — the workspace itself calms down.&lt;br&gt;
Integration walkthrough (the official Electron pattern, hardened):&lt;/p&gt;

&lt;p&gt;The renderer SDK (@smartspectra/node-sdk/renderer) acquires the camera via getUserMedia and emits streamAvailable (live preview), metrics (decoded via @smartspectra/node-sdk/messages), validationStatus (official hint surfaced verbatim), and error (graceful degrade, single retry breathing-only on kConfigurationFailed).&lt;br&gt;
The preload bridge (@smartspectra/node-sdk/preload) is bundled inside our sandboxed preload — sandboxed preloads can't require() external packages, solved with externalizeDepsPlugin({ exclude: ['@smartspectra/node-sdk'] }) (a real gotcha for Electron + this SDK).&lt;br&gt;
The main process owns the native session via bindSmartSpectraIpc(window), with contextIsolation: true, nodeIntegration: false, sandbox: true, and a camera permission gate that grants media only to the app's own page.&lt;br&gt;
My app's own IPC is a six-channel explicit allowlist (app:info, app:config, privacy:get/set, history:append/list/clear), typed end-to-end, with renderer payloads validated in main. The API key lives in a gitignored .env, read only in main, delivered only via the allowlisted app:config channel.&lt;br&gt;
Trust rules enforced in code (from Presage's official guidance): confidence 0 = warm-up window not filled (~30 s breathing, ~12 s pulse) → shown as "Processing…", never a number; stable === false → treated as untrusted; non-OK validation codes → the SDK's own hint, verbatim; per-session averages are computed from valid measurements only — a session with no trusted readings is stored as exactly that, never with invented numbers.&lt;/p&gt;

&lt;p&gt;Prize Categories&lt;br&gt;
I'm entering both (allowed):&lt;/p&gt;

&lt;p&gt;Best Thoughtful Real-World Use: desk workers spend hours ignoring their own tension. CalmDesk gives them an honest, non-intrusive companion that responds only to trusted signals, never nags (offers are dismissible and honest), and treats consent + data minimization as first-class product features. Usability choices follow directly from that philosophy: plain-language guidance, no numbers on untrusted data, exact disclosure of what is stored where, and real (verified) deletion.&lt;br&gt;
Most Creative or Delightful Use: the breathing guide literally breathes with you — then slower than you: pacing derived live from your own measured breathing, animated circle following it, and a Quiet-mode ambience that slows the whole workspace down — a deliberate, playful adaptation loop visible in every screen.&lt;br&gt;
Consent and Data Handling&lt;br&gt;
Camera consent: a blocking first-run dialog explains what the camera is used for, what is (and is not) stored, that SDK telemetry is disabled, and that this is not a medical device. Consent is persisted (runs once per data folder), withdrawable any time in Settings — and monitoring refuses to start until re-consented. Electron grants camera access only to the app's own page, media-only.&lt;br&gt;
Storage: session history stores summaries only — duration, mode, averages over valid readings, seconds of good signal. Raw camera frames, video, and images are never stored anywhere. Data lives in two plain JSON files (privacy.json, session-history.json, capped at 500 records) in the app's data folder, whose absolute path is shown inside Settings. I deliberately used inspectable plain files instead of a database: anyone can open them and see exactly what is stored.&lt;br&gt;
Retention &amp;amp; deletion: history can be toggled off entirely (nothing is then written), and "Delete all history" truly empties the store — verified on-disk during development.&lt;br&gt;
Sharing / third parties: nothing else leaves the machine. The SmartSpectra SDK itself contacts Presage's authorization servers for usage verification as required by its terms; CalmDesk AI uploads no video, images, or metrics of its own. SDK telemetry is explicitly disabled (enableTelemetry: false) and disclosed.&lt;br&gt;
Optional AI service use: none. No AI API is called by the app; all signal processing runs on-device in the SmartSpectra pipeline. (AI coding tools helped build the project — see the repository history.)&lt;/p&gt;

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