Currently, I am working on adding a feature that would allow multiple users to use my to-do app. However, I am uncertain about the most effective way to do this. Essentially, I want users to be able to create accounts, log in, and have access to their own lists and tasks.
One concept that came to mind is to have a separate document for each user, with data structured like this:
{
user: "john doe",
password: "qwerty",
_id: ObjectID("1234567890"),
lists:[
{title: "school",
tasks: ["math", "english", "science"]
},
{title: "work",
tasks: ["budget", "presentation", "excel"]
}
]
Are there any alternative methods that could be more efficient?