Chrysolites Tech Academy

Video by HeyTimDev · streamed from YouTube. All rights remain with the creator.

Lesson 14: Followers, Following and Friends

About this lesson

In this tutorial, HeyTimDev adds a followers and following system to the short-video app, allowing users to follow each other and interact with the people they are connected to. It begins by creating the follower and following relationship in the database using Supabase, recording who follows whom so that the connections between users can be used throughout the app. You then implement a follow and unfollow feature, with the interface updating straight away so that users can see the change as soon as they make it. An important idea in the video is tracking mutual followers, people who follow each other, to determine friendships, and displaying them on the profile page. These friendships matter later in the series, because they decide who can see friends-only content and who can chat. The video also shows how to fetch and display a user's number of followers and the number of people they are following, so that every profile shows these familiar statistics. Finally, the home feed is updated so that it displays content only from the users you follow, making the feed personal to each user rather than a list of every video in the app. By the end of the video, the app has a fully functional followers system, so that users can follow each other and view the content of the people they are connected with, and the next part expands the profile page and adds more interactivity. Afterwards, read Chapter 14 of the course book, which works out friendships from follower lists 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.