your phone already knows when you've stopped learning. now your study app does too.
Lucid reads your heart rate, breathing, and focus through your phone's camera in real time. no wearables, no extra hardware. just your phone on the desk and your laptop in front of you.
when you're locked in, it shuts up. when you're struggling, it adapts. when you're burning out, it tells you before you feel it.
- reads biometrics (HR, HRV, breathing rate, blink rate) through your phone camera using the Presage SmartSpectra SDK
- streams that data over WiFi to your laptop in real time
- classifies your cognitive state: flow, frustrated, fatigued, or zoned out
- adapts your study session in real time.. simplifies content, triggers breaks, switches formats
- launches a guided breathing reset with your live breath waveform as the visual guide
- generates a post-session report showing when you peaked, what stressed you, and when to revisit
phone sits on desk, camera on your face
-> presage SDK reads biometrics from your phone camera
-> streams data over WiFi to your laptop
-> 2 min calibration sets your personal baseline
-> cognitive state engine maps biometrics to mental states
-> study UI reacts accordingly
-> session report generated on end
| layer | tech |
|---|---|
| biometrics | Android phone + Presage SmartSpectra SDK |
| phone → laptop | WebSocket over WiFi (OkHttp → ws) |
| backend | Node.js + Express + SQLite |
| frontend | React + Vite + Tailwind + Canvas waveforms |
| AI | local Qwen 2.5 via Ollama (100% offline, no API keys) |
| data | SQLite session logs + biometric snapshots |
- an Android phone (Android 8.0+)
- a laptop on the same WiFi network
- Ollama installed with qwen2.5 pulled (
ollama pull qwen2.5:latest) - a free Presage API key from physiology.presagetech.com
# clone it
git clone https://github.com/yourusername/lucid.git
cd lucid
# install dependencies
npm install
# add your API keys
cp .env.example .env
# add your Presage API key
# make sure Ollama is running
ollama serve
# run the web app
npm run devthen install the Lucid companion app on your phone, enter your laptop's IP, and start streaming.
for demo without a phone:
npm run dev:mock- put your phone on the desk pointed at your face
- open the app on your laptop, let it calibrate for 2 minutes
- start studying.. flashcards, problems, whatever
- watch the live pulse line on the sidebar
- get stuck on something hard and watch Lucid catch it
- try the breathing reset and watch your heart rate drop in real time
- end the session and check your report
every student has sat there rereading the same paragraph for 20 minutes without realizing they checked out a long time ago. your body knew. your app didn't.
now it does.
built with Presage SmartSpectra SDK at HackCanada 2026
made by Divyam and Ayush