GET /feed/me/ - fetches feed for the active user
POST /feed/me?content={content}&auth_token={auth_token} content is the data the user wants to post; authToken is used to check user's permissions. body={media:JSON} on body we can send any other media like images or videos for that post
POST /post/{postId}/react/{reactType}&auth_token={auth_token} used by users for reacting to a post
POST /post/{postId}/comment/{comment}&auth_token={auth_token} used by users to leave comments to a post
POST /post/{postId}/share&auth_token={auth_token} used by users to share a post
POST /notify/user/{userId} body:{notificationMessage:string} used to notify a user of a new post or interactions
see feed flow:
post and interact with posts flow:
in case of system failures, we have 5 levels of caching:
if any of the db fails, we temporarily use its cache, in case of fanout workers failures, then the message still remains in the fanout queue and can be picked up by other workers. in case the queue fails, it persists its data on disk and when it comes back up it will still have its data