<?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: Daniel Ndubuisi</title>
    <description>The latest articles on DEV Community by Daniel Ndubuisi (@daniel_ndubuisi_061b5303c).</description>
    <link>https://dev.to/daniel_ndubuisi_061b5303c</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%2F4250396%2F5ad18bd9-6313-439d-bfb3-5ecd461c27e1.png</url>
      <title>DEV Community: Daniel Ndubuisi</title>
      <link>https://dev.to/daniel_ndubuisi_061b5303c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daniel_ndubuisi_061b5303c"/>
    <language>en</language>
    <item>
      <title>Kin: a consent-first portrait driven by live pulse and breathing</title>
      <dc:creator>Daniel Ndubuisi</dc:creator>
      <pubDate>Mon, 23 Nov 2026 03:45:33 +0000</pubDate>
      <link>https://dev.to/daniel_ndubuisi_061b5303c/kin-a-consent-first-portrait-driven-by-live-pulse-and-breathing-3kj3</link>
      <guid>https://dev.to/daniel_ndubuisi_061b5303c/kin-a-consent-first-portrait-driven-by-live-pulse-and-breathing-3kj3</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;Kin is an Electron app that uses the official Presage SmartSpectra Node SDK to turn live camera measurements into a portrait. It opens as a maximized studio (with its own window buttons; &lt;code&gt;F11&lt;/code&gt; for fullscreen) and shows the live SmartSpectra self-view and the portrait side by side. The camera view is clean: no face circle, chest circle, guide lines, or labels over the video. A frameless companion portrait is available in windowed mode for a wider display.&lt;/p&gt;

&lt;p&gt;The portrait is driven by measured signals, not animation loops. It does not invent a beat, a breath, or a confidence value. When a signal is missing, the portrait holds still and the matching number stays blank. The demo was recorded with me in front of the camera. It does not use a synthetic or pre-recorded signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live signals used:&lt;/strong&gt; chest breathing trace, breathing rate, and pulse rate. The optional expression mirror uses blinking, talking, and expression metrics when the person explicitly opts in. It is off by default.&lt;/p&gt;

&lt;p&gt;The self-view is deliberately clean: no face circle, chest circle, corner brackets, guide lines, or labels over the video. If the SDK keeps reporting a positioning problem, the positioning card in the rail says what to fix. Kin never involves the microphone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

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

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

&lt;p&gt;The video shows the consent screen, the live self-view, the live pulse and breathing values, the portrait, and the privacy panel. It ends by stopping the session and showing that the camera stops. The demo was recorded with the release build, which bundles the author's demo key, so the key screen is skipped. The demo was recorded with vokoscreenNG; Kin has no recording feature. The demo script is in &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/blob/main/demo-script.md" rel="noopener noreferrer"&gt;&lt;code&gt;demo-script.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;Public repository: &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk" rel="noopener noreferrer"&gt;https://github.com/kceehackathon/Kin-presagesmartspectrasdk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes the Electron source, the native SmartSpectra runtime, the Windows build scripts, and the setup notes. The app is MIT-licensed. SmartSpectra is proprietary and is used under the challenge SDK terms; see &lt;code&gt;THIRD_PARTY_NOTICES.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Windows installer and portable build: &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/releases/latest" rel="noopener noreferrer"&gt;https://github.com/kceehackathon/Kin-presagesmartspectrasdk/releases/latest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Windows release build bundles the author's SmartSpectra demo key so judges can try Kin without signing up; the source repository contains no key.&lt;/p&gt;

&lt;p&gt;Setup instructions are below and in the repository README.&lt;/p&gt;

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

&lt;p&gt;Kin requests three core metric bundles from &lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 3.5.0:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Use in Kin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chest breathing trace&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Keeps breathing activity and phase honest; no synthetic motion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Breathing rate&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Numeric breathing estimate and confidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pulse rate&lt;/td&gt;
&lt;td&gt;&lt;code&gt;15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Numeric pulse estimate and confidence; paces the sternum light&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When the expression mirror is enabled, Kin also requests blinking (&lt;code&gt;12&lt;/code&gt;), talking (&lt;code&gt;13&lt;/code&gt;), and expressions (&lt;code&gt;14&lt;/code&gt;). It never requests facial landmarks (&lt;code&gt;11&lt;/code&gt;). The SDK is created with &lt;code&gt;enableTelemetry: false&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Kin deliberately does not request the arterial-pressure trace (&lt;code&gt;16&lt;/code&gt;). That metric makes the native SDK load the encrypted &lt;code&gt;phasic-bp-inference&lt;/code&gt; model. The SDK logs showed that fetch starting during the live session, and the extra model work made the self-view lag when pulse readings began. The measured pulse rate is enough to pace the portrait; Kin does not synthesize a waveform.&lt;/p&gt;

&lt;p&gt;The SDK runs in Electron's main process. The main process owns the camera and receives the SDK's windowed &lt;code&gt;metrics&lt;/code&gt; events and processed &lt;code&gt;videoOutput&lt;/code&gt; frames. In the default &lt;strong&gt;Reliable&lt;/strong&gt; mode Kin captures 640×480 at 30 fps and sends the processed frame to the studio at about 12–15 fps. The renderer uploads it as a WebGL R8 texture and keeps only the newest packet, so a slow paint drops stale frames instead of building a queue. In Reliable mode the renderer never calls &lt;code&gt;getUserMedia&lt;/code&gt;, loads FFI, or opens a second camera reader. Measurement keeps the full 30 fps capture rate.&lt;/p&gt;

&lt;p&gt;There is also an optional &lt;strong&gt;Smooth preview&lt;/strong&gt; mode for faster computers. The studio window opens the camera with &lt;code&gt;getUserMedia&lt;/code&gt; (video only, never audio) and shows it in a native &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; self-view at the full camera rate. A Worker copies NV12 frames in memory and hands them to the SDK in the main process over IPC. Frames are never recorded, written, or uploaded, and the camera permission is granted only to the studio window and only for video. A &lt;strong&gt;Camera settings&lt;/strong&gt; dialog (&lt;code&gt;S&lt;/code&gt;) lets you pick the mode, 25 or 30 fps measurement, 640×480 or 1280×720, and self-view on or off; it also shows a device recommendation and live performance. Only those preferences are saved, to &lt;code&gt;%APPDATA%\Kin\kin-settings.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The studio paints the processed self-view. &lt;code&gt;SignalEngine&lt;/code&gt; turns the metric slices into animation targets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pulse:&lt;/strong&gt; the measured pulse rate sets the period of a short sternum-light envelope, and the card shows the same measured rate and confidence. Kin does not generate a waveform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breathing:&lt;/strong&gt; the chest trace keeps the breathing activity and phase honest. The studio shows the measured rate and trace; the portrait does not invent a breathing motion when the trace is stale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expression:&lt;/strong&gt; only when opted in, the highest score above a confidence floor maps to brows, eyes, and mouth. Blinks and talking are short overlays. The labels describe visible facial shapes, not feelings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Positioning is part of the signal path, not an afterthought. The self-view has no overlay marks or text over the video. Kin maps the SDK's validation codes to short text in the rail's positioning card: move into frame, show your upper chest, add light, hold still, or let the camera settle. It clears when the pose becomes usable. Kin never asks for the microphone.&lt;/p&gt;

&lt;p&gt;The integration is visible in &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/blob/main/main.js" rel="noopener noreferrer"&gt;&lt;code&gt;main.js&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/blob/main/src/signals.js" rel="noopener noreferrer"&gt;&lt;code&gt;src/signals.js&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;I am entering both categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use.&lt;/strong&gt; Most wellness apps turn the body into a dashboard of numbers. I wanted the opposite: a quiet portrait that keeps you company and visibly listens. Its sternum light glows at your measured pulse, and it follows your measured breathing. What makes it unusual is that the signal &lt;em&gt;is&lt;/em&gt; the animation. There are no idle loops and no fake heartbeat. When SmartSpectra has no fresh signal, the portrait holds still and says so, so the honesty is part of the delight. With the optional expression mirror on, a 3D emoji copies your visible expression and names it in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Thoughtful Real-World Use.&lt;/strong&gt; Many people want a calm, camera-only way to notice their pulse and breathing during a study session, a focus block, or a rest break. They don't want to wear a device, create an account, or send their face to a cloud. Kin is built for desk workers, students, and anyone who doesn't own or want a wearable. It also runs on an ordinary two-core laptop. I designed it to be usable for those people:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One clear consent step.&lt;/strong&gt; There is no account and no sign-up, and the Windows release needs no API key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A clean self-view.&lt;/strong&gt; Nothing is drawn over the video. The positioning tips (move into frame, add light, hold still) are short plain text in the side panel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large controls and keyboard shortcuts.&lt;/strong&gt; It has its own minimize, maximize, and close buttons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A simple Camera settings dialog.&lt;/strong&gt; It recommends the best settings for your device and shows live performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic recovery.&lt;/strong&gt; Kin reconnects by itself after a brief hiccup and keeps your last readings on screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything stays on the device.&lt;/strong&gt; Nothing is recorded, and it makes no medical, emotion, or stress claims.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camera consent is a gate.&lt;/strong&gt; The studio cannot start until the person checks camera + pulse + breathing consent and the general-wellness acknowledgement. The expression mirror is a separate choice and is off by default. The live self-view stays visible during measurement, so the camera is never hidden.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Positioning guidance is visual only.&lt;/strong&gt; Positioning is text in the rail card; nothing is drawn over the self-view. Kin never requests the microphone, records audio, plays synthesized speech, or sends audio anywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No covert monitoring.&lt;/strong&gt; There is no background mode, no scheduled capture, and no hidden camera path. Pause releases the camera. End stops the camera and returns to consent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage: no body data or API key written by Kin.&lt;/strong&gt; Kin writes no video, audio, images, measurements, session history, or API key to disk. The one file it saves is &lt;code&gt;%APPDATA%\Kin\kin-settings.json&lt;/code&gt;, which holds only camera preferences (mode, frame rate, resolution, self-view). The API key is held in memory and sent once over the in-process IPC bridge. The input field is cleared after use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technical files kept by the SDK and Chromium.&lt;/strong&gt; SmartSpectra may keep a device-key/model cache under &lt;code&gt;%LOCALAPPDATA%\Presage\Physiology&lt;/code&gt; and &lt;code&gt;%LOCALAPPDATA%\SmartSpectraSDK&lt;/code&gt; or &lt;code&gt;%APPDATA%\Kin\SmartSpectraSDK&lt;/code&gt;. It may write technical diagnostic logs under &lt;code&gt;%LOCALAPPDATA%\Temp\SmartSpectra*.log.*&lt;/code&gt;. Chromium may keep ordinary app cache files under &lt;code&gt;%APPDATA%\Kin&lt;/code&gt;. These files contain no camera frames, audio, or measured values. Kin sets the SDK log level to &lt;code&gt;kNone&lt;/code&gt;, but SDK-generated logs may still appear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharing: no frames, audio, or measurements are uploaded.&lt;/strong&gt; The renderer runs under &lt;code&gt;connect-src 'none'&lt;/code&gt; and cannot open a network connection. The native SDK makes the required Presage requests: authentication, usage/entitlement verification, and encrypted model downloads. Those requests can include the API key and session usage metadata such as duration and frame counts, and they can be correlated with a Presage account. They do not contain preview frames, video, audio, or measured pulse/breathing values. Kin adds no analytics, crash reporting, or cloud storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK telemetry is disabled.&lt;/strong&gt; Kin creates the SDK with &lt;code&gt;enableTelemetry: false&lt;/code&gt;. No session summaries or device-readiness reports are sent. Required usage accounting still runs, as described above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Camera access:&lt;/strong&gt; in Reliable mode the native SDK owns the camera. In the optional Smooth preview mode the studio window opens the camera, video only, never audio, and the frames stay in memory on the device.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retention:&lt;/strong&gt; session state lives in memory. Ending the session or closing Kin clears the in-memory key and all derived values. The SDK and Chromium technical files described above may remain until you delete them. They contain no body data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deletion:&lt;/strong&gt; use &lt;strong&gt;End&lt;/strong&gt; or close Kin to clear session state. On Windows, delete &lt;code&gt;%APPDATA%\Kin&lt;/code&gt; (which includes your saved camera settings), &lt;code&gt;%LOCALAPPDATA%\Presage\Physiology&lt;/code&gt;, &lt;code&gt;%LOCALAPPDATA%\SmartSpectraSDK&lt;/code&gt;, and &lt;code&gt;%LOCALAPPDATA%\Temp\SmartSpectra*.log.*&lt;/code&gt; to remove technical caches and logs. There is no Kin account or cloud copy to delete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional AI:&lt;/strong&gt; none. Kin does not use LLM Insights or send data to an AI service. Expression labels describe visible facial shapes, not feelings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No medical use.&lt;/strong&gt; Kin provides general-wellness and entertainment estimates. It does not diagnose, treat, monitor, or predict a condition, and it does not make medical decisions. It makes no emotion or stress claims. It is not a medical device.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Kin is Electron with a vanilla renderer. The first version ran the SmartSpectra SDK inside the renderer and used the SDK's &lt;code&gt;MediaStream&lt;/code&gt; for the preview. The preview and the frame bridge competed for the same renderer thread, and the SDK eventually stopped the session on its frame-rate watchdog. I moved the SDK to the main process and used the &lt;code&gt;videoOutput&lt;/code&gt; event as the self-view. The camera owner now produces the measurement frames, and the studio receives a coalesced display copy that is uploaded to the GPU.&lt;/p&gt;

&lt;p&gt;Late tuning also mattered. The first native build used a 640×480/30 camera and a processed self-view at roughly 15 fps; it felt immediate. A later detour to 1280×720 with a downsampled display copy introduced a multi-second lag in this setup, so Standard 640×480 stays the default. The studio uploads the frame as a WebGL R8 texture rather than painting it with CPU &lt;code&gt;putImageData&lt;/code&gt; or converting colour on the CPU. An OffscreenCanvas worker was tried, but on a two-core laptop it stole enough CPU to trip the SDK's frame-rate watchdog; the GPU upload keeps the studio thread light without adding another hungry thread. The detailed face is repainted only when the optional expression mirror is on. Expression smoothing remains 0.15 s, which hides classifier jitter; the labels update as new windows arrive.&lt;/p&gt;

&lt;p&gt;The last lag investigation was about the metric set, not the renderer. The preview was smooth at startup and became choppy around the time pulse values appeared. The SDK's own logs pointed to &lt;code&gt;phasic-bp-inference&lt;/code&gt;, the encrypted model behind the arterial-pressure trace. I removed metric &lt;code&gt;16&lt;/code&gt; from the request. The portrait already had a rate-only path, so the pulse light still uses a real measured value. &lt;/p&gt;

&lt;p&gt;The final lag investigation was about everything else on a two-core laptop (i5-7300U, Intel HD 620). SDK callbacks are koffi thread-safe thunks that block the SDK worker thread until the JavaScript callback returns, so the &lt;code&gt;videoOutput&lt;/code&gt; handler now does a reference swap and nothing more; packing and IPC happen afterwards, with one preview frame in flight at a time. The self-view uses a WebGL R8 upload with no CPU colour conversion. I removed the perpetual 60 Hz churn: the UI loop is a 100 ms timer, the pulse glow steps at about 12 Hz, and no CSS animation runs forever. Process priorities are raised for measurement. I also learned that camera exposure priority matters: left on auto, the camera lengthens exposure in dim light and drops below 30 fps, so Smooth preview sets manual exposure capped at about 31 ms. The last finding was the least glamorous: on battery, Windows caps the CPU and the SDK cannot sustain 30 fps, so the test laptop has to be plugged in with power mode on &lt;strong&gt;Best performance&lt;/strong&gt;. In Reliable mode it then ran five-plus minutes with a steady pulse, a 30 fps camera, a ~3–4 ms frame delay, and zero engine stops. If the SDK still stops for a transient reason (frame rate under 25 fps, a network hiccup), Kin restarts it within about 2 seconds, keeps the last readings on screen, and shows &lt;strong&gt;Reconnecting…&lt;/strong&gt;; after more than four restarts in three minutes it shows &lt;strong&gt;Try again&lt;/strong&gt;, and key, credit, and permission errors are never retried.&lt;/p&gt;

&lt;p&gt;The studio fills the display and keeps the portrait and self-view together. It opens maximized with its own minimize, maximize/restore, and close buttons; &lt;code&gt;F11&lt;/code&gt; toggles fullscreen. With the expression mirror on, the Expression card shows an animated 3D emoji and the SDK's expression name, labelled "visible expression, not a feeling". In windowed mode, the companion portrait is optional on demand; it receives only derived animation values over &lt;code&gt;BroadcastChannel&lt;/code&gt; and never receives camera frames, metric buffers, or the API key. The layout uses the available work area rather than assuming a 1080p screen, and the rail's End action stays accessible.&lt;/p&gt;

&lt;p&gt;The SDK provides validation hints such as &lt;strong&gt;No face yet&lt;/strong&gt;, &lt;strong&gt;Chest not in frame&lt;/strong&gt;, and &lt;strong&gt;Too dark&lt;/strong&gt;. Kin shows those hints instead of hiding them. The portrait should say what is wrong instead of guessing.&lt;/p&gt;

&lt;p&gt;Presage's usage-verification request can fail on a weak connection. When it does, Kin stops the session, keeps the last values marked as stopped estimates, and offers &lt;strong&gt;Try Again&lt;/strong&gt;. It does not keep animating from stale data and does not substitute a fake signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Windows 10 or 11, x64&lt;/li&gt;
&lt;li&gt;Node.js 20 or newer&lt;/li&gt;
&lt;li&gt;A webcam&lt;/li&gt;
&lt;li&gt;The Windows release (installer or portable) needs no key. Running from source needs a free SmartSpectra API key from &lt;a href="https://physiology.presagetech.com/auth/register" rel="noopener noreferrer"&gt;https://physiology.presagetech.com/auth/register&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repository includes the Microsoft VC++ runtime DLLs that the native SmartSpectra runtime needs. A separate Visual C++ Redistributable install is not required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run from source
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/kceehackathon/Kin-presagesmartspectrasdk.git
&lt;span class="nb"&gt;cd&lt;/span&gt; Kin-presagesmartspectrasdk
npm install
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;npm install&lt;/code&gt; copies the bundled VC++ runtime DLLs beside &lt;code&gt;smartspectra_capi.dll&lt;/code&gt;. &lt;code&gt;npm start&lt;/code&gt; bundles the renderer with esbuild and launches Electron.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Read the consent screen. Check the camera + pulse + breathing consent and the general-wellness acknowledgement. The expression mirror is optional and off by default. Kin opens maximized; press &lt;code&gt;F11&lt;/code&gt; for fullscreen. For a smooth session, plug in the charger, set Windows power mode to Best performance, and close Chrome and Discord.&lt;/li&gt;
&lt;li&gt;In the release build the key page is skipped. From source, create a free SmartSpectra key at the link above and paste it into the key prompt, or set &lt;code&gt;KIN_API_KEY=...&lt;/code&gt; in a &lt;code&gt;.env&lt;/code&gt; file in the project root. The key is held in memory for the session and is never written to disk or logged by Kin.&lt;/li&gt;
&lt;li&gt;After consent (and key acceptance, from source), the camera opens. The studio shows the portrait and the live local self-view together. The self-view has no lines, circles, or labels over the video. Sit about 50–90 cm from the camera with your face, shoulders, and upper chest visible. Soft, even light in front of you works best.&lt;/li&gt;
&lt;li&gt;Wait for the SDK to report signals. Breathing usually appears before pulse. The validation line and positioning card in the rail tell you what to fix; the self-view stays clean. The portrait stays still until a fresh signal arrives.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;P&lt;/code&gt; for present mode. Press &lt;code&gt;F11&lt;/code&gt; to leave or re-enter fullscreen. In windowed mode only, press &lt;code&gt;F&lt;/code&gt; to open the separate companion portrait window; in fullscreen, the portrait is already part of the studio.&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Pause&lt;/strong&gt; to release the camera, or &lt;strong&gt;End&lt;/strong&gt; to clear the session and the in-memory key.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Windows build
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The installer and portable executable are written to &lt;code&gt;release/&lt;/code&gt;. The build is not code-signed, so Windows SmartScreen may ask for confirmation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing for judges
&lt;/h3&gt;

&lt;p&gt;Kin has &lt;strong&gt;no Kin account, login, or cloud service&lt;/strong&gt;, and judges do not need their own key.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download &lt;code&gt;Kin-1.0.0-Setup.exe&lt;/code&gt; (installer) or &lt;code&gt;Kin-1.0.0-Portable.exe&lt;/code&gt; from the &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/releases/latest" rel="noopener noreferrer"&gt;Releases page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Launch it. If Windows SmartScreen warns (the build is unsigned), choose &lt;strong&gt;More info&lt;/strong&gt;, then &lt;strong&gt;Run anyway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Tick the two consent boxes. Kin opens the studio and starts listening; there is no key page and no sign-up.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Privacy &amp;amp; data&lt;/strong&gt; to see the storage, sharing, retention, deletion, and telemetry details. Press &lt;strong&gt;End&lt;/strong&gt; when finished.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tips for a smooth test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plug in the charger and set Windows power mode to &lt;strong&gt;Best performance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use good front light, and keep your face and upper chest in view.&lt;/li&gt;
&lt;li&gt;Pulse usually appears within about 15–60 seconds; breathing often comes first.&lt;/li&gt;
&lt;li&gt;The expression mirror is optional and heavier; leave it off unless you want to try it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the demo key ever runs out of credits or is rejected, Kin shows the key page with a message, and you can paste a free key from &lt;a href="https://physiology.presagetech.com/auth/register" rel="noopener noreferrer"&gt;https://physiology.presagetech.com/auth/register&lt;/a&gt;. To run from source, use your own key (in &lt;code&gt;.env&lt;/code&gt; or at the key prompt).&lt;/p&gt;

&lt;p&gt;A one-page test checklist is in &lt;a href="https://github.com/kceehackathon/Kin-presagesmartspectrasdk/blob/main/TESTING.md" rel="noopener noreferrer"&gt;&lt;code&gt;TESTING.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The app is Windows-first. The SDK supports other platforms, but the camera permission policy and packaging in this submission target Windows x64.&lt;/p&gt;

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

&lt;p&gt;Two implementation problems took most of the time. The first was keeping the portrait still when the SDK had no fresh signal. SmartSpectra gives you windowed measurements, confidence, and validation hints; the app has to respect all three. The second was moving the SDK into the main process so the camera preview and the measurement loop stopped competing for the renderer thread.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Windows x64 is the tested target.&lt;/li&gt;
&lt;li&gt;The Windows release needs no key; running from source needs a free SmartSpectra API key. Kin has no account system.&lt;/li&gt;
&lt;li&gt;Live values depend on camera position, light, stillness, and the SDK's warm-up. The app shows validation hints instead of filling missing values. Low light can make auto-exposure drop the frame rate; Kin surfaces the SDK's &lt;strong&gt;Camera running slowly&lt;/strong&gt; warning.&lt;/li&gt;
&lt;li&gt;In Reliable mode Kin measures at 640×480 and 30 fps and draws the self-view from the SDK's processed frames at about 12–15 fps; Smooth preview gives a full-rate self-view on faster computers. The display copy is uploaded as a WebGL R8 texture and the renderer keeps only the newest packet. The laptop should be plugged in with Windows power mode on Best performance; on battery the CPU is capped and the SDK cannot sustain 30 fps. The first seconds can be busier while the SDK models warm up. The portrait's pulse light is stepped at about 12 Hz; the SVG face is repainted only when the optional expression mirror is on. Expression classification is windowed and may update less often than the video.&lt;/li&gt;
&lt;li&gt;Positioning cues are on-screen text only. They never use the microphone, and they do not synthesize or play audio.&lt;/li&gt;
&lt;li&gt;Presage's usage-verification request can fail on a weak connection. Kin stops and offers &lt;strong&gt;Try Again&lt;/strong&gt; rather than continuing from stale data.&lt;/li&gt;
&lt;li&gt;The release build bundles the author's demo key so judges can try Kin without signing up; the source repository contains no key.&lt;/li&gt;
&lt;li&gt;The app does not use HRV or facial landmarks. The live signals in this submission are pulse and breathing, with an optional visible-expression mirror.&lt;/li&gt;
&lt;/ul&gt;

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