← Back to .dev
TrainSync
Visit site →A WhatsApp-based AI training coach that turns natural language into structured workouts and pulls your intervals.icu data into the conversation.
TypeScriptVercel AI SDKWhatsAppTwiliointervals.icuRedis
Live Preview
https://trainsync.ca
Overview
TrainSync is an intelligent training assistant that lives in WhatsApp. Chat naturally to create workouts, ask about fitness metrics, and schedule sessions. Built with the Vercel AI SDK, it uses AI tools to interact with intervals.icu and manage workout data.
Key Highlights
- 01Natural language workout parsing: '5km easy' → structured workout
- 02AI agent with tools: get_recent_workouts, get_fitness_metrics, create_workout, upload_workout
- 03Performance targets: 1-3s response time, 1 Redis read per request, ~2KB user profiles
- 04Webhook entrypoint via Twilio, deployed on Vercel
- 05Comprehensive test suite with Vitest
- 06Sport-agnostic: supports running, cycling, triathlon, and general fitness
Architecture
WhatsApp → Twilio → Webhook Handler → AI Agent (Vercel AI SDK) → intervals.icu + Vercel KV