Add Wahoo activity sync with provider-agnostic framework

Provider-agnostic sync framework + Wahoo as first implementation:

Framework (apps/journal/app/lib/sync/):
- SyncProvider interface for OAuth2, webhooks, import, conversion
- Provider registry for settings UI iteration
- Generic sync_connections + sync_imports tables
- Token storage with auto-refresh

Wahoo provider:
- OAuth2 with workouts_read, user_read, offline_data scopes
- Webhook-based auto-import (workout_summary events)
- Manual import page with pagination
- FIT→GPX conversion via fit-file-parser
- Webhook token verification

Routes:
- /api/sync/connect/:provider — OAuth redirect
- /api/sync/callback/:provider — OAuth callback
- /api/sync/disconnect/:provider — remove connection
- /api/sync/webhook/:provider — webhook receiver
- /sync/import/:provider — manual import page

Settings: Connected Services section with per-provider connect/disconnect

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-04 11:19:15 +01:00
parent dd6543e313
commit b6711d23d6
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
25 changed files with 1124 additions and 5 deletions

View file

@ -28,7 +28,10 @@
"brace-expansion@>=4.0.0 <5.0.5": "5.0.5",
"path-to-regexp@<0.1.13": "0.1.13"
},
"onlyBuiltDependencies": ["@sentry/cli", "esbuild"]
"onlyBuiltDependencies": [
"@sentry/cli",
"esbuild"
]
},
"devDependencies": {
"@eslint/js": "^10.0.1",
@ -49,6 +52,7 @@
"drizzle-postgis": "^1.1.1",
"eslint": "^10.1.0",
"eslint-config-prettier": "^10.1.8",
"fit-file-parser": "^2.3.3",
"i18next": "^26.0.1",
"i18next-browser-languagedetector": "^8.2.1",
"jsdom": "^29.0.1",