Skip to content

feat(annotations): Sync annotations with cloud storage #233

@ainergiz

Description

@ainergiz

Summary

Enable cross-device access and backup for bookmark annotations by syncing to cloud storage.

Context

Annotations are currently stored locally at ~/.config/xfeed/annotations.json. This works well for single-device use but doesn't support:

  • Accessing annotations from multiple machines
  • Backup/restore of annotation data
  • Sharing annotation data between devices

Related: #136 (original annotation feature)

Current Behavior

  • Annotations stored locally in ~/.config/xfeed/annotations.json
  • Data only accessible on the machine where it was created
  • No backup mechanism

Expected Behavior

  • Option to sync annotations to cloud storage
  • Support for major providers (iCloud, Dropbox, Google Drive, or custom)
  • Seamless merge of annotations from multiple devices
  • Offline-first with sync when online

Potential Implementation

Approach 1: File-based Sync (Symlink)

  • Allow users to configure a custom path for annotations.json
  • User can point to a cloud-synced folder (Dropbox, iCloud, etc.)
  • Files: src/config/annotations.ts, src/config/preferences.ts
  • Pros: Simple, user-controlled, works with any sync service
  • Cons: Conflict handling left to sync service

Approach 2: Native Cloud Integration

  • Direct integration with cloud storage APIs
  • Built-in conflict resolution
  • Files: New src/services/cloud-sync.ts
  • Pros: Better UX, controlled sync behavior
  • Cons: More complex, requires API keys/auth

Approach 3: Custom Sync Server

  • Self-hosted or managed sync endpoint
  • Full control over sync logic
  • Pros: Maximum flexibility
  • Cons: Requires server infrastructure

Additional Context

Current annotation file structure:

{
  "version": 1,
  "annotations": {
    "tweetId": {
      "text": "annotation text",
      "createdAt": "ISO date",
      "updatedAt": "ISO date"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions