Refactored voting/like feature to follow proper atProto architecture where
mobile clients write directly to user's Personal Data Server (PDS) instead
of through a backend proxy.
**Architecture Change**:
- Before: Mobile → Backend API → User's PDS (incorrect ❌)
- After: Mobile → User's PDS → Jetstream → Backend AppView (correct ✅)
**Key Changes**:
- VoteService: Complete rewrite to use XRPC endpoints:
- com.atproto.repo.createRecord (create vote)
- com.atproto.repo.deleteRecord (delete vote)
- com.atproto.repo.listRecords (find existing votes)
- VoteProvider: Updated to pass postCid for strong references
- AuthProvider: Added getPdsUrl() method to get user's PDS URL
- PostCard: Updated to pass post.cid to vote calls
- VoteState: Added rkey field for record deletion
**Vote Record Schema**:
Collection: social.coves.interaction.vote
Fields: $type, subject (uri+cid), direction, createdAt
**Testing**:
- 109 tests passing (24 vote provider, 19 vote service tests)
- flutter analyze: 0 errors, 0 warnings (12 info-level style suggestions)
- All tests updated to include postCid parameter
**Known TODO**:
DPoP authentication not yet implemented. atProto PDSs require DPoP
(Demonstrating Proof of Possession) tokens, not Bearer tokens. Current
implementation is a placeholder that won't work with real PDSs until DPoP
support is added to atproto_oauth_flutter package.
**Benefits**:
✅ User owns their data on their PDS
✅ Backend only indexes public data (read-only)
✅ Works across entire atProto federation
✅ Follows Bluesky/atProto architecture pattern
See DEVELOPMENT_SUMMARY.md for complete implementation details.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>