Sunday, 3 May 2020

NoSQL (mongo) schema for an activity feed?

I know this isn't technically a node question, but since I'm using node in this project, and mongo is so popular in the node community, I thought it was worth posting here.I've built these in the past but want to throw this out there and maybe get some new ideas or ways I can improve. I'm looking to build an activity feed in an app.Give or take, something like this:​https://preview.redd.it/qphmsts2clw41.png?width=1044&format=png&auto=webp&s=297493abae7011837cf383cfa94946fe05a53694Some obvious data- When it happened (createdAt, etc)- A title ("Task created")- Additional description ("Anthony created a task for Jessica")- Some activity items may point to the source doc (a task, or a document that was uploaded)- User who did the activity (and maybe ancillary users like when a task is assigned to somebody)​Any thoughts on how you might approach this?​Some initial thoughtshttps://gist.github.com/acomito/b23af4a8d5ed0777d27d37b088815460

Submitted May 03, 2020 at 07:10PM by foundry41

No comments:

Post a Comment