User model

The user model will define user details to be stored in the MongoDB database, and also handle user-related business logic such as password encryption and user data validation. The user model for this skeletal version will be basic with support for the following attributes:

Field name Type

Description

name

String Required field to store user's name

email

String Required unique field to store user's email and identify each account (only one account allowed per unique email)

password

String Required field for authentication, the database will store the encrypted password and not the actual string for security purposes

created

Date Automatically generated timestamp when a new user account is created

updated ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.