Description
Is your feature request related to a problem? Please describe.
As of now, there is no such API that can showcase the activities of a particular user on the platform. So the feature request is to implement the API for tracking the activities of the user which only admins can check.
Describe the solution you'd like
Implement REST API for tracking user activities.
We can implement this in either of the two ways listed below (from my point of view)
- We can make a self-object for the user and keep on adding the activity of the user on that object and save that to DB. Something like we did for the notifications system.
Pros: Easy to implement
Cons: It's using extra space. So that increases the cost of the storage.
- We can also implement this without using any extra space as we are already saving every info of a user like, which user created what, liked which post, commented on which posts. So here in this approach, the only thing we have to do is that just iterate through all the user-related documents and deep populate to fetch those data and sort according to the date and send that in response.
Pros: Here we are not using any extra space but here it may be a little bit slower, but we can improve the speed using caching later on.
Cons: Little bit complex to implement
Note: This is not realtime implementation