- NODEJS, Express, MongoDB, Node Mailer, REST API implementation
-
User Authentication with JWT tokens
-
Supports multiple login from different devices
-
User -> creation / deletion/ updates
-
User avator -> add / delete
-
Task -> add / update / delete / batch delete
-
Send Mail -> When new user is created or deleted
-
Image processing with Multer and sharp
-
Tested with JEST
-
Tool use to test APIs - POSTMAN
https://simple-task-planner-app.herokuapp.com
## API Documentation
url = http://localhost:3000
- API ->
{{url}}/users
- Method -> POST
- data -> body [ type -> JSON]
{
"name": "Jhon Doe",
"email": "[email protected]",
"password": "password",
"age": 26
}
- API:
/users/login
- Method:
Post
- body - JSON
{
email: '[email protected]',
password: 'password'
}
- API:
/users/logout
- Method:
Post
- Header -
'Authorization': 'Bearer token'
- API:
/users/logout-all
- Method:
Post
- Header -
'Authorization': 'Bearer token'
- API:
/users/me
- Method:
Get
- Header -
'Authorization': 'Bearer token'
- API:
/users/me
- Method:
Patch
- Header -
'Authorization': 'Bearer token'
- Body - JSON
{
name: 'Jhon',
password: 'password',
age: 23,
email: '[email protected]'
}
- API:
/users
- Method:
Delete
- Header -
'Authorization': 'Bearer token'
- API:
/users/me/avator
- Method:
Post
- Header -
'Authorization': 'Bearer token'
- Body - multipart formdata:
'avator': 'image file'
- API:
/users/me/avator
- Method:
Delete
- Header -
'Authorization': 'Bearer token'
- API:
/users/:userId/avator
- Method:
Get
- API:
/tasks
- Method:
Post
- Header -
'Authorization': 'Bearer token'
- Body - JSON
{
description: 'random tasks :0',
completed: false
}
- API:
/tasks
- Method:
Get
- Header -
'Authorization': 'Bearer token'
- API:
/tasks/:id
- Method:
Get
- Header -
'Authorization': 'Bearer token'
- API:
/tasks/:id
- Method:
Patch
- Header -
'Authorization': 'Bearer token'
{
description: 'updated random tasks :p',
completed: true
}
- API:
/tasks/:id
- Method:
Delete
- Header -
'Authorization': 'Bearer token'