feat(follow): implement complete follow/unfollow functionality#216
Open
Samm-05 wants to merge 2 commits into
Open
feat(follow): implement complete follow/unfollow functionality#216Samm-05 wants to merge 2 commits into
Samm-05 wants to merge 2 commits into
Conversation
Owner
|
attach screenshots and videos showing what changes have been made. Also CI jobs are failing so please update it. |
…end files (remove conflict markers)
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.
📌 Overview
This pull request implements the complete Follow / Unfollow functionality for DevLink, enabling users to follow other builders, manage follower relationships, and view follow statistics.
Closes <#120>
✨ Features Implemented
Backend
Added Follow API endpoints
POST /users/{user_id}/followDELETE /users/{user_id}/followGET /users/{user_id}/followersGET /users/{user_id}/followingGET /users/{user_id}/follow-statusPrevented duplicate follow requests.
Prevented users from following themselves.
Automatically updates follower and following counts.
Preserved backward compatibility with existing
/followers/*routes.Frontend
Added reusable
FollowButtoncomponent.Integrated Follow/Unfollow functionality into builder/profile pages.
Added optimistic UI updates using TanStack React Query.
Added loading and disabled states during API requests.
Synced follower counts automatically after follow/unfollow actions.
Connected frontend services to the new backend endpoints.
🧩 Additional Improvements
Fixed TypeScript build issues discovered during implementation.
Fixed import inconsistencies.
Cleaned JSX nesting issues causing frontend compilation failures.
Improved overall API consistency.
✅ Validation
Successfully verified:
🧪 Testing Performed
📂 Files Changed
Backend
Frontend
🚀 Notes