This is somewhat of a complicated subject. Each application has it&#x27;s own needs but I&#x27;m curious to know what best practices and architecture you all recommend when storing a user&#x27;s notifications in a Node.js + MongoDB application.<p>Essentially, we have a notifications icon in our web application (similar to Facebook etc.) that shows notifications based on certain events triggered by other users in the application. Some notifications can also have actions when clicked on them.<p>The plan I had:<p>1. Store all notifications in a &#x27;notifications&#x27; collection<p>2. Each document in the collection has the notification text, unread status and action (if applicable)<p>3. When the user clicks the notification icon in the interface, they see a list of unread notifications and upon closing the drawer, an XHR gets called to mark all notifications as read<p>Is this a good way to do it?
Ask HN: Best practices to store notifications in Node.js + MongoDB application?