The last two weeks, we've been diving deep into making an auth-backend. Over the weekend, remake the whole auth backend for a CRU(Create, Read, Update)Todo App.
- Submit Github repo link in
- Commit commit commit!
- User can sign-up, login, update with JWT
- Create User
- login matches model
- password is salt
- middleware for validation
- saves to db
- Login
- JWT token is passed
- Create User
- User will be able to make a todo list once signed it. Each todo is connected to the user and only that user will be able to see those todos.
- Create new model
- User collection will have date, firstName, lastName, username, email, password and todos.
- Todo collection will have date, todo, done, and user.
- Create Middlewares, include validator
- [/] Have a router, model and controller for user and todo
- MVC User
- [/] MVC Todo
- Use MongoDB, mongoose, bcryptjs, JWT
- MongoDB
- Mongoose
- bycrpyt
- JWT
- Include .env
- Remember they are going to be related to each other!
- Include delete, user can delete the todo which will also remove from user's array.