I would like to implement a small application where users can register themselves and after the registration they can add items to a todo list. Essentially I am looking for ideas/tutorials on how to handle such a scenario using a MongoDB backend (Mongoose) and a node.js/expressjs server. I need to make sure that each and every user who has an account, can only see their todo items.
I found a very good tutorial on how to implement authentication for MongoDB (http://blog.mongodb.org/post/32866457221/password-authentication-with-mongoose-part-1) but this doesn't quite tell me how to handle what happens after the user logs in. Should I just start loading different JS modules once the authentication was successful?
My other idea was to create a user ID against each todo item (probably not the best option). I'm fairly new to MongoDB and I come from a MySQL background, hence I'm used to the various JOINs etc but I'm not sure how much this is relevant in a NoSQL world.
Thanks.
Update:
Another idea is to create username/password for each user that allows them to connect to the database and create collections based on their usernames therefore each user will have their own collection...? I'm not to sure how to handle this scenario either so I'm still open for suggestions :)