{"id":20770499,"url":"https://github.com/bhardwaj-shubham/ecommerce-api","last_synced_at":"2026-04-06T21:31:08.260Z","repository":{"id":237904509,"uuid":"795464302","full_name":"bhardwaj-shubham/ecommerce-api","owner":"bhardwaj-shubham","description":"Ecommerce Backend API using ExpressJS, MYSQL.","archived":false,"fork":false,"pushed_at":"2024-05-06T04:28:51.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T06:23:12.274Z","etag":null,"topics":["api","backend-api","express","jwt","mysql","nodejs","sequelize","stripe-payments"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhardwaj-shubham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-03T10:40:34.000Z","updated_at":"2024-05-06T04:28:54.000Z","dependencies_parsed_at":"2024-05-06T05:41:39.309Z","dependency_job_id":null,"html_url":"https://github.com/bhardwaj-shubham/ecommerce-api","commit_stats":null,"previous_names":["bhardwaj-shubham/ecommerce-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhardwaj-shubham/ecommerce-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhardwaj-shubham%2Fecommerce-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhardwaj-shubham%2Fecommerce-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhardwaj-shubham%2Fecommerce-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhardwaj-shubham%2Fecommerce-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhardwaj-shubham","download_url":"https://codeload.github.com/bhardwaj-shubham/ecommerce-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhardwaj-shubham%2Fecommerce-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31491095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"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":["api","backend-api","express","jwt","mysql","nodejs","sequelize","stripe-payments"],"created_at":"2024-11-17T12:09:54.281Z","updated_at":"2026-04-06T21:31:08.220Z","avatar_url":"https://github.com/bhardwaj-shubham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ecommerce Backend API\n\nThis is a simple ecommerce backend API build with Node.js, Express, and MySQL.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n1. Clone the repository.\n    ```shell\n    git clone https://github.com/bhardwaj-shubham/ecommerce-api.git\n    ```\n\n2. Install the dependencies.\n    ```shell\n    npm install\n    ```\n\n3. Configure the project.\n    - Create a `.env` file in the root directory. Add the environment variables from the `.env.sample` file.\n\n4. Create a MySQL database.\n    - Create a MySQL database with the name given in `.env.sample`.\n\n5. Start the application.\n    ```shell\n    npm run dev\n    ```\n\n6. The API will be running on `http://localhost:4000`.\n\n\n## Usage\n\nThe API has the following routes:\n1. For products:\n    - GET `/api/v1/products/all-products`: Get all products.\n    - GET `/api/v1/products/:productId`: Get a product by ID.\n    - POST `/api/v1/products/add-product`: Create a new product.\n    - PUT `/api/v1/products/:productId`: Update a product by ID.\n    - POST `/api/v1/products/:productId/reviews`: Create a Review of product.\n    - POST `/api/v1/products/buy/`: Buy a product.\n    - DELETE `/api/v1/products/:productId`: Delete a product by ID.\n\n2. For users:\n    - POST `/api/v1/users/signup`: Create a new User.\n    - POST `/api/v1/users/login`: Login a user.\n    - POST `/api/v1/users/logout`: Logout a user.\n    - GET `/api/v1/users/current-user`: Get current a user.\n    - POST `/api/v1/users/refresh-token`: Refresh a user token.\n    - POST `/api/v1/users/change-password`: Change password of a user.\n    - POST `/api/v1/users/update-account`: Update account of a user.\n    - GET `/api/v1/users/purchase-history`: Get purchase history of a user.\n\n3. For sellers:\n    - POST `/api/v1/sellers/signup`: Create a new Seller.\n    - POST `/api/v1/sellers/login`: Login a seller.\n    - POST `/api/v1/sellers/logout`: Logout a seller.\n    - GET `/api/v1/sellers/current-seller`: Get current a seller.\n    - POST `/api/v1/sellers/refresh-token`: Refresh a seller token.\n    - POST `/api/v1/sellers/change-password`: Change password of a seller.\n    - PATCH `/api/v1/seller/update-account`: Update account of a seller.\n    - GET `/api/v1/sellers/products`: Get all products of a seller.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch.\n3. Make your changes.\n4. Commit your changes.\n5. Push to the branch.\n6. Submit a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhardwaj-shubham%2Fecommerce-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhardwaj-shubham%2Fecommerce-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhardwaj-shubham%2Fecommerce-api/lists"}