DEV Community

Abhishek J N
Abhishek J N

Posted on

VitalFlow

This is a submission for the Presage SmartSpectra SDK Challenge

What I Built

VITALFLOW (Your body. Your rhythm. Your world.) is an interactive ambient digital garden desktop application powered by real-time contactless human sensing.

Instead of presenting physiological readings as a sterile clinical dashboard, VITALFLOW translates subtle optical signals captured through a standard webcam into a living, calming HTML5 Canvas environment. Users can choose between three synchronized generative worlds—Living Garden, Cosmic Waves, and Breathing Mandala—that breathe, pulse, and shift dynamically in response to their presence.

The experience guides first-time users from an upfront Welcome screen through explicit Camera Consent & Calibration, into the full-viewport interactive Measurement canvas, and finishes with an ephemeral Session Reflection Summary that can be cleared from memory in one click.

Demo

Published Interactive Preview: https://vitalflow-1.ai.studio

Runtime Note: In standard web browsers (such as the hosted preview link above), VITALFLOW runs with optional webcam framing and an explicitly labeled DEMO DATA signal pipeline because Presage's native SmartSpectra C++ processing runs inside the Electron desktop runtime (npm run electron:start).

Code

GitHub Repository: https://github.com/JNAbhishek27/VitalFlow

The repository includes full setup instructions in README.md, .env.example (no hardcoded credentials), Electron main/preload scripts, and the React + TypeScript + Canvas frontend.

How It Responds to Human Signals

VITALFLOW integrates the official @smartspectra/node-sdk using Presage's recommended Electron three-process architecture:

  1. Main Process (electron/main.ts): Calls bindSmartSpectraIpc(mainWindow) from @smartspectra/node-sdk/main and securely resolves SMARTSPECTRA_API_KEY from main-process environment variables or volatile session memory (never bundled into renderer code).
  2. Preload Bridge (electron/preload.ts): Loads @smartspectra/node-sdk/preload under contextIsolation: true and sandbox: true.
  3. Renderer SDK & Protobuf Decoding (src/services/smartSpectraService.ts): Initializes SmartSpectraSDK from @smartspectra/node-sdk/renderer requesting [...breathingMetrics, ...cardioMetrics], acquires the camera preview via streamAvailable, tracks lifecycle via processingStatus and error, and decodes binary protobuf packets with decodeMetrics from @smartspectra/node-sdk/messages.
  4. Signal Smoothing (src/services/signalProcessor.ts) & Canvas Engine (src/services/gardenEngine.ts): Keeps raw SDK readings strictly separate from smoothed animation state:
    • Breathing Rate & Traces (breathing.rate, breathing.upperTrace): Smoothly drives the expansion and contraction of organic garden rings, horizon waves, and mandala petals.
    • Pulse Rate & Arterial Trace (cardio.pulseRate, cardio.arterialPressureTrace): Controls glowing particle drift cadence and triggers circular light ripples on heartbeat crests.
    • Heart Rate Variability (cardio.hrv): Modulates branching filament complexity and mandala symmetry only when the SDK genuinely emits valid HRV packets (HRV is never inferred or fabricated from pulse rate).
    • Signal Quality (validationStatus / ValidationCode): Maps framing, lighting (kTooDark, kTooBright), distance, and motion warnings into real-time user guidance and shifts the canvas into a gentle calibration cue rather than presenting unreliable numbers.

When valid readings are still warming up or unavailable, the UI displays an honest measuring/unavailable state and a neutral idle animation.

Prize Categories

  • Most Creative or Delightful Use: VITALFLOW reimagines contactless biometric sensing as an interactive, Apple Vision Pro-inspired generative art sanctuary rather than a spreadsheet of vitals—making invisible cardiorespiratory rhythms tangible and calming to watch.
  • Best Thoughtful Real-World Use: Designed for everyday mindfulness, breath awareness, and quiet reflection without wearables. Every screen prioritizes plain-language onboarding, accessibility (prefers-reduced-motion, tabular numerals, non-hue-only status indicators), and clear privacy controls.

Consent and Data Handling

  • Explicit Consent Gate: Camera access is disabled by default (setPermissionRequestHandler in Electron enforces consent). Users must review what signals are measured, acknowledge the non-medical wellness notice, and explicitly opt in before the camera activates.
  • Zero Recording & Zero External AI Uploads: Raw camera frames are processed transiently in memory solely for optical sensing; no video is recorded, saved to disk, or uploaded to external AI services.
  • In-Memory Retention & Deletion: Captured session readings remain strictly in volatile memory for the active session and summary screen. Stopping a session immediately halts the SDK and releases camera tracks, and clicking Clear Session wipes all in-memory samples.
  • SDK Telemetry Transparency: In accordance with Presage documentation, VITALFLOW discloses that optional SDK telemetry transmits aggregate session diagnostics without raw video or vital values, and exposes a live toggle in Consent & Setup and Privacy to disable it (enableTelemetry: false).
  • Non-Medical Boundary: VITALFLOW is strictly an observational wellness and self-awareness experience and makes no medical, diagnostic, or treatment claims.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.