Hey, I’m relatively new to MongoDB and have been wanting to use it for a website. I was wondering about the best way to structure my data for the same…I plan to make this a serverless application using realm and functions…
The basic concept is there’s gonna be 1 single database containing 1 collection… The documents of that collection are going to be visible on the main page, sorta like tweets on Twitter, and more can be added by users. However, before actually appearing on the main page, they need to be approved by an admin.
My approach was to insert the document in the main collection with a field:
verified:false
then, I could just render only the documents that have
verified:true
on the main page and only those with
verified:false
on the approval page visible only to admins, along with a button to update this property to true…
I just wanted to know whether or not there’s a better approach to achieve the same result…
P.S: Sorry for the long message, and thanks in advance…