A web-based fitness tracker that connects to indoor bikes and treadmills via Web BLE (Bluetooth Low Energy) and the FTMS (Fitness Machine Status Service) protocol.
- BLE Device Scanning: Scan for nearby FTMS-compatible fitness devices
- Real-time Data: Display live metrics (cadence, speed, power, resistance, heart rate, etc.)
- Customizable Dashboard: Drag and arrange data metrics into a grid layout
- Persistent Configuration: Grid layout saved to localStorage
- Mobile Optimized: Designed for smartphone use during workouts
- Svelte: Lightweight reactive UI framework
- Vite: Fast build tool
- Web BLE API: Browser Bluetooth connectivity
- FTMS Protocol: Fitness machine standard
npm installnpm run devThen open http://localhost:5173 in your browser (or access from your phone on the local network).
npm run build
npm run preview- User taps "Start Scanning"
- Browser requests Bluetooth device selection (native OS dialog)
- App filters for devices with FTMS service (UUID: 0x181a)
- Selected device connects and starts streaming data
- Indoor Bikes: Parse IndoorBikeData characteristic (0x2ad2)
- Speed, Cadence, Power, Resistance, Heart Rate
- Treadmills: Parse TreadmillData characteristic (0x2acd)
- Speed, Cadence, Inclination, Heart Rate
- Tap the ⚙️ icon to edit grid blocks
- Select a data field from the available fields list
- Choose block size (half-width or full-width)
- Layout persists automatically
- ✅ Chrome/Edge (Android)
- ✅ Safari (iOS 14.5+)
- ✅ Samsung Internet
- ❌ Firefox (limited BLE support)
Supported UUIDs:
- Service:
0x181a- Fitness Machine Status Service - Indoor Bike:
0x2ad2- Indoor Bike Data - Treadmill:
0x2acd- Treadmill Data
src/
├── lib/
│ ├── ftms.js # BLE connection & FTMS parsing
│ ├── store.js # Svelte stores for state management
│ ├── Scanner.svelte # Device discovery screen
│ ├── Dashboard.svelte # Main workout display
│ ├── GridBlock.svelte # Individual data tile
│ └── GridEditor.svelte # Grid customization modal
├── App.svelte # Main app component
├── main.js # Entry point
└── app.css # Global styles
- Web BLE is only available on HTTPS (or localhost)
- Some fitness devices may not fully implement FTMS spec
- Pairing required on first connection (device must be discoverable)
- Workout history and analytics
- Session save/export
- Interval timer integration
- Audio feedback and notifications
- Dark mode
- Device management (disconnect, forget)