This is a complete web application "Nota" app deveoped with MERN stack , that allow you to add notes , edit it and delete with a login and signup system that use tokens , email verify , validation and error system. The skills used are :
HTML , CSS , Bootstrap , JS , React -> for the Front-End (client) section
Node.js , MongoDB , Express , Api , Web tokens , Validation -> for the Back-End (server) section
The front-end uses React framework with routing system, Bootstrap for styling , css custom styling and API requests to the backend. Key features include:
[POST] /user/signup
{
"name":"Bassem Hazem",
"email":"bassemhazemmahmouddev@gmail.com",
"age":20,
"password":"Alej2223",
"cPassword":"Alej2223",
"role":"admin"
}
{
"message": "success"
}
[POST] /user/signin
{
"email":"bassemhazemmahmouddev@gmail.com",
"password":"Alej2223"
}
{
"message": "success",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJ1c2VySWQiOiI2NmYzMzZhZGFkYzMwNTY3ZDU3MWQ5Nz
ciLCJuYW1lIjoiQmFzc2VtIEhhemVtIiwiZW1haWwiOiJi
YXNzZW1oYXplbW1haG1vdWRkZXZAZ21haWwuY29tIiwiaW..."
}
[GET] user/verify/:verify email token
{
"message": "success"
}
[GET] /note/all
Bearer Token "token"
{
"message": "success",
"notes": [...]
}
[GET] /note/:id
Bearer Token "token"
{
"message": "success",
"notes": [...]
}
[POST] /note/add
Bearer Token "token"
{
"title":"My day",
"description":"good"
}
{
"message": "success"
}
[PUT] /note/update
Bearer Token "token"
{
"_id":"66f33abcad1d1d0baa16babe",
"title":"My day 2",
"description":"good 100%"
}
{
"message": "success",
"updatedNote": {
"_id": "66f33abcad1d1d0baa16babe",
"title": "blog",
"description": "good 100%",
"createdBy": "66f336adadc30567d571d977",
"__v": 0
}
}
[DELETE] /note/delete/:id
Bearer Token "token"
{
"message": "done",
"deleted": {
"_id": "66f33abcad1d1d0baa16babe",
"title": "blog",
"description": "good 100%",
"createdBy": "66f336adadc30567d571d977",
"__v": 0
}
}
Tokens are generated using jsonwebtoken (jwt).
Passwords are encrypted using bcrypt with the suitable number of rounds.
Verifying eamils are send using nodemailer with a different token and you'll be able to verify your account when you receive the message by the end point verify.
The system is handling all types of errors exist.