{"id":18839157,"url":"https://github.com/arizdn234/bookstore-api","last_synced_at":"2026-01-28T18:30:16.161Z","repository":{"id":207657740,"uuid":"719785438","full_name":"arizdn234/bookstore-api","owner":"arizdn234","description":"\"Versatile Node.js API for efficient bookstore management operations.\"","archived":false,"fork":false,"pushed_at":"2023-12-12T14:08:49.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T09:15:53.799Z","etag":null,"topics":["bookstore","sequelize-orm"],"latest_commit_sha":null,"homepage":"","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/arizdn234.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}},"created_at":"2023-11-16T22:32:22.000Z","updated_at":"2023-12-13T06:42:20.000Z","dependencies_parsed_at":"2023-11-21T04:32:53.154Z","dependency_job_id":null,"html_url":"https://github.com/arizdn234/bookstore-api","commit_stats":null,"previous_names":["arizdn234/bookstore-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arizdn234%2Fbookstore-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arizdn234%2Fbookstore-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arizdn234%2Fbookstore-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arizdn234%2Fbookstore-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arizdn234","download_url":"https://codeload.github.com/arizdn234/bookstore-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774334,"owners_count":19694700,"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":["bookstore","sequelize-orm"],"created_at":"2024-11-08T02:42:01.857Z","updated_at":"2026-01-28T18:30:16.111Z","avatar_url":"https://github.com/arizdn234.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BOOKSTORE REST API\n## What is it?\n\"BOOKSTORE REST API\" is a robust and versatile Node.js-based RESTful API designed to streamline the management of a bookstore. This API offers a set of well-defined endpoints, enabling developers to perform essential operations such as creating, retrieving, updating, and deleting books within the bookstore ecosystem.\n\n## Key Features\n### 1. User Account Management:\n- The API includes endpoints for user account registration ('/register') and login ('/login'), facilitating secure and authenticated access to the system.\n### 2. Book Operations:\n\n- Retrieve a comprehensive list of all books (GET /books) to provide users with a snapshot of the available inventory.\n- Access detailed information about a specific book by providing its unique identifier (GET /books/:id).\n- Add new books to the bookstore seamlessly (POST /books) to keep the inventory up-to-date.\n- Update book details (PUT /books/:id) to reflect any changes, ensuring accurate and current information.\n- Remove books from the inventory effortlessly (DELETE /books/:id), maintaining a well-maintained and organized bookstore catalog.\n\n## Dependencies\n- express: ^4.18.2\n- pg: ^8.11.3\n- pg-hstore: ^2.3.4\n- sequelize: ^6.35.0\n- bcryptjs: ^2.4.3\n- dotenv: ^16.3.1\n- jsonwebtoken: ^9.0.2\n- nodemon: ^3.0.1\n- sequelize-cli: ^6.6.2\n\n## Getting Started\n#### 1. Installation\nTo install the required dependencies, run the following command:\n\n```sh\nnpm install\n```\n#### 2. Configuration\nConfigure your database connection in the `config/config.js` file.\n\n#### 3. Migration\nRun the migration to set up the database:\n\n```sh\nnpx sequelize-cli db:migrate\n```\n\n#### 4. Run Server\nStart the server:\n```sh\nnpm start\n```\nThe API will be accessible at `http://localhost:3000`.\n\n## Endpoints\n| Method | Path | Response | Authorized |\n| --- | --- | --- | --- |\n| POST | /register | User account register. | - |\n| POST | /login | User account login. | - |\n| GET | /books | Get a list of all books. | - |\n| GET | /books/:id | Get details of a specific book. | customer |\n| GET | /admin/books/:id | Get details of a specific book. | admin |\n| POST | /admin/books | Add a new book to the bookstore. | admin |\n| PUT | /admin/books/:id | Update details of a specific book. | admin |\n| DELETE | /admin/books/:id | Delete a specific book. | admin |\n\n---\n---\n---\n\n## Build Step\nVisit the docs [Sequelize Documentation](https://sequelize.org/docs/v6/)\n### Setup \u0026 Configuration project\n1. Initialize npm\n```sh\nnpm init\n```\n\n2. Install dependecies\n```sh\nnpm install\n```\n\n3. Initialize Sequelize-cli\n```sh\nnpx sequelize-cli init\n```\n\n4. Setup your database config in config.json files\n\n6. Generate model\n```sh\nnpx sequelize-cli model:generate --name Book --attributes title:string,author:string,stock:number\n```\n\n7. Migrate model\n```sh\nnpx sequelize-cli db:migrate\n```\n\n8. Generated seed\n```sh\nnpx sequelize-cli seed:generate --name default-book\n```\n\n9. Create some seed\n\n10. Migrate seed\n```sh\nnpx sequelize-cli db:seed:all\n```\n\n\n### Setup \u0026 Configuration app\n- Create some routes\n- Create some controllers\n- Create some helpers\n- Create some middlewares\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farizdn234%2Fbookstore-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farizdn234%2Fbookstore-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farizdn234%2Fbookstore-api/lists"}