{"id":24204707,"url":"https://github.com/geekyash10/ecommerce-backend","last_synced_at":"2026-04-10T07:13:37.128Z","repository":{"id":270540685,"uuid":"782458556","full_name":"Geekyash10/Ecommerce-backend","owner":"Geekyash10","description":"The E-Commerce API is a RESTful web service designed for managing an online shopping platform. It includes essential features such as user authentication, product management, order placement, and admin operations. This API is built with role-based access control, ensuring secure and efficient management of user and admin activities.","archived":false,"fork":false,"pushed_at":"2025-01-01T05:37:17.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T12:43:58.654Z","etag":null,"topics":["cookie","expressjs","jwt","mongodb","nodejs"],"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/Geekyash10.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-04-05T10:47:22.000Z","updated_at":"2025-01-28T16:15:58.000Z","dependencies_parsed_at":"2025-01-01T06:22:25.335Z","dependency_job_id":"c4e5ff0e-1080-4f39-833f-cdb639f0674e","html_url":"https://github.com/Geekyash10/Ecommerce-backend","commit_stats":null,"previous_names":["geekyash10/ecommerce-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Geekyash10/Ecommerce-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geekyash10%2FEcommerce-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geekyash10%2FEcommerce-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geekyash10%2FEcommerce-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geekyash10%2FEcommerce-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Geekyash10","download_url":"https://codeload.github.com/Geekyash10/Ecommerce-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geekyash10%2FEcommerce-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279361045,"owners_count":26155483,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cookie","expressjs","jwt","mongodb","nodejs"],"created_at":"2025-01-13T23:17:56.134Z","updated_at":"2025-10-17T14:16:17.800Z","avatar_url":"https://github.com/Geekyash10.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce API\n\nThe E-Commerce API is a RESTful web service designed for managing an online shopping platform. It includes essential features such as user authentication, product management, order placement, and admin operations. This API is built with role-based access control, ensuring secure and efficient management of user and admin activities.\n\n---\n\n## Features\n\n- User registration and login.\n- Forgot password and reset functionality.\n- Role-based access control for users and admins.\n- Product listing, creation, update, and deletion.\n- Order placement, tracking, and management.\n- Review system for products.\n- Centralized error handling and robust validation.\n\n---\n\n## API Reference\n\n### Base URL\nhttp://localhost:5000\n---\n\n### User Routes\n\n| Method | Endpoint                | Description                                  | Access  |\n|--------|-------------------------|----------------------------------------------|---------|\n| POST   | `/register`             | Register a new user.                        | Public  |\n| POST   | `/login`                | Log in a user.                              | Public  |\n| GET    | `/logout`               | Log out the current user.                   | Private |\n| POST   | `/password/forgot`      | Request a password reset email.             | Public  |\n| PUT    | `/password/reset/:token`| Reset the password using the token.         | Public  |\n| GET    | `/me`                   | Fetch current user details.                 | Private |\n| PUT    | `/password/update`      | Update the user’s password.                 | Private |\n| PUT    | `/me/update`            | Update user profile information.            | Private |\n| GET    | `/admin/users`          | Fetch all users (Admin only).               | Admin   |\n| GET    | `/admin/user/:id`       | Fetch a specific user (Admin only).         | Admin   |\n| PUT    | `/admin/user/:id`       | Update user role (Admin only).              | Admin   |\n| DELETE | `/admin/user/:id`       | Delete a user (Admin only).                 | Admin   |\n\n---\n\n### Product Routes\n\n| Method | Endpoint                     | Description                                  | Access  |\n|--------|------------------------------|----------------------------------------------|---------|\n| GET    | `/products`                  | Fetch all products.                         | Public  |\n| GET    | `/product/:id`               | Fetch details of a specific product.        | Public  |\n| POST   | `/admin/product/new`         | Create a new product (Admin only).          | Admin   |\n| PUT    | `/admin/product/:id`         | Update a product (Admin only).              | Admin   |\n| DELETE | `/admin/product/:id`         | Delete a product (Admin only).              | Admin   |\n| PUT    | `/review`                    | Add or update a review for a product.       | Private |\n| GET    | `/reviews`                   | Fetch all reviews for a product.            | Public  |\n| DELETE | `/reviews`                   | Delete a review for a product.              | Private |\n\n---\n\n### Order Routes\n\n| Method | Endpoint             | Description                                  | Access  |\n|--------|----------------------|----------------------------------------------|---------|\n| POST   | `/order/new`         | Place a new order.                          | Private |\n| GET    | `/order/:id`         | Fetch details of a specific order.          | Private |\n| GET    | `/orders/me`         | Fetch all orders of the logged-in user.     | Private |\n| GET    | `/admin/orders`      | Fetch all orders (Admin only).              | Admin   |\n| PUT    | `/admin/order/:id`   | Update the status of an order (Admin only). | Admin   |\n| DELETE | `/admin/order/:id`   | Delete an order (Admin only).               | Admin   |\n\n---\n\n## Installation\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/Geekyash10/Ecommerce-backend.git\ncd Ecommerce-backend\nnpm install\n\n\n```\n## env file\n```bash\nPORT=5000\nDB_URI=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster.mongodb.net/ecommerce\nJWT_SECRET=your_jwt_secret\nJWT_EXPIRE=5d\nCOOKIE_EXPIRE=5\n\n```\n## Run the Server\n\n```bash\nnode app.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekyash10%2Fecommerce-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekyash10%2Fecommerce-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekyash10%2Fecommerce-backend/lists"}