ExaminorOriginal post
Rank 2: Process
I need help in my social media project instagram clone
I am using appwrite cloud as backend
I have a User collection which store related to user like email, name ,username,bio,profile pic etc
I have a Post collection which store post which user created and it is related to user
I want a functionality where user can follow someone and then in profile page we can view how many user follow us and how many we follow
I am not able to understand how should i create a new collection and relate it to user and then achieve above result
Can someone help me with that ?
Summary
Developers are seeking help with setting up a follow functionality in their Instagram clone project using Appwrite Cloud. They are unsure how to create a new collection related to users to achieve the desired result.
Solution: Create a new collection called 'Followers' with fields like follower ID and following ID to track user relationships. Each time a user follows someone, create a new document in the 'Followers' collection with the follower's ID and the following ID. To display follower and following counts on the user's profile, query the 'Followers' collection based on the user's ID.