Checklist App is an application to manage your daily tasks on your account. It performs standard CRUD actions based on RESTful concept.
This app has :
- RESTful endpoint for task's CRUD operation
- JSON formatted response
Tech Stack used to build this app :
- Node JS
- Express JS framework
- PostgreSQL
- Axios
- Bycryptjs
- Bootsrap
- Cors
- Google-Auth-Library
- JSON Web Token
- Sequelize
These responses are applied globally on all endpoints
Response (400 - Bad Request)
{
"message": "Validation Error"
}
Response (401 - Unauthorized)
{
"message": "No Authorization"
}
Response (404 - Not Found)
{
"message":"Not Found"
}
Response (500 - Not Found)
{
"message":"Internal Server Error"
}
Login into account
Request Body
{
"email" : "[email protected]",
"password" : "password"
}
Response (200)
{
"access_token" : "<access token>"
}
Register new account
Request Body
{
"email" :"[email protected]",
"password" :"password"
}
Response (200)
{
"id": 1,
"email": "[email protected]",
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
}
Create new asset
Request Header
{
"access_token": "<access token>"
}
Response (200 - OK)
[
{
"id": <given id by system>,
"title": "<posted title>",
"description": "<posted description>",
"status":"<posted status>",
"due_date":"<posted due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
},
{
"id": <given id by system>,
"title": "<posted title>",
"description": "<posted description>",
"status":"<posted status>",
"due_date":"<posted due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
}
]
Create new todo
Request Header
{
"access_token": "<access token>"
}
Request Body
{
"title": "title",
"description": "description",
"status":"true or false",
"due_date":"due date",
}
Response (201 - Created)
{
"id": <given id by system>,
"title": "<posted title>",
"description": "<posted description>",
"status":"<posted status>",
"due_date":"<posted due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
}
Show single task defined by the id provided
Request Header
{
"access_token": "<access token>"
}
Response (200 - OK)
{
"id": <given id by system>,
"title": "<posted title>",
"description": "<posted description>",
"status":"<posted status>",
"due_date":"<posted due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
}
Update a task defined by the id provided
Request Header
{
"access_token": "<access token>"
}
Request Body
{
"title": "new Title",
"description": "new Description",
"status":"new Status",
"due_date":"new Due date"
}
Response (200 - OK)
{
"id": <given id by system>,
"title": "<edited title>",
"description": "<edited description>",
"status":"<edited status>",
"due_date":"<edited due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
}
Update task's status defined by the id provided
Request Header
{
"access_token": "<access token>"
}
Request Body
{
"status": "new Status"
}
Response (200 - OK)
{
"id": <given id by system>,
"title": "<edited title>",
"description": "<edited description>",
"status":"<edited status>",
"due_date":"<edited due_date>,
"createdAt": "<Created date given by system>",
"updatedAt": "<Updated date given by system>"
"UserId" : "<User id FK referred to user ID>"
}
Delete task's status defined by the id provided
Request Header
{
"access_token": "<access token>"
}
Response (200 - OK)
{
"message" : "todo succes to delete"
}
Show weather
Request Header
{
"access_token": "<access token>"
}
Response (200 - OK)
[
{
"location": "Jakarta",
"time": "<current time>",
"temperature": "<current temp>",
"icons": ["icon url"],
"descriptions": ["weather descriptions"]
}
]