{"id":25299158,"url":"https://github.com/sandykr29/edg_ecommerce","last_synced_at":"2025-10-07T22:46:18.555Z","repository":{"id":277160500,"uuid":"930307994","full_name":"Sandykr29/edg_ecommerce","owner":"Sandykr29","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-22T19:05:29.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T22:44:49.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://edg-ecommerce.vercel.app","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/Sandykr29.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":"2025-02-10T12:29:33.000Z","updated_at":"2025-02-22T19:05:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc1e7539-3414-4b8c-87c4-b6daf6888e0a","html_url":"https://github.com/Sandykr29/edg_ecommerce","commit_stats":null,"previous_names":["sandykr29/edg_ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sandykr29/edg_ecommerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandykr29%2Fedg_ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandykr29%2Fedg_ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandykr29%2Fedg_ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandykr29%2Fedg_ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sandykr29","download_url":"https://codeload.github.com/Sandykr29/edg_ecommerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandykr29%2Fedg_ecommerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278861032,"owners_count":26058632,"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-07T02:00:06.786Z","response_time":59,"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":[],"created_at":"2025-02-13T04:53:31.753Z","updated_at":"2025-10-07T22:46:18.514Z","avatar_url":"https://github.com/Sandykr29.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shopping Cart Application\n\n## Overview\nThis is a full-stack MERN eCommerce application that allows users to add, remove, and manage products in their cart. It also includes authentication handling and checkout functionality.\n\n## Live Demo\n[Click here to visit the live site](https://edg-ecommerce.vercel.app/)\n\n## Features\n- Add and remove items from the cart.\n- Manage item quantities.\n- Display total cart amount.\n- Prevent users from adding more items than available in stock.\n- Authentication support using `AuthContext`.\n- Checkout functionality using `react-router-dom`.\n\n## Tech Stack\n- **Frontend:** React, Context API, React Router, CSS\n- **Backend:** Node.js, Express.js, MongoDB\n- **State Management:** useState, useContext\n- **Styling:** CSS\n\n## Installation\n### Prerequisites\n- Node.js and npm installed\n\n### Steps to Run the Project\n1. **Clone the repository**\n   ```sh\n   git clone https://github.com/Sandykr29/edg_ecommerce\n   cd edg_ecommerce\n   ```\n2. **Install dependencies**\n   ```sh\n   npm install\n   ```\n3. **Start the application**\n   ```sh\n   npm run dev\n   ```\n4. Open `http://localhost:5173/` (if using Vite) in your browser.\n\n## Project Structure\n```\n📦 shopping-cart\n ┣ 📂 src\n ┃ ┣ 📂 components\n ┃ ┃ ┣ 📜 Cart.js\n ┃ ┃ ┣ 📜 Product.js\n ┃ ┃ ┗ 📜 Checkout.js\n ┃ ┣ 📂 context\n ┃ ┃ ┣ 📜 AuthContext.js\n ┃ ┃ ┗ 📜 CartContext.js\n ┃ ┣ 📂 pages\n ┃ ┃ ┣ 📜 Home.js\n ┃ ┃ ┣ 📜 CartPage.js\n ┃ ┃ ┗ 📜 CheckoutPage.js\n ┃ ┣ 📜 App.js\n ┃ ┣ 📜 main.jsx\n ┗ 📜 package.json\n```\n\n## Usage\n1. **Adding Items to Cart:** Click on the \"Add to Cart\" button.\n2. **Managing Cart:** Increase or decrease item quantity in the cart.\n3. **Checkout:** Click the \"Checkout\" button to proceed.\n4. **Stock Limit:** If the user tries to add more than available stock, a message is shown.\n\n## Key Components\n- **CartContext.js**: Manages cart state and actions.\n- **AuthContext.js**: Handles authentication.\n- **Cart.js**: Displays the cart and allows users to update quantities.\n- **Checkout.js**: Handles the checkout process.\n\n## Routing\nEnsure `react-router-dom` is installed:\n```sh\nnpm install react-router-dom\n```\nRoutes are defined in `App.js`:\n```jsx\nimport { BrowserRouter as Router, Routes, Route } from \"react-router-dom\";\nimport CartPage from \"./pages/CartPage\";\nimport CheckoutPage from \"./pages/CheckoutPage\";\n\nfunction App() {\n  return (\n    \u003cRouter\u003e\n      \u003cRoutes\u003e\n        \u003cRoute path=\"/cart\" element={\u003cCartPage /\u003e} /\u003e\n        \u003cRoute path=\"/checkout\" element={\u003cCheckoutPage /\u003e} /\u003e\n      \u003c/Routes\u003e\n    \u003c/Router\u003e\n  );\n}\n\nexport default App;\n```\n\n## Improvements \u0026 Future Enhancements\n- Backend integration for persistent cart data.\n- User authentication with JWT.\n- Better UI with a modern design framework.\n\n## Contributing\nFeel free to fork the repository and submit pull requests!\n\n## License\nThis project is open-source under the MIT License.\n\n---\n\nHappy Coding! 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandykr29%2Fedg_ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandykr29%2Fedg_ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandykr29%2Fedg_ecommerce/lists"}