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

  1. Connect Strava (OAuth) or paste an Oura token.
  2. Ask any health question.
  3. Sonave sends your last-7-day HRV, resting HR, and mileage to Sonar Deep-Research, which streams back an answer with PubMed/Mayo citations.
  4. A little “Metrics” chip shows the exact data Sonave used—full transparency.
  5. 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_metrics table.
  • 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

  1. Refresh metrics in the background (cron) and alert on anomalies.
  2. Capacitor wrap → native push notifications (“HRV down 15 %—here’s what research says”).
  3. MedGemma offline reasoning for HIPAA deployment.
  4. ISO 13485 documentation toward SaMD filing (2026).

Built With

Share this project:

Updates