-
Notifications
You must be signed in to change notification settings - Fork 0
Data Sources Management ๐
Complete guide to managing multiple data sources in Running Page 2.0.
The Data Sources page (/data-sources) is your central hub for managing all fitness platform integrations. Here you can:
- โ View all configured sources and their status
- โ Add new data sources from supported platforms
- โ Monitor sync status and performance
- โ Configure sync settings and preferences
- โ Troubleshoot connection issues with detailed diagnostics
-
Navigate to Data Sources
- Click "Data Sources" in the sidebar
- Or visit
/data-sourcesdirectly
-
Interface Overview
- Configured Sources tab - Your active integrations
- Available Sources tab - Platforms you can add
- Sync Results tab - Recent sync history (when available)
- Click "Add Data Source" button
- Choose a platform from the available options
- Follow setup instructions specific to that platform
- Test connection to verify configuration
- Start syncing your activities
Each configured source shows:
- Platform name and type (API, File, Webhook)
- Connection status (Active, Inactive, Error)
- Last sync time and activity count
- Supported activity types (Run, Walk, Ride, etc.)
- Enable/disable toggle for quick control
- Sync and settings buttons for management
| Status | Icon | Meaning | Action |
|---|---|---|---|
| Active | โ | Working normally | Monitor regularly |
| Inactive | โธ๏ธ | Disabled or paused | Enable if needed |
| Error | โ | Connection issues | Check configuration |
- Sync Button - Trigger immediate sync for this source
- Settings Button - Modify configuration (coming soon)
- Enable/Disable Toggle - Control sync participation
- Platform name and description
- Authentication method required
- Supported activity types
- Estimated setup time
- Configuration status (Available/Already Added)
| Platform | Status | Setup Time | Notes |
|---|---|---|---|
| Strava | โ Configured | - | Already set up via environment |
| Nike Run Club | ๐ง Beta | 5 min | Access token method |
| Garmin Connect | ๐ Coming Soon | 10 min | Global and China versions |
| Keep (ๅๅ) | ๐ Coming Soon | 5 min | Chinese platform |
| GPX Files | ๐ Coming Soon | 2 min | File upload interface |
- Default Schedule - Every 6 hours
- Incremental Sync - Only new activities
- Smart Deduplication - Prevents duplicate activities
- Error Recovery - Automatic retry on failures
1. Click "Sync All" button in top right
2. Monitor progress in real-time
3. View detailed results when complete
4. Check for any errors or issues
1. Find the source card you want to sync
2. Click the "Sync" button on that card
3. Watch the spinning icon for progress
4. Check the last sync time when complete
- Spinning refresh icon - Sync in progress
- Last sync timestamp - When data was last updated
- Activity count changes - New activities detected
- Error messages - Detailed failure information
When available, shows:
- Summary statistics - Total activities processed
- Per-source breakdown - Individual source performance
- Success/failure rates - Reliability metrics
- Error details - Specific failure reasons
- Processing time - Sync duration and performance
# Global sync settings
ENABLE_MULTI_PLATFORM=true
SYNC_INTERVAL_HOURS=6
MAX_CONCURRENT_SYNCS=3
DEFAULT_SYNC_TIMEOUT=300000
# Platform-specific settings
NIKE_RATE_LIMIT=100
GARMIN_TIMEOUT=30000
KEEP_REGION=cn// Future configuration options
const syncConfig = {
schedule: '6h', // Sync frequency
deduplication: true, // Remove duplicates
sourcePriority: [ // Preference order
'strava',
'nike',
'garmin'
],
activityTypes: [ // Types to sync
'Run', 'Walk', 'Ride'
],
dateRange: { // Sync date limits
start: '2020-01-01',
end: null // null = no limit
}
}- Smart Detection - Identifies potential duplicates
- Time-based Matching - Activities within 5 minutes
- Distance Comparison - Similar distance and duration
- Source Priority - Configurable preference order
- Manual Review - Option to review before deletion
- Format Checking - Ensures data integrity
- Range Validation - Realistic values only
- GPS Validation - Valid coordinate ranges
- Metric Consistency - Cross-validation of related fields
When the same activity exists in multiple sources:
- Source Priority - Use configured preference order
- Data Completeness - Prefer source with more data
- Data Quality - Choose higher quality GPS/metrics
- Manual Override - User can choose preferred source
Symptoms: Empty available sources list Solutions:
- Check internet connection
- Verify API endpoints are accessible
- Clear browser cache and reload
- Check browser console for errors
Symptoms: Red error status on source cards Solutions:
-
Check Authentication
- Verify tokens are still valid
- Re-authenticate if needed
- Check token permissions
-
Network Issues
- Test internet connectivity
- Check firewall settings
- Verify API endpoints are accessible
-
Rate Limiting
- Wait before retrying
- Reduce sync frequency
- Check platform API limits
Symptoms: Same activity appears multiple times Solutions:
-
Enable Deduplication
// In future configuration deduplication: true
-
Set Source Priority
- Choose preferred data source
- Configure priority order
- Review duplicate detection settings
-
Manual Cleanup
- Review flagged duplicates
- Delete unwanted copies
- Adjust detection sensitivity
# Test data sources API
curl -X GET "https://your-domain.com/api/data-sources"
# Test sync operation
curl -X POST "https://your-domain.com/api/sync" \
-H "Content-Type: application/json" \
-d '{"sources": ["nike"]}'
# Check sync status
curl -X GET "https://your-domain.com/api/sync/status"// Check data source status
fetch('/api/data-sources')
.then(r => r.json())
.then(data => {
console.log('Available types:', data.availableTypes)
console.log('Configured sources:', data.configuredSources)
})
// Monitor sync progress
fetch('/api/sync', {method: 'POST'})
.then(r => r.json())
.then(result => {
console.log('Sync results:', result)
})
// Check for errors
console.log('Check for any error messages in the console')- Start Simple - Add one source at a time
- Test Thoroughly - Verify each integration works
- Monitor Closely - Watch first few syncs carefully
- Document Settings - Keep track of configurations
- Stagger Sync Times - Avoid simultaneous syncs
- Monitor API Limits - Stay within rate limits
- Use Incremental Sync - Only sync new data
- Clean Up Regularly - Remove unused sources
- Set Source Priority - Choose preferred data sources
- Enable Deduplication - Prevent duplicate activities
- Validate Regularly - Check data accuracy
- Backup Before Changes - Export data before major changes
- Rotate Tokens Regularly - Update authentication tokens
- Monitor Access Logs - Check for suspicious activity
- Use Strong Passwords - Secure platform accounts
- Enable 2FA - Where available on platforms
- Bulk Operations - Enable/disable multiple sources
- Advanced Filtering - Sync specific activity types only
- Custom Schedules - Per-source sync frequencies
- Data Export - Export data from specific sources
- Conflict Resolution UI - Manual duplicate management
- Source Analytics - Per-source performance metrics
- Q1 2024: Nike Run Club (Beta โ Production)
- Q2 2024: Garmin Connect (Global + China)
- Q3 2024: Keep, Codoon, JoyRun
- Q4 2024: Apple Health, Google Fit
- 2025: Suunto, Coros, Polar
- Cross-platform Analytics - Compare data across sources
- Data Correlation - Find patterns across platforms
- Health Metrics - Comprehensive health tracking
- Social Features - Multi-platform activity sharing
- Use GPS-enabled activities for best map visualization
- Enable heart rate monitoring for detailed analytics
- Consistent activity naming across platforms
- Regular data validation to catch issues early
- Sync during off-peak hours for better performance
- Monitor platform status pages for service issues
- Use incremental sync to reduce processing time
- Set up monitoring alerts for sync failures
- Nike: Use access token method for reliability
- Strava: Already optimized, no changes needed
- Garmin: Use secret string method for automation
- Keep: Enable SMS verification for security
Need help with data source management?
- ๐ Report Issues
- ๐ฌ Ask Questions
- ๐ง Email Support
Effective data source management ensures reliable, comprehensive activity tracking across all your fitness platforms! ๐โจ