Skip to content

DivyamBanga/Lucid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lucid 🧠💡

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.

what it does

  • 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

how it works

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

the stack

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

what you need

  • 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

quick start

# 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 dev

then 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

the demo

  1. put your phone on the desk pointed at your face
  2. open the app on your laptop, let it calibrate for 2 minutes
  3. start studying.. flashcards, problems, whatever
  4. watch the live pulse line on the sidebar
  5. get stuck on something hard and watch Lucid catch it
  6. try the breathing reset and watch your heart rate drop in real time
  7. end the session and check your report

why

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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors