SCRUM-84, Option B — Complete technical analysis for removing Strava dependency
The Garmin Connect Developer Program provides official APIs for accessing cycling activity data including GPS tracks, speed, heart rate, power, cadence, and elevation — all fields that Strava's club endpoint lacks. The program is free, approval takes 2 business days, and production keys have no rate limits. This is the recommended path for Garmin users in the club.
Free, fast approval, complete data access, push-based architecture. Covers the majority of DCC members who use Garmin devices.
| Field | Strava Club API | Garmin Activity API | Impact |
|---|---|---|---|
| Distance | Yes (meters) | Yes (meters) | Equivalent |
| Duration | Yes (moving_time) | Yes (seconds) | Equivalent |
| Elevation | Yes (total gain) | Yes (ascent + descent) | Garmin has descent too |
| Activity Type | Yes (type, sport_type) | Yes (activityType) | Equivalent |
| Start Date/Time | No | Yes (startTimeInSeconds + offset) | Fixes SCRUM-69 — no more fingerprint workaround |
| Average Speed | No | Yes (averageSpeedInMetersPerSecond) | Fixes SCRUM-63 — device-measured, not calculated |
| GPS Track | No | Yes (full route via FIT file) | Enables real route-based POIs (SCRUM-83) |
| Heart Rate | No | Yes (avg, max, zones with durations) | New: effort/intensity analytics |
| Power | No | Yes (avg, max, by zone) | New: power-based coaching |
| Cadence | No | Yes (avg, max RPM) | New: pedalling efficiency analysis |
| Temperature | No | Yes (ambient from device) | New: real weather, not estimated |
| FIT File Download | No | Yes (raw binary file) | Complete second-by-second data |
| Athlete Name | Yes | Yes (from OAuth profile) | Equivalent |
| Rate Limits | 100/15min, 1000/day | None (production key) | Unlimited refreshes |
| Step | Details | Timeline |
|---|---|---|
| 1. Apply | Submit application at developer.garmin.com/gc-developer-program. Requires business name, use case description, expected user count. | 30 minutes |
| 2. Review | Garmin reviews the application. Most approvals within 2 business days. | 1-2 days |
| 3. Credentials | Receive Consumer Key + Consumer Secret. Access to evaluation environment + full API docs. | Immediate after approval |
| 4. Integration | Build OAuth flow, webhook handler, FIT parser. Test with 2+ real Garmin accounts. | 1-2 weeks dev work |
| 5. Verification | Pass Partner Verification Tool: (a) only call summary endpoints after Ping, (b) webhook responds HTTP 200, (c) data from 2+ real accounts. | 1-2 days testing |
| 6. Production Key | Receive production key with no rate limits. Go live. | Immediate after verification |
Total timeline: ~2-3 weeks from application to production.
https://connect.garmin.com/oauthConfirm| Phase | Work | Effort | Files |
|---|---|---|---|
| Phase 1 | Apply to Garmin Developer Program | 30 min | None (web form) |
| Phase 2 | Add POST /garmin-webhook endpoint to Worker. Handle Ping notifications, fetch activity details, parse into club data format. | 2-3 days | cloudflare-club-data-worker.js |
| Phase 3 | Add FIT file parser to Worker (binary format). Extract GPS track, speed, HR, power, cadence per data point. | 2-3 days | New: fit-parser.js or use garmin-fit-parser npm |
| Phase 4 | Add "Connect Garmin" button in iOS app. OAuth flow via ASWebAuthenticationSession. Store tokens via Worker. | 1-2 days | New: GarminAuthView.swift |
| Phase 5 | Merge Garmin data with existing Strava data in /club-data response. Both sources feed the same stats. | 1-2 days | cloudflare-club-data-worker.js |
| Phase 6 | Partner Verification Tool + production key | 1-2 days | Testing only |
Total effort: ~2 weeks of development + 2 days for Garmin approval.
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Garmin rejects application | Low | High | Application is free and straightforward. Cycling club use case is standard. |
| FIT parsing complexity | Medium | Medium | Use established npm package (garmin-fit-parser). FIT SDK is well-documented. |
| User adoption friction | Medium | Medium | One-time OAuth. After that, fully automatic. Strava stays as fallback. |
| Garmin API changes | Low | Medium | Official API with versioning. More stable than Strava's undocumented club endpoint. |
| GDPR compliance burden | Medium | Low | Standard consent flow. Same pattern as existing Strava OAuth (but we use club code now). |
Apply today. Free, 2-day approval, 2 weeks to integrate. Keeps Strava as fallback. Unlocks GPS, HR, power, cadence — transforming the app from a stats viewer into a proper training platform.