Multi-Role SaaS Marketplace - Followers System

Hey all :wave:

I’m building a SaaS Marketplace and looking for a bit of guidance on integrating a “Followers” system.

As an overview:

  • In the app, there are 2 User “Types”, set up as individual data types in the database

  • e.g. When an account is created, they are registered as Type A or Type B

  • I’d like to have a system where all Types can follow each other, regardless of being Type A or B

  • This is where it gets a little tricky on performance/structuring…

I’d say I’m ‘medium’ Bubble experience, but it seems like there are two options on how to structure this for maximum performance - or maybe there’s no difference in performance and it comes down to just simplicity!


Option 1

  • Create a “Followers” data type, where both Type A or B can be added to a single followers ‘list’
  • This needs 4 different fields - where only one of each can be filled out:

1A: ‘Following - Type A’ - if the Type being followed is A, this is filled
1B: ‘Following - Type B’ - if the Type being followed is B, this is filled
2A: ‘Follower - Type A’ - if the Type doing the following is A, this is filled
2B: ‘Follower - Type B’ - if the Type doing the following is B, this is filled

To show the “Followers” list, this method allows a simple search to be done for Followers item 1/2/3/4/etc

To me this seems simpler, but requires a Search to be done over a potentially massive data-set if a user had 1,000’s of followers in time with scale.

So the main question for Option 1: is this scaleable or does the number of Searches to be performed not make a difference?


Option 2

  • Link followers directly to the Type A or B data types as a field in individual lists

  • I.e. A user Type A would have a list for both Type A followers and Type B followers - and vice versa

  • This seems to allow a more efficient Search method - by being able to search/filter the list structured as a field ‘within’ the Type A or Type B.

  • The problem that seems to arise here, is that because they are different data types, you can’t put the two lists into a single repeating group to show a full followers list. You have to create this messy system of searches & conditional visibility dependent on what you want to display, pulled from the two lists.

The main question for Option 2: how to clean it up best, or merge the two lists of followers?


Very happy to be completely wrong with both of the above potential options! Just want to make it as efficient as possible so that it’s not messy or slow with scale.

Looking forward to potential solutions :crossed_fingers: