/bubble-tutorials

How to set up a user following system in Bubble.io: Step-by-Step Guide

Discover the straightforward steps to create a user following system on Bubble.io with our comprehensive guide. Elevate your platform's networking capabilities today!

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a free No-Code consultation

How to set up a user following system in Bubble.io?

Creating a User Following System in Bubble.io

 

Developing a user following system in Bubble.io involves building the necessary information architecture, implementing workflows, and designing UI elements to allow users to follow and unfollow each other. This guide provides a detailed, step-by-step approach to creating a user following system using Bubble.io.

 

Prerequisites

 

  • A Bubble.io account with a project already created.
  • Basic understanding of Bubble.io’s database structure, workflows, and UI elements.
  • A bare-bones understanding of custom states and conditional statements in Bubble.io.

 

Designing the Database Structure

 

  • Open your Bubble.io project and navigate to the "Data" tab.
  • Create a new field in the “User” data type:
    • Followers - a list of Users. This field will store the users who are following this user.
    • Following - a list of Users. This field will store the users whom this user is following.
  • Ensure these fields are set to hold a list so multiple entries can be stored.

 

Setting Up the User Interface

 

  • Design a "User Profile" page where users can view other users' profiles.
  • Add a button or an icon that represents the "Follow" or "Unfollow" action beside each user profile.
    • This button will change its text dynamically (Follow/Unfollow), which you will set up in workflows.

 

Implementing Following/Unfollowing Workflow

 

Following a User

  • Go to the Workflow tab and create a new workflow for the "Follow" button.
  • Set the triggering event to "When Follow Button is clicked".
  • Add an action: "Make changes to a thing".
  • Select the “User” with whom the current user wants to interact.
  • Change the "Followers" field:
    • Add the Current User to the chosen user's list of followers.
  • Similarly, make changes to the Current User:
    • Add the selected User to the list of Following users of the current user.

 

Unfollowing a User

  • Create another workflow for the "Unfollow" button.
  • Set the triggering event to "When Unfollow Button is clicked".
  • Add an action: "Make changes to a thing".
  • Select the followed “User”.
  • Change the "Followers" field:
    • Remove the Current User from the selected user's list of followers.
  • Similarly, make changes to the Current User:
    • Remove the selected User from the list of Following users of the current user.

 

Updating UI Dynamically

 

  • Set up conditional statements for the Follow/Unfollow button to dynamically change its text:
    • If the Current User's "Following" list contains Profile User, the button text should display "Unfollow".
    • Otherwise, display "Follow".
  • Use Bubble.io’s conditionals:
  • Click the Follow/Unfollow button and navigate to the properties editor.
    • Under “Conditional Formatting”, set the condition based on the User's follow status and configure the button’s text accordingly.

 

Testing the Following Functionality

 

  • Test the user following system by previewing your application.
  • Ensure that following and unfollowing users updates their respective followers and following lists correctly.
  • Check that the UI of the Follow/Unfollow button changes dynamically based on whether a user is being followed or not.

 

Optimizing and Deploying Your Bubble.io Application

 

  • Conduct thorough testing across different user accounts to ensure smooth operation of the following functionality.
  • Optimize the app’s speed by regularly checking data workflows and database constraints.
  • Launch your app, allowing users to interact with the follow system in a live environment.

 

By following these steps, you can successfully set up a user following system in your Bubble.io application. This system provides a robust way to enhance user engagement and community building within your app by allowing users to connect with each other.

Explore More Valuable No-Code Resources

No-Code Tools Reviews

Delve into comprehensive reviews of top no-code tools to find the perfect platform for your development needs. Explore expert insights, user feedback, and detailed comparisons to make informed decisions and accelerate your no-code project development.

Explore

WeWeb Tutorials

Discover our comprehensive WeWeb tutorial directory tailored for all skill levels. Unlock the potential of no-code development with our detailed guides, walkthroughs, and practical tips designed to elevate your WeWeb projects.

Explore

No-Code Tools Comparison

Discover the best no-code tools for your projects with our detailed comparisons and side-by-side reviews. Evaluate features, usability, and performance across leading platforms to choose the tool that fits your development needs and enhances your productivity.

Explore

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences