feat: Adds four backend features to bring comments to audit parity with posts, aggregate a personalized fan feed, implement the favorites API the frontend already calls, and expose Stellar network config for client discovery. - #1527
Merged
Conversation
|
@Emeka000 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
deletedAt/deletedByadded toComment; newCommentAuditLogentity + migration;CommentsService.remove()now soft-deletes, writes an audit row, and emitsCommentDeletedEvent; all reads filterdeletedAt IS NULL; hard delete kept as a separate, non-defaulthardDelete()method — mirrors the existingPost/PostAuditLogpattern exactly.feedmodule —GET /v1/feed/subscriptions(JWT-required, cursor-paginated).SubscriptionsService.getActiveCreatorIdsForFan()resolves the fan's actively-subscribed creators;PostsService.findFeed()returns their published, non-deleted posts via keyset (createdAt+id) cursor pagination. Empty subscriptions → empty page, not an error.favoritesmodule —Favoriteentity (unique onuserId+creatorId), migration, service, and controller matching the existing frontend contract infrontend/src/lib/favorites.ts(GET /v1/favorites→ creator ID array,POST/DELETE /v1/favorites/:creatorId). Add is idempotent; missing target creator → 404; listing is always scoped to the caller's ownuserId.configmodule — publicGET /v1/config/networkreturningnetwork,networkPassphrase,horizonUrl,rpcUrlderived fromSTELLAR_NETWORK/env overrides (same passphrase-mapping convention assubscription-chain-reader.service.ts). No secrets in the response.FeedModule,FavoritesModule, andNetworkConfigModuleintoAppModule; registered the two new migrations inmigration.datasource.ts.Test Plan
Automated tests added or updated
backend/src/**/*.spec.ts) —comments.service.spec.tsrewritten for soft-delete/audit/event behavior;posts.service.spec.tsextended withfindFeedcursor/filter cases;subscriptions.service.spec.tsextended withgetActiveCreatorIdsForFan; new specs forfeed.service,feed.controller,favorites.service,favorites.controller,network-config.service,network-config.controller.getRepositoryToken), andAppModulehas noTypeOrmModule.forRootwired yet (pre-existing, see Notes).How to run the tests locally