{"id":22158415,"url":"https://github.com/andr3w03/bookshelf-api","last_synced_at":"2026-05-13T07:08:42.201Z","repository":{"id":65448852,"uuid":"592154718","full_name":"aNdr3W03/Bookshelf-API","owner":"aNdr3W03","description":"Bookshelf RESTful API","archived":false,"fork":false,"pushed_at":"2023-01-25T00:18:42.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T19:49:39.358Z","etag":null,"topics":["backend","dicoding","eslint","hapi","javascript","nodejs","web-service"],"latest_commit_sha":null,"homepage":"https://bookshelf-api-andrewbj.vercel.app/books","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aNdr3W03.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-23T03:48:58.000Z","updated_at":"2023-07-03T01:18:53.000Z","dependencies_parsed_at":"2023-02-13T09:01:19.819Z","dependency_job_id":null,"html_url":"https://github.com/aNdr3W03/Bookshelf-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aNdr3W03%2FBookshelf-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aNdr3W03%2FBookshelf-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aNdr3W03%2FBookshelf-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aNdr3W03%2FBookshelf-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aNdr3W03","download_url":"https://codeload.github.com/aNdr3W03/Bookshelf-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294768,"owners_count":20591900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","dicoding","eslint","hapi","javascript","nodejs","web-service"],"created_at":"2024-12-02T03:32:45.508Z","updated_at":"2026-05-13T07:08:42.171Z","avatar_url":"https://github.com/aNdr3W03.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bookshelf API\n\nBuild a RESTful API with web services using JavaScript, Node.js, Node Package Manager, Hapi Framework, and perform RESTful API testing automatically using Postman.\n\n## Deployment\n\nYou can see the Bookshelf API deployment at the following link,  \n[bookshelf-api-andrewbj.vercel.app/books](https://bookshelf-api-andrewbj.vercel.app/books \"Bookshelf API\").\n\n## Installation\n\n1. Clone this Repository\n\t```bash\n\tgit clone https://github.com/aNdr3W03/Bookshelf-API.git\n\t```\n\n2. Navigate to the project directory\n\t```bash\n\tcd Bookshelf-API-main\n\t```\n\n3. Install all dependencies\n\t```bash\n\tnpm install\n\t```\n\n4. Run the server\n\t```bash\n\tnpm run start\n\t```\n\n5. Open on localhost port 5000, [localhost:5000/books](http://localhost:5000/books).\n\n6. Stop the server by `ctrl + c`.\n\n## Dependency\n\n- [Hapi](https://hapi.dev \"Hapi Framework\")\n- [nanoid](https://www.npmjs.com/package/nanoid \"Nano ID\")\n- [ESLint (Airbnb Style)](https://www.npmjs.com/package/eslint-config-airbnb \"ESLint Airbnb Style\")\n- [nodemon](https://www.npmjs.com/package/nodemon \"nodemon\")\n\n## Run ESLint\n\n```bash\nnpx eslint .\n```\n\n## Postman API Testing\n\nAPI testing is done using Postman. There are a total of 104 tests consisting of 74 mandatory tests and 30 optional tests, with `POST`, `GET`, `PUT`, and `DELETE` methods.\n\nThis is the results of the API testing with Postman.\n\n![Bookshelf API Test.postman_test_run.png](https://raw.githubusercontent.com/aNdr3W03/Bookshelf-API/main/Postman/Bookshelf%20API%20Test.postman_test_run.png \"Bookshelf API Postman Test Result\")\n\nIf you want to see the results of the API testing with Postman in the form of a `.json` file, you can see them at the following [link](https://raw.githubusercontent.com/aNdr3W03/Bookshelf-API/main/Postman/Bookshelf%20API%20Test.postman_test_run.json \"Bookshelf API Test.postman_test_run.json\").\n\nYou can see the files used to perform the API testing using Postman at the following link, [collection](https://raw.githubusercontent.com/aNdr3W03/Bookshelf-API/main/Postman/Bookshelf%20API%20Test.postman_collection.json \"Postman Bookshelf API Test Collection\") and [environment](https://raw.githubusercontent.com/aNdr3W03/Bookshelf-API/main/Postman/Bookshelf%20API%20Test.postman_environment.json \"Postman Bookshelf API Test Environment\").\n\n## Bookshelf API Description\n\n### 1. Add Book\n\n**Request:**\n- Method: `POST`\n- Endpoint: `/books`\n- Body:\n\t```json\n\t{\n\t  \"name\": string,\n\t  \"year\": number,\n\t  \"author\": string,\n\t  \"summary\": string,\n\t  \"publisher\": string,\n\t  \"pageCount\": number,\n\t  \"readPage\": number,\n\t  \"reading\": boolean\n\t}\n\t```\n\n**Response:**\n```json\n{\n  \"status\": string,\n  \"message\": string,\n  \"data\": {\n    \"bookId\": string\n  }\n}\n```\n\n### 2. Get All Books\n\n**Request:**\n- Method: `GET`\n- Endpoint: `/books`\n\n**Response:**\n```json\n{\n  \"status\": string,\n  \"data\": {\n    \"books\": [\n      {\n        \"id\": string,\n        \"name\": string,\n        \"publisher\": string\n      }\n    ]\n  }\n}\n```\n\n### 3. Get Book Detail\n\n**Request:**\n- Method: `GET`\n- Endpoint: `/books/{id}`\n\n**Response:**\n```json\n{\n  \"status\": string,\n  \"data\": {\n    \"book\": {\n      \"id\": string,\n      \"name\": string,\n      \"year\": year,\n      \"author\": string,\n      \"summary\": string,\n      \"publisher\": string,\n      \"pageCount\": number,\n      \"readPage\": number,\n      \"finished\": boolean,\n      \"reading\": boolean,\n      \"insertedAt\": date,\n      \"updatedAt\": date\"\n    }\n  }\n}\n```\n\n### 4. Update Book\n\n**Request:**\n- Method: `PUT`\n- Endpoint: `/books/{id}`\n- Body:\n\t```json\n\t{\n\t  \"name\": string,\n\t  \"year\": number,\n\t  \"author\": string,\n\t  \"summary\": string,\n\t  \"publisher\": string,\n\t  \"pageCount\": number,\n\t  \"readPage\": number,\n\t  \"reading\": boolean\n\t}\n\t```\n\n**Response:**\n```json\n{\n  \"status\": string,\n  \"message\": string\n}\n```\n\n### 5. Delete Book\n\n**Request:**\n- Method: `DELETE`\n- Endpoint: `/books/{id}`\n\n**Response:**\n```json\n{\n  \"status\": string,\n  \"message\": string\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandr3w03%2Fbookshelf-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandr3w03%2Fbookshelf-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandr3w03%2Fbookshelf-api/lists"}