{"id":20730982,"url":"https://github.com/juhachmann/not_amazon_bookstore_api","last_synced_at":"2026-05-03T09:34:55.678Z","repository":{"id":243451960,"uuid":"812472456","full_name":"juhachmann/not_amazon_bookstore_api","owner":"juhachmann","description":"Need a bookstore api to play around, learn Spring or use in your frontend projects? Check this beginner friendly project!","archived":false,"fork":false,"pushed_at":"2024-06-17T16:45:59.000Z","size":553,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T00:26:11.556Z","etag":null,"topics":["mvc-architecture","rest-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/juhachmann.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T01:53:50.000Z","updated_at":"2024-06-17T16:46:02.000Z","dependencies_parsed_at":"2025-01-18T00:35:29.503Z","dependency_job_id":null,"html_url":"https://github.com/juhachmann/not_amazon_bookstore_api","commit_stats":null,"previous_names":["juhachmann/simple_bookstore_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhachmann%2Fnot_amazon_bookstore_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhachmann%2Fnot_amazon_bookstore_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhachmann%2Fnot_amazon_bookstore_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhachmann%2Fnot_amazon_bookstore_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juhachmann","download_url":"https://codeload.github.com/juhachmann/not_amazon_bookstore_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243012698,"owners_count":20221605,"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":["mvc-architecture","rest-api","spring-boot"],"created_at":"2024-11-17T05:13:23.346Z","updated_at":"2026-05-03T09:34:55.648Z","avatar_url":"https://github.com/juhachmann.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://github.com/juhachmann/simple_bookstore_api/blob/main/logo2.png\" alt=\"Logo\"\u003e \n  \u003cbr\u003e\n  (Not Amazon) Bookstore API\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eA simple bookstore API built with Spring Boot\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#endpoints\"\u003eEndpoints\u003c/a\u003e •\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e •\n  \u003ca href=\"pt-BR.md\"\u003ePT-BR\u003c/a\u003e\n\u003c/p\u003e\n\n- - -\n\nThis project is ideal if you need a ready-to-use api to start building your frontend projects. It may also be useful if you want a starting point to learn and play around with Spring Boot. Developed as a web services learning exercise (CTDS / IFSC / 2023.1) \n\n## Features\n\n* CRUD and filter endpoints\n  - Create, read, update and delete your books\n* Repricing endpoints\n  - Reprice your books by given percentage rates\n* Mock Datasource\n  - You may add any other datasource or continue with a mock non persinting default\n* Ready-to-use UI\n  - Basic UI built with pure php, good for beginners learning to interact with APIs\n* UI Language: Portuguese (PT-BR)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/juhachmann/simple_bookstore_api/blob/main/demo01.png\" width=\"70%\" height=\"70%\" alt=\"Home\"\u003e\n\u003c/div\u003e\n\n\n## Install\n\nFirst, be sure you have the following installed on your machine: \n- [Java SDK 8+](https://openjdk.org/projects/jdk/17/)\n- [Maven](https://maven.apache.org/)\n- [PHP 8+](https://www.php.net/)\n- [php-curl](https://www.php.net/)\n- [lib-curl](https://curl.se/)\n\nAfter that, from your command line:\n\n```bash\n# Clone this repository\n$ git clone https://github.com/juhachmann/not_amazon_bookstore_api\n\n# Go into the repository\n$ cd not_amazon_bookstore_api\n\n# Run the bash script\n$ ./bookstore.sh\n```\n\nOpen you browser and navigate to **_localhost:8000_**\n\n\nYou may also want to serve the backend and frontend independently: \n\n```bash\n# Go into the repository backend source\n$ cd not_amazon_bookstore_api/backend\n\n# Install and serve your backend\n$ mvn spring-boot:run\n\n# Open another terminal\n\n# Go into the repository frontend source\n$ cd not_amazon_bookstore_api/frontend\n\n# Serve yout frontend\n$ php -S localhost:8000\n```\n\nOr open and run from your favorite IDEs\n\n\n## Endpoints\n\n| Method | Endpoint | Description | Request Body | \n|------|-------|-----------|-----|\n| POST | /books | create new book | [Book](#Book) (without id)| \n| GET | /books | see all books |  |\n| GET | /books?contains= | filter by contains |  | \n| GET | /books?author= | filter by author | | \n| GET | /books?title= | filter by title | |\n| GET | /books?isbn= | find by ISBN  | \n| GET | /books/{id} | find by id | | \n| PUT | /books/{id} | update book | [Book](#Book) (without id) | \n| DELETE | /books/{id} | delete book | | \n| DELETE | /books | delete ALL books | | \n| PUT | /reprices/{rate} | adjust all prices  | | \n| PUT | /reprices/{rate}/books/{id} | adjust price  | |\n\n### Book\n\n```json\n{\n  \"id\" : 1,\n  \"isbn\": \"isbn\",\n  \"author\": \"Author Name\",\n  \"title\": \"Book Title\",\n  \"publisher\": \"Publisher Name\",\n  \"price\": 100.99,\n  \"imageUrl\": \"image/url.png\"\n}\n```\n\n### curl for endpoints\n\n```bash\n# Ajdust base url and port if needed\n\ncurl -XGET 'localhost:8081/books'\n\ncurl -XGET 'localhost:8081/books?contains='\n\ncurl -XGET 'localhost:8081/books?author='\n\ncurl -XGET 'localhost:8081/books?title='\n\ncurl -XGET 'localhost:8081/books?isbn='\n\ncurl -XGET 'localhost:8081/books/{id}'\n\ncurl -XDELETE 'localhost:8081/books'\n\ncurl -XDELETE 'localhost:8081/books/{id}'\n\ncurl -XPUT 'localhost:8081/reprices/{rate}'\n\ncurl -XPUT 'localhost:8081/reprices/{rate}/books/{id}'\n\ncurl -XPUT -H \"Content-type: application/json\" -d '{\n\t\"isbn\" : \"isbn\",\n\t\"author\" : \"Author Name\",\n\t\"title\" : \"Book Title\",\n\t\"publisher\" : \"Publisher Name\",\n\t\"price\" : 100.99,\n\t\"imageUrl\" : \"image/url.png\"\n}' 'localhost:8081/books/id'\n\ncurl -XPOST -H \"Content-type: application/json\" -d '{\n\t\"isbn\" : \"isbn\",\n\t\"author\" : \"Author Name\",\n\t\"title\" : \"Book Title\",\n\t\"publisher\" : \"Publisher Name\",\n\t\"price\" : 100.99,\n\t\"imageUrl\" : \"image/url.png\"\n}' 'localhost:8081/books'\n```\n\n## Credits\n\nThis software uses the following 3rd party packages and tools:\n\n- [SpringBoot](https://spring.io/projects/spring-boot)\n- [CurlBuilder](https://curlbuilder.com)\n- [CodeBeautify](https://codebeautify.org/curl-to-php-online)\n- [Bootstrap](https://getbootstrap.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuhachmann%2Fnot_amazon_bookstore_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuhachmann%2Fnot_amazon_bookstore_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuhachmann%2Fnot_amazon_bookstore_api/lists"}