
How I built an AI health coach with Next.js, Supabase & GPT-5.2 — from wearable APIs to recovery predictions
I built ViQO — a web app that connects health data from multiple sources and uses AI to find personal patterns. Here's the technical deep dive. The Architecture ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │ Whoop API │────▶│ │ │ GPT-5.2 │ │ Withings API│────▶│ Next.js │────▶│ Analysis │ │ Manual Logs │────▶│ App Router │ │ Engine │ └─────────────┘ │ │ └─────────────┘ │ Supabase │ │ (EU, RLS) │ └──────────────┘ Stack: Next.js 14 (App Router, Server Components, Route Handlers) Supabase (PostgreSQL, Auth, Row Level Security, Realtime) GPT-5.2 (pattern analysis, coaching, predictions) Tailwind + shadcn/ui (UI layer) Vercel (Frankfurt edge, Cron Jobs) PWA (Service Worker, Push Notifications) Challenge 1: Wearable API Integration Whoop and Withings have completely different data models. Whoop gives you "cycles" and "recoveries", Withings gives you "measures" with type codes. I built a Unified Data Layer — source-agnostic tables that normalize everything: // Adapter pattern — each source
Continue reading on Dev.to Webdev
Opens in a new tab



