Inspiration
Dehydration causes 518,000 US hospitalizations yearly. Half of American children are chronically dehydrated. Yet checking hydration requires blood tests or expensive equipment. We realized smartphones could solve this using their camera and flash.
What it does
The user places a finger on the camera for 25 seconds. The flash illuminates the skin. The app records color changes frame by frame. A Butterworth filter removes noise and extracts the pulse wave. Three wave features correlate with hydration: amplitude variation, peak-to-peak interval, and diastolic slope. The app displays a hydration level and specific advice like "Drink 8oz water now." All processing runs locally on the device.
How we built it
Frontend: React, TypeScript, Vite. Backend: Node.js, Express. Database: Supabase PostgreSQL with Drizzle ORM. Signal processing: JavaScript implementation of Butterworth bandpass filter (0.5-5 Hz), moving average smoothing, and peak detection. Camera access: MediaStream API with torch control. Frame capture: 25 FPS using requestAnimationFrame. Feature extraction: Pulse wave amplitude, frequency, and morphology analysis.
Challenges we ran into
Smartphone cameras capture 10x more noise than medical PPG sensors. Frame timing variations of even 10ms degraded signals. Dark skin tones required 3x higher gain adjustment. No published research validates camera PPG for hydration—only for heart rate. We had to extrapolate from peripheral perfusion studies.
Accomplishments that we're proud of
Built complete PPG pipeline processing 25 frames per second in browser. Implemented skin tone calibration using RGB channel ratios. Achieved frame capture with <5ms jitter. Created accessible UI tested with screen readers. Kept all health data client-side while enabling anonymous sharing.
What we learned
Camera PPG fails if ambient light changes mid-recording. Finger pressure variations alter readings by 40%. Users trust simple gauges over complex metrics. Browser-based signal processing can match native app performance. Transparency about accuracy limitations increases user trust.
What's next for HydroSense
Partner with university labs to validate against serum osmolality tests. Train ML model on 10,000+ diverse skin tone samples. Add accelerometer data to detect and compensate for motion. Integrate with Fitbit and Apple Health APIs. Create SDK for third-party apps. Target pilot programs with construction companies and marathon organizers.
Uniqueness
Zero hardware cost—uses existing phone camera. Adjusts for skin tone using RGB ratios, not fixed thresholds. Processes entirely on-device, no cloud dependency. Open about being a wellness tool, not medical device. First attempt at camera-based hydration monitoring in a web app.
Built With
- butterworth-filters
- canvas-api
- css3
- custom-javascript-dsp-algorithms
- drizzle-orm
- esbuild
- express.js
- fft
- framer-motion
- geolocation-api
- html5
- javascript
- lucide-react
- mediastream-api
- neon
- node.js
- postcss
- postgresql
- radix-ui
- react-18
- react-hook-form
- replit
- shadcn/ui
- supabase
- tailwind-css
- tanstack-query
- tsx
- typescript
- vite
- web-workers
- webassembly
- webrtc
- wouter
- zod

Log in or sign up for Devpost to join the conversation.