Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
386 changes: 384 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,384 @@
# kanban-app
Membuat kanban web app

#### App Demo : https://kanban-adiet.web.app/

# Kanban Server
Kanban is an application to manage organization's tasks. This app has :
* RESTful endpoint for task's CRUD operation
* authorization
* JSON formatted response

 

## RESTful endpoints
### POST /register

> Create new user

_Request Header_
```
not needed
```

_Request Body_
```
{
"name": <your name>,
"email": <your email>,
"password": <your password>
}
```

#### Success Response: ####
_Response (201 - Created)_
```
{
"id": <id>,
"name": <your name>,
"email": <your email>,
"password": <your encrypted password>,
"updatedAt": <date>,
"createdAt": <date>
}
```

#### Error Response: ####
_Response (400 - Bad Request)_
```
[
"message": <detail message>
]
```

_Response (409 - conflict)_
```
{
"message": "Email Already registered!"
}
```

_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```

### POST /login

> Process Login

_Request Header_
```
not needed
```

_Request Body_
```
{
"email": <your email>,
"password": <your password>
}
```

#### Success Response: ####
_Response (200 - Ok)_
```
{
"access_token": <your access token>
}
```

#### Error Response: ####

_Response (400 - Bad Request)_
```
[
"message": <detail message>
]
```

_Response (404 - Not Found)_
```
{
"message": "user not registered!"
}
```

_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```

### POST /tasks

> Create new task

_Request Header_
```
{
"access_token": <your access token>
}
```

_Request Body_
```
{
"title": <title>
"category": <category>
"description": <description>
}
```

#### Success Response: ####
_Response (201 - Created)_
```
{
"id": <id>,
"title": <title>,
"description": <description> ",
"category": <category>,
"UserId": <UserId>,
"updatedAt": <date>,
"createdAt": <date>
}
```

#### Error Response: ####
_Response (400 - Bad Request)_
```
[
"message": <message detail>
]
```
_Response (401 - Unauthorized)_
```
{
"message": "Not authenticated!"
}
```

_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```

### GET /tasks

> Get User's tasks

_Request Header_
```
{
"access_token": <your access token>
}
```

_Request Body_
```
not needed
```

#### Success Response: ####
_Response (200 - Ok)_
```
[
{
"id": <id>,
"title": <title>,
"description": <description>,
"category": <category>,
"UserId": <UserId>,
"Creator": <your name>
},
{
"id": <id>,
"title": <title>,
"description": <description>,
"category": <category>,
"UserId": <UserId>,
"Creator": <your name>
},
]
```

#### Error Response: ####
_Response (401 - Unauthorized)_
```
{
"message": "Not authenticated!"
}
```

_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```

### GET /tasks/:id

> Get task by task's id

_Request Header_
```
{
"access_token": <your access token>
}
```

_Request Body_
```
not needed
```

#### Success Response: ####
_Response (200 - Ok)_
```
{
"id": <id>,
"title": <title>,
"description": <description>,
"category": <category>,
"UserId": <UserId>,
"Creator": <your name>
},
```

#### Error Response: ####
_Response (401 - Unauthorized)_
```
{
"message": "Not authenticated!"
}
```
_Response (403 - Forbidden)_
```
{
"message": "Forbidden access!"
}
```
_Response (404 - Not Found)_
```
{
"message": "task not found! "
}
```

_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```


### PUT /tasks/:id

> Update task

_Request Header_
```
{
"access_token": <your access token>
}
```

_Request Body_
```
{
"title": <title> "
"category": <category>
"description": <description>"
}
```

#### Success Response: ####
_Response (200 - Created)_
```
{
"message": "Update task success"
}
```

#### Error Response: ####
_Response (401 - Unauthorized)_
```
{
"message": "Not authenticated!"
}
```
_Response (403 - Forbidden)_
```
{
"message": "Forbidden access!"
}
```
_Response (404 - Not Found)_
```
{
"message": "task not found! "
}
```
_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```



### DELETE /tasks/:id

> Update task

_Request Header_
```
{
"access_token": <your access token>
}
```

_Request Body_
```
not needed
```

#### Success Response: ####
_Response (200 - Ok)_
```
{
"message": "Delete task success"
}
```

#### Error Response: ####
_Response (401 - Unauthorized)_
```
{
"message": "Not authenticated!"
}
```
_Response (403 - Forbidden)_
```
{
"message": "Forbidden access!"
}
```
_Response (404 - Not Found)_
```
{
"message": "task not found! "
}
```
_Response (500 - Internal Server Error)_
```
{
"message": "Internal Server Error"
}
```
Loading