Inspiration
Athletes like us stare at VO₂-max graphs and Google random blogs, but still guess why performance tanks.
We wanted one chat box that knows our own numbers and cites real science.
What it does
- Connect Strava (OAuth) or paste an Oura token.
- Ask any health question.
- Sonave sends your last-7-day HRV, resting HR, and mileage to Sonar Deep-Research, which streams back an answer with PubMed/Mayo citations.
- A little “Metrics” chip shows the exact data Sonave used—full transparency.
- Bookmark or share answers with a dynamic OG card.
How we built it
- Next.js 14 Chat SDK → out-of-the-box streaming UI.
- Edge Function proxies
/deep_research(mode:chain_of_thought), converts NDJSON → SSE. - Strava OAuth & Oura token saved in Supabase; one REST pull populates a
user_metricstable. - Before every Sonar call we append a JSON context block (HRV avg, mileage) to the prompt.
- Vercel KV caches identical queries 7 days; cold start ≤ 90 ms.
Challenges I ran into
- Streaming NDJSON chunks without breaking Chat-SDK’s token flow.
- Rate-limit 429s until we wrapped Sonar calls in KV cache.
- Strava’s per-minute cap—solved by on-demand rather than cron pulls.
- Tailwind palette clashes when we merged shadcn/ui + NativeWind style tokens.
Accomplishments I am proud of
- 6 hours from zero to live site with personalized context (wearables + citations).
- 20-question smoke test: 0 hallucinations, every fact linked to a source.
- Transparency UI—users can click the HRV chip and see the data we used.
What I learned
- Sonar excels at evidence snippets; you just need to give it structured personal context.
- Edge caching + prompt templating keeps costs tiny—< 0.1 ¢ per answer.
- Users love seeing their own metrics next to citations—it builds trust immediately.
What’s next for Sonave
- Refresh metrics in the background (cron) and alert on anomalies.
- Capacitor wrap → native push notifications (“HRV down 15 %—here’s what research says”).
- MedGemma offline reasoning for HIPAA deployment.
- ISO 13485 documentation toward SaMD filing (2026).
Built With
- css
- javascript
- shadcn
- sonar
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.