{"id":30501205,"url":"https://github.com/pushkarsabe/booklendingandreview","last_synced_at":"2026-04-13T15:31:46.301Z","repository":{"id":308862166,"uuid":"1034348954","full_name":"pushkarsabe/bookLendingAndReview","owner":"pushkarsabe","description":"📚 Book Library - Modern Book Lending \u0026 Review Platform","archived":false,"fork":false,"pushed_at":"2025-10-22T04:57:34.000Z","size":301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-22T06:31:53.861Z","etag":null,"topics":["css3","express-js","html5","javascript","jwt-authentication","mysql","node-js","sequelize"],"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/pushkarsabe.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-08T08:46:07.000Z","updated_at":"2025-10-22T04:57:38.000Z","dependencies_parsed_at":"2025-08-08T11:19:57.816Z","dependency_job_id":"9d6b709d-d5cf-4ba2-a944-3e21026b3d22","html_url":"https://github.com/pushkarsabe/bookLendingAndReview","commit_stats":null,"previous_names":["pushkarsabe/booklendingandreview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pushkarsabe/bookLendingAndReview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushkarsabe%2FbookLendingAndReview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushkarsabe%2FbookLendingAndReview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushkarsabe%2FbookLendingAndReview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushkarsabe%2FbookLendingAndReview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushkarsabe","download_url":"https://codeload.github.com/pushkarsabe/bookLendingAndReview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushkarsabe%2FbookLendingAndReview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css3","express-js","html5","javascript","jwt-authentication","mysql","node-js","sequelize"],"created_at":"2025-08-25T09:12:27.536Z","updated_at":"2026-04-13T15:31:46.177Z","avatar_url":"https://github.com/pushkarsabe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"//live link for the access of others\nhttps://book-lending-ui.onrender.com\n\nSpark Library - Book Lending \u0026 Review Platform\n\nA full-stack web application built with a Node.js backend and a vanilla JavaScript frontend. This platform allows users to register, browse a library of books, borrow available titles, and leave reviews. The application features a robust role-based access control system, providing a separate, secure dashboard for administrators to manage the book inventory and user return requests.\n\n Features\n\n    User Authentication 🔑\n\n        Secure user registration and login with password hashing (bcryptjs).\n\n        JWT-based authentication for protecting API routes.\n\n    User Functionality 👤\n\n        Browse and search the entire library of books.\n\n        Borrow available books.\n\n        View a personalized \"My Books\" list of currently borrowed items.\n\n        View detailed information for each book, including its status and due date.\n\n        Request a 7-day extension on a borrowed book.\n\n        Request to return a borrowed book, pending admin approval.\n\n        Add, view, and edit a star-rated review for any book.\n\n    Admin Functionality 👑\n\n        Secure admin-only dashboard.\n\n        Add new books to the library.\n\n        Delete existing books from the library.\n\n        View a real-time dashboard of all pending return requests from users.\n\n        Approve or reject return requests, which automatically updates the book's availability.\n\n Tech Stack\n\n    Backend: Node.js, Express.js\n\n    Database: MySQL\n\n    ORM: Sequelize\n\n    Authentication: JSON Web Tokens (jsonwebtoken), bcryptjs\n\n    Frontend: HTML5, CSS3, Vanilla JavaScript (with Axios for API calls)\n\nGetting Started\n\nFollow these instructions to get a local copy of the project up and running for development and testing purposes.\n\n1. Clone the Repository\n\nBash\n\ngit clone \u003cyour-repository-url\u003e\ncd \u003cproject-directory\u003e\n\n2. Install Dependencies\n\nBash\n\nnpm install\n\n3. Set Up Environment Variables\n\nCreate a .env file in the root of the project and add the following configuration variables.\nCode snippet\n\nDB_HOST=localhost\nDB_USER=your_mysql_user\nDB_PASSWORD=your_mysql_password\nDB_NAME=library_db\nJWT_SECRET=a_very_secret_key_that_is_long_and_secure\nPORT=3000\n\n4. Run the Application\n\nThe server uses sequelize.sync() to automatically create and update your database tables based on the models.\nBash\n\n# For development with auto-restarting\nnodemon index.js\n\n# For standard execution\nnode index.js\n\nThe server will start on http://localhost:3000.\n\nOf course. Here is a detailed project description suitable for a README.md file in your Git repository. It covers the project's features, setup instructions, and a complete list of the API endpoints we've built.\n\nYou can copy and paste the entire text below into a file named README.md in your project's root directory.\n\nSpark Library - Book Lending \u0026 Review Platform\n\nA full-stack web application built with a Node.js backend and a vanilla JavaScript frontend. This platform allows users to register, browse a library of books, borrow available titles, and leave reviews. The application features a robust role-based access control system, providing a separate, secure dashboard for administrators to manage the book inventory and user return requests.\n\n✨ Features\n\n    User Authentication 🔑\n\n        Secure user registration and login with password hashing (bcryptjs).\n\n        JWT-based authentication for protecting API routes.\n\n    User Functionality 👤\n\n        Browse and search the entire library of books.\n\n        Borrow available books.\n\n        View a personalized \"My Books\" list of currently borrowed items.\n\n        View detailed information for each book, including its status and due date.\n\n        Request a 7-day extension on a borrowed book.\n\n        Request to return a borrowed book, pending admin approval.\n\n        Add, view, and edit a star-rated review for any book.\n\n    Admin Functionality 👑\n\n        Secure admin-only dashboard.\n\n        Add new books to the library.\n\n        Delete existing books from the library.\n\n        View a real-time dashboard of all pending return requests from users.\n\n        Approve or reject return requests, which automatically updates the book's availability.\n\n🛠️ Tech Stack\n\n    Backend: Node.js, Express.js\n\n    Database: MySQL\n\n    ORM: Sequelize\n\n    Authentication: JSON Web Tokens (jsonwebtoken), bcryptjs\n\n    Frontend: HTML5, CSS3, Vanilla JavaScript (with Axios for API calls)\n\n🚀 Getting Started\n\nFollow these instructions to get a local copy of the project up and running for development and testing purposes.\n\n1. Clone the Repository\n\nBash\n\ngit clone \u003cyour-repository-url\u003e\ncd \u003cproject-directory\u003e\n\n2. Install Dependencies\n\nBash\n\nnpm install\n\n3. Set Up Environment Variables\n\nCreate a .env file in the root of the project and add the following configuration variables.\nCode snippet\n\nDB_HOST=localhost\nDB_USER=your_mysql_user\nDB_PASSWORD=your_mysql_password\nDB_NAME=library_db\nJWT_SECRET=a_very_secret_key_that_is_long_and_secure\nPORT=3000\n\n4. Run the Application\n\nThe server uses sequelize.sync() to automatically create and update your database tables based on the models.\nBash\n\n# For development with auto-restarting\nnodemon index.js\n\n# For standard execution\nnode index.js\n\nThe server will start on http://localhost:3000.\n\n🔀 API Endpoints\n\nAll endpoints are prefixed with /api.\n\nUser Routes (/users)\n\nEndpoint\tMethod\tAccess\tDescription\n/users/register\tPOST\tPublic\tRegisters a new user.\n/users/login\tPOST\tPublic\tLogs in a user and returns a JWT token.\n\nBook \u0026 Review Routes (/books)\n\nEndpoint\tMethod\tAccess\tDescription\n/books\tGET\tUser\tFetches a list of all books in the library.\n/books\tPOST\tAdmin\tAdds a new book to the database.\n/books/:bookId\tGET\tUser\tFetches details for a single book.\n/books/:bookId\tDELETE\tAdmin\tDeletes a book from the database.\n/books/:bookId/reviews\tGET\tUser\tFetches all reviews for a specific book.\n/books/:bookId/review\tPOST\tUser\tAdds a new review or updates an existing one for a specific book.\n\n\nLending Routes (/lendings)\n\nEndpoint\tMethod\tAccess\tDescription\n/lendings\tGET\tUser\tFetches all books currently borrowed by the logged-in user.\n/lendings/borrow\tPOST\tUser\tBorrows an available book.\n/lendings/:lendingId\tGET\tUser\tFetches details of a specific lending record.\n/lendings/extend/:lendingId\tPUT\tUser\tRequests a 7-day extension for a borrowed book.\n/lendings/return-request/:lendingId\tPUT\tUser\tSubmits a request to return a borrowed book.\n/lendings/admin/pending-returns\tGET\tAdmin\tFetches all return requests that are pending approval.\n/lendings/admin/process-return/:lendingId\tPUT\tAdmin\tApproves or rejects a pending return request.\n\nBecoming an Admin\n\nTo access the admin functionality:\n\n    Register a user through the application.\n\n    Manually update that user's record in the database to grant admin privileges. Connect to your MySQL database and run:\n    SQL\n\n    UPDATE Users SET isAdmin = true WHERE email = 'your-admin-email@example.com';\n\n    Log out and log back in as that user. You will be automatically redirected to the admin panel.\n\n\n\n\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushkarsabe%2Fbooklendingandreview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushkarsabe%2Fbooklendingandreview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushkarsabe%2Fbooklendingandreview/lists"}