Skip to content

bruce249/Hackathon_CBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VitalWeave

Multi-signal health intelligence — woven from your biometrics by AI.

VitalWeave is a Streamlit app that takes your wearable data (Luna Ring / NoiseFit), mood logs, food diary, and blood reports, then uses Claude to find cross-signal patterns, forecast health risks, and answer natural-language questions about your data.


What it does

Tab What you get
💍 Luna Signals HRV, sleep score, readiness, SpO₂, skin temp — charted across every day
🧬 The Tapestry Multi-signal timeline chart with HRV reference lines calibrated to your age/sex
🔗 Correlations AI-detected cross-signal patterns (e.g. "low HRV → worse mood next day")
📈 Risk Forecasts 30/90/180-day risk cards with one concrete action per domain
🧬 Health Master Personalised deficiency risks, biomarker targets, cycle guide (female), test recs
💬 Ask VitalWeave Chat with Claude about your data — ask anything, get answers grounded in real values

Quick start

1. Clone and install

git clone <repo-url>
cd vitalweave
pip install -r requirements.txt

2. Set your API key

Create a .env file in the vitalweave/ directory:

ANTHROPIC_API_KEY=sk-ant-...

3. (Optional) Generate demo sessions

Pre-builds 4 realistic demo sessions (19M / 24F / 35M / 45F) with full analysis — so you can demo without waiting for Claude to run:

python create_demo_sessions.py

4. Run the app

streamlit run app.py

Loading data

Option A — Demo sessions (instant)

Click any session in the Sessions dropdown in the sidebar and hit ▶ Load. Full analysis loads in under a second.

Option B — Luna Ring (NoiseFit export)

Use the 💍 Load Luna Demo Data button in the sidebar, or upload your own NoiseFit .json export.

Option C — Upload your own files

Signal Format
Sleep .json or .csv
Mood .csv (date + mood_score columns)
Food .json (date + nutrient fields)
Blood report .txt or .pdf

Running the analysis

  1. Load at least sleep + mood data
  2. Set your health profile (age + biological sex) in the sidebar — this calibrates every chart and Claude prompt to you specifically
  3. Click 🧬 Weave My Health Story — takes ~15–30 seconds (uses Claude Haiku)
  4. Session auto-saves after every weave run

Project structure

vitalweave/
├── app.py                  # Streamlit UI — all tabs, sidebar, session state
├── weave_engine.py         # Claude API — main health analysis (JSON schema)
├── chat_engine.py          # Claude API — streaming chat with full data context
├── visualiser.py           # Plotly charts — tapestry, correlation cards, risk gauges
├── profile_engine.py       # Static health knowledge — deficiency risks, HRV targets, biomarker ranges
├── data_parser.py          # File parsers — Luna Ring JSON, CSV, PDF blood reports
├── session_store.py        # Local JSON session persistence (save/load/delete)
├── ethics.py               # Ethics panel + doctor PDF export
├── create_demo_sessions.py # One-time script to pre-build 4 demo sessions
├── sample_data/            # Sample files for instant demo loading
└── sessions/               # Auto-created — saved session JSON files

Demo profiles

Profile Pattern baked in
19M Exam week stress (days 9–13, 23–27) — HRV crashes, sleep collapses
24F 28-day menstrual cycle — skin temp +0.45°C luteal, HRV dips in follicular
35M Work-week HRV cycle — gradual burnout trend across 30 days
45F Perimenopause — hot flash nights (8 days), HRV 14–40ms, temp spikes >0.9°C

Environment variables

Variable Required Description
ANTHROPIC_API_KEY Yes Your Anthropic API key

Tech stack

  • Frontend — Streamlit 1.32+, Plotly, custom CSS (Inter + IBM Plex Mono)
  • AI — Anthropic Claude (claude-haiku-4-5 for analysis, claude-sonnet-4-6 for chat)
  • Storage — Local JSON files in sessions/ (zero external dependencies)
  • PDF export — ReportLab + PyMuPDF

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages