{"version":"1.0","type":"rich","title":"Notify socket.io users when MongoDB data collection changes","description":"This example shows a real-time notification system that pushes MongoDB collection changes to connected socket.io clients. The code sets a watch on the User collection using MongoDB’s changeStream API, then listens for socket connections. Upon any change event, it queries the full User collection with `User.find({})` and emits the updated data to the client via `socket.emit('users', data)`. It demonstrates live data synchronization between a MongoDB backend and browser clients through socket.io’s event-driven communication.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-ad6b988620cd217fcf04ec9505da2988?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}