{"id":18248804,"url":"https://github.com/saif-gitreps/bookpanda","last_synced_at":"2025-07-25T02:10:18.215Z","repository":{"id":209408146,"uuid":"723969685","full_name":"saif-gitreps/BookPanda","owner":"saif-gitreps","description":"An e-commerce website where customers can buy or borrow books and sellers can list and sell books. Facilitating user authentication and search functionality to help users find the books they need. The project is built using Node.js and Express with Prisma as the ORM for database operations and MySQL as the database.","archived":false,"fork":false,"pushed_at":"2024-02-14T12:28:57.000Z","size":3793,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-22T10:23:01.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"EJS","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/saif-gitreps.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":"2023-11-27T06:06:02.000Z","updated_at":"2024-03-28T11:32:33.000Z","dependencies_parsed_at":"2023-12-14T12:09:57.305Z","dependency_job_id":"4628fb25-1ab0-4250-a874-d58b48ae90ae","html_url":"https://github.com/saif-gitreps/BookPanda","commit_stats":null,"previous_names":["saif-gitreps/bookpanda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saif-gitreps%2FBookPanda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saif-gitreps%2FBookPanda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saif-gitreps%2FBookPanda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saif-gitreps%2FBookPanda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saif-gitreps","download_url":"https://codeload.github.com/saif-gitreps/BookPanda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238868554,"owners_count":19544384,"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":[],"created_at":"2024-11-05T09:38:20.445Z","updated_at":"2025-02-14T15:43:22.898Z","avatar_url":"https://github.com/saif-gitreps.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bookpanda E-Commerce Website\n\nBookpanda is an e-commerce website where customers can buy or borrow books and sellers can list and sell books. The platform also facilitates user authentication and provides a search functionality to help users find the books they need. The project is built using Node.js and Express with Prisma as the ORM for database operations and MySQL as the database.\n\n## Installation\n\nTo install and run Bookpanda on your local machine, follow these steps:\n\n### Prerequisites\n\nBefore you begin, ensure you have the following software installed on your system:\n\n- Node.js and npm (Node Package Manager)\n- MySQL database\n- Git \n\n### Steps\n\n1. **Clone the Repository**: \n\nIf you have Git installed, you can clone the repository using the following command:\n\n```\ngit clone https://github.com/yourusername/bookpanda.git\n```\n\nAlternatively, you can download the source code as a ZIP file from the GitHub repository.\n\n2. **Navigate to the Project Directory**:\n\nUse the terminal or command prompt to navigate to the directory where you have cloned or downloaded the Bookpanda repository.\n\n```\ncd bookpanda\n```\n\n3. **Install Dependencies**:\n\nRun the following command to install the required dependencies:\n```\nnpm install\n```\n\nThis command will install all the dependencies listed in the `package.json` file.\n\n4. **Database Configuration**:\n\nYou need to configure your MySQL database settings before running the application. Create a `.env` file in the root directory of the project and add the following environment variables or your own cloud SQL server link:\n\n```\nDATABASE_URL=\"mysql://username:password@localhost:3306/bookpanda\"\n```\n\nReplace `username` and `password` with your MySQL username and password respectively. `bookpanda` is the name of the database.\n\n5. **Create Tables in MySQL**:\n\nRun the following SQL queries in your MySQL database to create the necessary tables:\n\n```sql\nCREATE TABLE seller (\n    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(50),\n    email VARCHAR(200) UNIQUE,\n    address VARCHAR(200),\n    password VARCHAR(200),\n    joindate DATETIME DEFAULT CURRENT_TIMESTAMP,\n    books_sold INT,\n    books_lent INT\n);\n\nCREATE TABLE customer (\n    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(50),\n    email VARCHAR(200) UNIQUE,\n    password VARCHAR(200),\n    address VARCHAR(200),\n    books_purchased INT,\n    books_borrowed INT\n);\n\nCREATE TABLE book_shelf (\n    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n    title VARCHAR(50),\n    author VARCHAR(50),\n    summary VARCHAR(200), \n    seller_id INT,\n    category VARCHAR(200),\n    pages INT,\n    price INT\n);\n```\n\nRun Prisma in your terminal (execute these lines step by step and hit enter):\n\n```\nnpm install prisma\n```\n\n```\nnpx prisma init --datasource-provider mysql2\n```\n\n```\nnpx prisma db pull   \n```\n\n```\nnpm install @prisma/client\n```\n\nThis command will create the required tables in your MySQL database based on the Prisma schema.\n\nStart the Server:\nOnce the dependencies are installed, the database is configured, and the tables are created, you can start the server by running the following command:\n```\nnpm start\n```\nBookpanda will be accessible at http://localhost:3000 in your browser.\n\nAccess Bookpanda:\nOpen your web browser and navigate to http://localhost:3000/login to access the Bookpanda e-commerce website.\n\nIf you encounter any issues during the installation process or while using Bookpanda, please refer to the project's documentation or reach out to the project maintainers for assistance.\n\nThank you for using Bookpanda!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaif-gitreps%2Fbookpanda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaif-gitreps%2Fbookpanda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaif-gitreps%2Fbookpanda/lists"}