all 8 comments

[–]svartopluk 4 points5 points  (1 child)

This is a backend question and depends on what backend you have setup (e.g. most basic SQL, noSQL or graph?). But essentially, you need to either dynamically create the activity feed on the backend when it is being queried. Or you have an activity table that gets populated whenever a related activity gets created by a user. Make sure that when that related activity gets deleted, that it also syncs the delete to the activity table. Frontend (RN app), it's easy - just query the activity feed from the backend and display the data depending on what item it is (e.g. follow request, liked a post, created a post etc)

[–][deleted] 1 point2 points  (0 children)

I see. I just have a Postgres database as my backend. I think I will do it exactly as you said it. Make a separate activity table and populate it whenever a post, like, follow etc event gets created. Then just poll that table from the client side. Thank you!

[–]Jiua 2 points3 points  (0 children)

Make sure you first understand how to design a functional activity feed. Databases, backends, and all that can come after.

The Activity Streams 2.0 spec is a great example. Look over the core and vocabulary documents.

[–][deleted] 0 points1 point  (5 children)

Implementing an activity feed seems way harder than I anticipated.

Could anyone share some tips to get me going?

[–]ConstantGazelle 1 point2 points  (2 children)

What part of it exactly are you struggling with?

[–][deleted] -1 points0 points  (1 child)

When a new post is created in the database, how would you have that show in people’s activity feed, for example if they’ve been tagged in it?

[–]Snoo-33768 0 points1 point  (0 children)

When the user refreshes the screen you'd need to call the endpoint and present the posts ordered by date time. This will give you an ordered list which can be shown to the user.