I wanted a single database where all my health and location data lives — queryable, portable, and accessible to my own tools. The main reason: feeding it into my OpenClaw assistant so it can answer questions about my health, habits, and movement patterns with real data instead of guesswork.
Apple Health has the health side covered, and CoreLocation handles the rest. But neither lets you get the data out easily. So I built Health Beat — an iOS app that syncs everything to a MySQL database over TCP. Health metrics, workouts, sleep, location tracks, geofence check-ins — all in one place.
Health Data
- 85 Quantity Types: Heart rate, steps, blood glucose, body temperature, VO2 max, respiratory rate, blood oxygen, and everything else HealthKit tracks.
- 22 Category Types: Sleep analysis, menstrual flow, toothbrushing, handwashing, and more.
- Workouts: Every workout with type, duration, distance, and energy burned.
- Correlations & Signals: Blood pressure (systolic/diastolic pairs), ECG voltage traces, and audiogram frequency data.
- Incremental Sync: First sync pulls your full history. After that, only new records. UUID-based deduplication means no duplicates, ever.
Location Tracking
- Continuous GPS: Logs your position in the background — latitude, longitude, altitude, speed, course, and accuracy — all timestamped in UTC and written to MySQL.
- Geofences: Define places you care about (home, office, gym, café) and HealthBeat logs every arrival and departure. Events fire even when the app isn’t running.
- Place Categories: Organize geofences with built-in categories (Home, Office, Gym, Restaurant, Hospital, etc.) or create your own with custom icons.
- Check-In History: Browse your geofence events in-app — see where you’ve been and when.
How It Works
- Direct to MySQL: No cloud, no REST API, no middleware. Your phone connects to your MySQL server over TCP using a custom implementation of the MySQL wire protocol.
- Zero Dependencies: No CocoaPods, no SPM packages. The MySQL client, including
mysql_native_passwordandcaching_sha2_passwordauthentication, is built from scratch with Network.framework and CommonCrypto. - Background Sync: Health data syncs via background tasks. Location data streams continuously. Schema is auto-created on first connection.
- Data Browser: Browse synced data directly in the app — quantities, workouts, sleep, categories, location tracks, and check-ins — without a database client.
Screenshots




Requirements
- iOS 16+ on a physical device (HealthKit doesn’t work in the simulator)
- MySQL 5.7 or 8.0+ reachable from your phone (local network or VPN)
- Xcode 15+ to build from source
Source Code
Health Beat is open source. Grab it, build it, point it at your database.