Skip to content

boldbetspc/runbotaiwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

69 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RunbotAIWatch - Next-Gen Apple Watch Running Coach

A revolutionary voice-first running assistant for Apple Watch, powered by AI coaching and real-time voice feedback. RunbotAIWatch is a companion app to the Runbot iOS app, offering a fully voice-led experience optimized for wrist interaction.

Features

๐ŸŽค Voice-First Interface

  • Real-time voice coaching: AI-powered guidance during your run
  • Scheduled AI feedback: Automatic coaching tips every 5 minutes (auto-terminates after 20s)
  • Voice selection: Choose between Apple Samantha or GPT-4 Mini voice synthesis
  • Natural conversation: Voice-led interactions for hands-free experience

๐Ÿ“Š Running Stats

  • Tile-based display: Distance, pace, calories, elevation on quick-access tiles
  • Real-time updates: Live stats during active run
  • Visual feedback: Runbot infinity logo animation during coaching

๐ŸŽฎ Run Controls

  • Start/Stop: One-tap run control
  • Session management: Automatic termination of all AI sessions on stop or logout
  • Safety protocols: All AI coaching ends immediately when user stops

โš™๏ธ Settings

  • Coach Personality: Select from different coaching styles
  • Coach Energy: Adjust coaching intensity (Low/Medium/High)
  • Voice AI: Switch between Apple Samantha and GPT-4 Mini
  • Session preferences: Customize feedback frequency and intensity

Architecture

Separate Codebase Strategy

  • Complete isolation: No dependencies on Runbot iOS code
  • Shared backends: Uses same Supabase and AI services
  • Clean separation: Easy to manage and update independently
  • Companion connectivity: Optional Watch Connectivity when paired with iOS app

Project Structure

RunbotAIWatch/
โ”œโ”€โ”€ RunbotAIWatch/                 # Main app target
โ”‚   โ”œโ”€โ”€ RunbotAIWatchApp.swift     # App entry point
โ”‚   โ”œโ”€โ”€ Views/                     # SwiftUI views
โ”‚   โ”‚   โ”œโ”€โ”€ ContentView.swift
โ”‚   โ”‚   โ”œโ”€โ”€ RunningView.swift
โ”‚   โ”‚   โ”œโ”€โ”€ StatsView.swift
โ”‚   โ”‚   โ”œโ”€โ”€ SettingsView.swift
โ”‚   โ”‚   โ””โ”€โ”€ AuthView.swift
โ”‚   โ”œโ”€โ”€ Models/                    # Data models
โ”‚   โ”‚   โ”œโ”€โ”€ RunDataModels.swift
โ”‚   โ”‚   โ”œโ”€โ”€ AICoachManager.swift
โ”‚   โ”‚   โ”œโ”€โ”€ VoiceManager.swift
โ”‚   โ”‚   โ””โ”€โ”€ UserPreferences.swift
โ”‚   โ”œโ”€โ”€ Services/                  # Backend services
โ”‚   โ”‚   โ”œโ”€โ”€ SupabaseService.swift
โ”‚   โ”‚   โ”œโ”€โ”€ OpenAIService.swift
โ”‚   โ”‚   โ””โ”€โ”€ LocationService.swift
โ”‚   โ”œโ”€โ”€ Assets.xcassets/           # Images, animations
โ”‚   โ””โ”€โ”€ Config.plist               # Configuration
โ”œโ”€โ”€ Runbot AI WatchKit Extension/  # WatchKit extension (if needed)
โ””โ”€โ”€ Runbot AI Watch.app/           # Watch app bundle

## Safety & Compliance

### AI Session Safety
- โœ… All AI sessions terminate when user taps Stop
- โœ… All AI sessions terminate on logout
- โœ… Scheduled coaching auto-terminates after 20 seconds
- โœ… Voice synthesis stops immediately on interruption
- โœ… Memory is cleared between sessions

### Data Privacy
- Uses same Supabase authentication as iOS app
- Encrypted communication with AI services
- No personal data stored locally on watch
- Session data synced to secure backend

## Setup

### Requirements
- watchOS 9.0+
- Xcode 15.0+
- Swift 5.9+
- Supabase account (shared with iOS app)
- OpenAI API key (shared with iOS app)

### Installation

1. **Clone repository** (or create in Xcode)
   ```bash
   # This is a separate project
   cd /Users/ranga/Desktop/Runbot/RunbotAIWatch
  1. Open project

    open RunbotAIWatch.xcodeproj
  2. Configure

    • Copy Config.plist.template to Config.plist
    • Add your Supabase credentials
    • Add your OpenAI API key
  3. Build & Run

    • Select "RunbotAIWatch (Watch) - WatchKit App" scheme
    • Choose Apple Watch simulator or device
    • Build and run

Configuration

Config.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...>
<plist version="1.0">
<dict>
    <key>SUPABASE_URL</key>
    <string>your_supabase_url</string>
    <key>SUPABASE_KEY</key>
    <string>your_supabase_key</string>
    <key>OPENAI_API_KEY</key>
    <string>your_openai_key</string>
</dict>
</plist>

Usage

Starting a Run

  1. Tap Start on main screen
  2. Watch begins tracking GPS and stats
  3. Runbot animates with coaching feedback

During Run

  • Voice feedback: Listen to AI coaching every 5 minutes
  • Quick stats: Swipe to view running metrics
  • Adjust settings: Tap settings icon (if needed mid-run)

Ending a Run

  1. Tap Stop - immediately ends all AI sessions
  2. Confirms run saved to Supabase
  3. Returns to main screen

Settings

  • Tap Settings icon from main screen
  • Adjust coach personality, energy, and voice preference
  • Changes apply immediately

Development Notes

Voice Management

  • Uses AVSpeechSynthesizer for Apple Samantha
  • Uses OpenAI TTS for GPT-4 Mini voice option
  • All voice is non-interruptible during playback for safety

AI Coaching Logic

  • Uses same prompt system as iOS app
  • Scheduled feedback fires every 5 minutes during active run
  • Feedback automatically stops after 20 seconds
  • Safety: All voice/text generation stops on Stop button

Running Stats

  • Updates every 2 seconds during active run
  • Uses Core Location for GPS data
  • Stores in Supabase for sync with iOS app

Performance Optimization

  • Minimal CPU: Efficient voice processing
  • Battery conscious: Optimized location updates
  • Network efficient: Batches stats updates
  • Memory efficient: Clears sessions immediately

Support & Troubleshooting

App Won't Start

  • Verify Config.plist is present and valid
  • Check Supabase credentials
  • Ensure watchOS version is 9.0 or higher

Voice Not Working

  • Check speaker volume (not muted)
  • Verify VoiceManager is initialized
  • Try switching voice preference in Settings

Stats Not Updating

  • Verify location permission is granted
  • Check GPS signal strength
  • Restart app if needed

Future Enhancements

  • Companion app connectivity (iOS โ†” Watch sync)
  • Custom coaching prompts
  • Music integration
  • Advanced metrics (VO2 Max, training load)
  • Social features (leaderboards, challenges)
  • Haptic feedback integration

License

Same as Runbot iOS app

Support

For issues or feature requests, contact: support@runbotapp.com


Separate Codebase for Easy Management โœจ
RunbotAIWatch maintains complete independence from Runbot iOS while sharing backend services.

About

Runbot AI Watchapp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors