Is this use case feasible with bubble ? (Challenging Privacy rules and search queries)

Hi Bubblers,

I have been building an app for 6 months and have made amazing progress. This is the first time I have used such a platform and am very impressed with what we can to today with no code.

But I currently encounter a challenging use case…:

Imagine you have a facebook social network, with people, groups, and posts.

  • Groups are owned by administrators
  • An administrator can own 1 or more groups
  • Administrators are the only ones able to post something.
  • Users can follow one or multiple groups.
  • Users have a home page (basically a feed), and this feed shows all the posts from all the groups they are following and NOTHING more

The way I did it today is by having multiple objects:

  • Users
  • Groups : They have an admin list of user and a list of members
  • Posts : They have a list of groups where the post is posted into

And the feed page queries the data with a “do a search for posts” filtered with an advanced filter: This post’s group :each items member contain current user.

This just works, BUT this is not a good practice and the filtering is done on the browser.

I need something that works with privacy rules and that is server side.

I tried many different data approaches, but because privacy rules cannot check at a list level, I am stuck with the only solution: Admin can only own 1 group, and publish 1 post to 1 group.

This is a huge problem for my app and is really putting me down… any idea from anyone ?

Thanks in advance for your responses guys!

Why does the Post have a List of Groups?

Surely a Post is made into an individual Group? (even if it’s shared into another group, that should be a separate Post, with a link back to the original Post).

That way you can simply do a search for Posts who’s Group is in a list of the groups the User belongs to

I made it simple and talked about facebook, but it’s a different use case.

The post is actually an ad (think like vinted) and you want to be able to share the ad with different peoples. This is why you have different groups, because there are situations where you only want to share an ad with certain people and sometimes to your entire network.

The ads needs to be same, because the visibility of this ad will depend on the status of it. If sold, then no longer available to others.

And on the feed, if I have this ad copied into different groups, it will be returned multiple times by the “do a search” query for the same user, while it is actually the same ad witht the same information

Edit: By the way, I am not sure I can do this with privacy rules:

“That way you can simply do a search for Posts who’s Group is in a list of the groups the User belongs to”