Files
FitTrack_GarminSync/initialspec.md

1.1 KiB

2. GarminSync Service

Feature Name: IntialSpecV2

Purpose

Manage synchronization with Garmin Connect and other fitness platforms

Core Requirements

  • Platform Integration

    • Garmin Connect OAuth2 authentication
    • Activity download (FIT.GPX/TCX files) stored in CentralDB
    • Health metrics synchronization
    • Workout upload to Garmin
    • Fitbit weight data sync (future)
    • this is a single user app
    • default listen port 8001
    • configuration should accept yaml or environment vars
  • API Endpoints

    • POST /api/sync/garmin/activities - Trigger activity sync
    • GET /api/sync/status - Check sync status
  • Technical

    • Background job processing
    • Rate limiting for API calls
    • Error handling and retry logic
    • Sync history and conflict resolution (using CentralDB database)
  • Existing Code

    • Use @GarminAnalyser.md to pull code from the existing implementation. This is a working version, reuse as much as possible.
    • Use CentralDB for storage (incl. refresh tokens etc)
    • CentralDB API is in @DB_API_SPEC.json - you cna refresh the spec at curl http://localhost:8000/openapi.json