0

I have a website that makes users sell thier stuff, so the user can follow other users to recieve a notification if the user posted a post, or someone commented on his post or replied on his comment.

I would like to display the notifications in a standard way, bell icon in the right corner.

So, my question is what the best practice to do the notification concept.

I'm using MERN stack for this project.

Mubarak B
  • 60
  • 6
  • Are you asking for frontend or backend ? What did you try so far ? – Johan Jan 16 '23 at 13:42
  • I'm actually asking for backend, I tried to create notification model with (actor, recipient, content, type), so if I have to notify a user that is someone commented on his post it's become simple to create a single notification specific to the post creator, but when it comes to the senario that notify a user if any of his following users posted a post do I have to create notifications to all this users? In my opinion, it's a bad idea – Mubarak B Jan 16 '23 at 13:51
  • implementing notifications system by yourself is complicated. You need some technologies like WebSockets, a Cron etc. Maybe consider using a library like `socket.io` that implement already all of this – Johan Jan 16 '23 at 13:56

0 Answers0