+535
DEVELOPMENT_SUMMARY.md
+535
DEVELOPMENT_SUMMARY.md
···+This document summarizes the complete voting/like feature implementation with **proper atProto architecture**, where the mobile client writes directly to the user's Personal Data Server (PDS) instead of through a backend proxy.+**Strong Reference**: The `subject` field includes both URI and CID to create a strong reference to a specific version of the post.+This extracts the PDS URL from the OAuth session metadata, enabling direct writes to the user's PDS.+The mobile client writes vote records directly to the user's PDS using atProto XRPC calls, not through a backend proxy.+The backend listens to Jetstream events and indexes vote records for aggregated stats in feeds. It never writes to PDSs on behalf of users.+The user's PDS is the source of truth for their votes. The client queries the PDS to find existing votes, ensuring consistency.+| [lib/providers/auth_provider.dart](lib/providers/auth_provider.dart#L74-L86) | Added `getPdsUrl()` method |+| [lib/services/vote_service.dart](lib/services/vote_service.dart) | Complete rewrite for direct PDS calls |+| [lib/providers/vote_provider.dart](lib/providers/vote_provider.dart) | Updated to pass `postCid`, track `rkey` |+| [lib/widgets/post_card.dart](lib/widgets/post_card.dart#L247-L250) | Updated vote call with `postCid` |+This refactoring represents a **fundamental architectural improvement** that aligns with atProto principles:+The new architecture is simpler, more scalable, and follows the atProto specification correctly. The mobile client now operates as a first-class atProto client, writing directly to the user's PDS and reading from the AppView's aggregated feeds.
+67
lib/config/environment_config.dart
+67
lib/config/environment_config.dart
···
+4
-3
lib/config/oauth_config.dart
+4
-3
lib/config/oauth_config.dart
······
+16
lib/main.dart
+16
lib/main.dart
······
+14
lib/providers/auth_provider.dart
+14
lib/providers/auth_provider.dart
···
+17
-7
lib/providers/feed_provider.dart
+17
-7
lib/providers/feed_provider.dart
······
+232
lib/providers/vote_provider.dart
+232
lib/providers/vote_provider.dart
···
+49
lib/services/api_exceptions.dart
+49
lib/services/api_exceptions.dart
···
+12
lib/services/oauth_service.dart
+12
lib/services/oauth_service.dart
·········
+10
-5
lib/services/pds_discovery_service.dart
+10
-5
lib/services/pds_discovery_service.dart
············
+365
lib/services/vote_service.dart
+365
lib/services/vote_service.dart
···+? '/xrpc/com.atproto.repo.listRecords?repo=$userDid&collection=$voteCollection&limit=$pageSize&reverse=true'+: '/xrpc/com.atproto.repo.listRecords?repo=$userDid&collection=$voteCollection&limit=$pageSize&reverse=true&cursor=$cursor';
+328
lib/widgets/icons/animated_heart_icon.dart
+328
lib/widgets/icons/animated_heart_icon.dart
···
+117
lib/widgets/icons/reply_icon.dart
+117
lib/widgets/icons/reply_icon.dart
···
+77
-36
lib/widgets/post_card.dart
+77
-36
lib/widgets/post_card.dart
············
+70
lib/widgets/sign_in_dialog.dart
+70
lib/widgets/sign_in_dialog.dart
···
+1
-1
test/providers/auth_provider_test.mocks.dart
+1
-1
test/providers/auth_provider_test.mocks.dart
+16
test/providers/feed_provider_test.dart
+16
test/providers/feed_provider_test.dart
···
+467
test/providers/vote_provider_test.dart
+467
test/providers/vote_provider_test.dart
···
+157
test/providers/vote_provider_test.mocks.dart
+157
test/providers/vote_provider_test.mocks.dart
···
+480
test/services/vote_service_test.dart
+480
test/services/vote_service_test.dart
···
+158
test/services/vote_service_test.mocks.dart
+158
test/services/vote_service_test.mocks.dart
···
+333
test/widgets/animated_heart_icon_test.dart
+333
test/widgets/animated_heart_icon_test.dart
···
+28
test/widgets/feed_screen_test.dart
+28
test/widgets/feed_screen_test.dart
············
-252
test/widgets/feed_screen_test.mocks.dart
-252
test/widgets/feed_screen_test.mocks.dart
···
+231
test/widgets/sign_in_dialog_test.dart
+231
test/widgets/sign_in_dialog_test.dart
···