DEV Community

Cover image for mochi. — a daily pause for stillness
Caleb Akomaye
Caleb Akomaye

Posted on

mochi. — a daily pause for stillness

Presage SmartSpectra SDK Challenge Submission

This is a submission for the Presage SmartSpectra SDK Challenge

What I Built

We spend most of our days staring at screens, forgetting to breathe, while our heart rates quietly spike over broken code or endless feeds. I wanted to build something that pushes back against that.

Instead of another dashboard throwing medical charts or stress graphs at you, I wanted to see if contactless sensing could feel soft, playful, and human.

Meet Mochi (mochi.)—a quiet little web companion that just wants you to pause and be still.

Using the Presage SmartSpectra SDK, Mochi reads your vitals right through your webcam. No wearables, no Apple Watch, just you and your browser. It invites you to take a daily stillness break by waking up to your heartbeat, syncing its breathing to yours, and logging your daily streaks without ever sending an annoying push notification.

Demo

(Direct video link: https://youtu.be/3N6DoIe0tjQ)

(UI & Consent Flow preview: https://mochi-mind-psi.vercel.app/ — live native Presage SmartSpectra sensing runs locally with SMARTSPECTRA_API_KEY; see the demo video and README setup below.)

Code

https://github.com/calebandcode/mochi

Setup instructions (including .env.local configuration for SMARTSPECTRA_API_KEY and running locally with npm run dev) are included in the repository README.

How It Responds to Human Signals

I integrated @smartspectra/node-sdk (v3.5.0) inside a Next.js App Router backend (lib/smartspectra-server.ts), capturing live 30 FPS camera frames via sdk.useCamera(), decoding Presage's binary protobuf packets with decodeMetrics(), and streaming the live signals over Server-Sent Events (/api/smartspectra/stream) directly into Framer Motion and React state to drive Mochi's SVG animations.

Here is how the signals dictate the experience:

  • Pulse (Heart Rate): The app uses the SDK's contactless rPPG (cardio.pulseRate, cardio.arterialPressureTrace, and cardio.hrv) to detect your resting pulse. While calibrating, Mochi stays asleep and surfaces live Presage validationStatus positioning hints; once a live heart rate is acquired, Mochi "wakes up" and the session officially begins.
  • Breathing Rate: Mochi's squishy, biomorphic body physically expands and contracts in real time, synchronizing with your actual chest movements (breathing.upperTrace and breathing.rate). As you consciously slow your breathing into a 5-3-8 restorative rhythm, Mochi mimics the glassy, slow rhythm of your physical state.
  • Head Pose & Expressions: I routed Presage's 478-point face.landmarks and face.expression scores to Mochi's eyes, body lean, and mood—allowing the character to gently track your head movements across the webcam view, mirror your smile, and immediately drop the readout to -- BPM if you step away.

Prize Categories

Best Thoughtful Real-World Use:
Mochi addresses "screen apnea"—the unconscious habit of holding our breath or breathing shallowly while looking at screens. It is designed for developers, students, and remote workers who need a functional, frictionless way to regulate their nervous systems during the workday.

Most Creative or Delightful Use:
By turning raw biometric data into a squishy, reactive character that hands you handwritten affirmation cards, Mochi flips the clinical nature of biometric monitoring into an unexpectedly warm and poetic experience.

Consent and Data Handling

Privacy and compliance are built directly into Mochi's 3-step onboarding UI (components/consent-modal.tsx) before the camera is ever activated:

  • Camera Consent (Consensual Sensing): Mochi uses the Presage SmartSpectra SDK and your webcam to measure subtle optical micro-changes in facial blood flow (contactless rPPG), breathing rhythm, and gentle expressions. Monitoring is 100% consensual, active only while on this screen, and clearly indicated by your camera's hardware light.
  • Data, Storage, Retention & Telemetry: Video frames are processed locally in real-time memory and immediately discarded after each frame. No video, photos, or facial biometric profiles are ever recorded, saved to disk, shared, or transmitted to any server. SDK telemetry is explicitly disabled (enableTelemetry: false); Presage servers are only contacted by the SDK for API key authorization. Only your local stillness streak count and last session date are stored in browser localStorage (which you can delete anytime by clearing site data). No external AI services are used.
  • Wellness Notice (No Medical Claims): Mochi and SmartSpectra SDK metrics are designed for relaxation, mindful stillness, and personal self-reflection. Mochi is not an FDA-cleared medical device and must not be used for diagnosis, medical treatment, or clinical decision-making.

Top comments (0)