Chrysolites Tech Academy

Video by Joel Loh | AI Automations · streamed from YouTube. All rights remain with the creator.

Lesson 23: Following Other Users

About this lesson

In this part of the series, Joel Loh adds the ability for users of the photo-sharing app to follow other users, one of the defining features of any social network. The video shows how core database architecture concepts, in particular intermediate tables, are used to store the state of who follows whom. It begins by creating the user follower relation in Supabase, an intermediate table that links two users together, recording one person as the follower and the other as the person being followed. This structure lets any user follow many others and be followed by many in return, without changing the users table itself. The video then builds a follow page in FlutterFlow, where users can see another person's profile and choose to follow them, with the interface showing whether they already follow that person. Because a user should only be able to follow someone once, the video takes care to prevent duplicate follows, so that repeated taps or other mistakes cannot create the same relationship twice. The follower and following counts are then reflected in the app, so that each profile shows how many people follow the user and how many people the user follows. A test confirms that following works correctly and that the counts update as expected. By the end of the video, users can follow one another, and the next part adds the ability to unfollow, using intermediate tables and Supabase triggers to keep the counts accurate. Afterwards, read Chapter 23 of the course book, which works out the size of the follow network by hand.

Install Chrysolites Tech Academy

Android / Chrome / Edge: open the browser menu and choose Install app or Add to Home screen.

iPhone / iPad (Safari): tap the Share button, then Add to Home Screen.