# PWA Sense Bridge

A dependency-free, privacy-first JavaScript library that turns a phone's blowing, tilting, shaking and long-press gestures inside a progressive web app into structured events for any LLM chat backend.

PWA Sense Bridge converts physical phone gestures inside a progressive web app, such as blowing into the microphone, tilting or rotating the device, shaking it, or a long press, into structured JSON events that a host application can forward to a language model. It is not tied to any particular AI provider or chat framework; the library only turns real-world input into stable events, and the host application decides whether and how to inject them as context.

Blow detection analyzes microphone volume locally without uploading audio, rotation detection favors the gravity vector to avoid distortion when a phone is held upright, and shake and long-press detection use thresholds, cooldowns and intensity normalization. The camera is only ever opened by an explicit user tap, never silently, and a local test mode lets a developer observe events without triggering the host's send callback. Production use requires HTTPS, since iOS gates motion, orientation, microphone and camera permissions behind a user gesture over a secure origin.

Website: https://github.com/0xblewalker/pwa-sense-bridge
