{"id":20477409,"url":"https://github.com/preston176/shopmart-e-commerce","last_synced_at":"2026-04-07T20:31:20.227Z","repository":{"id":183513513,"uuid":"670246644","full_name":"preston176/ShopMART-E-commerce","owner":"preston176","description":"A Fullstack E-commerce Website","archived":false,"fork":false,"pushed_at":"2023-08-02T00:59:21.000Z","size":2878,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T22:08:28.805Z","etag":null,"topics":["contextapi","firebase","react","react-router"],"latest_commit_sha":null,"homepage":"https://markethub-f6f5e.web.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/preston176.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-07-24T16:00:36.000Z","updated_at":"2023-07-24T22:56:42.000Z","dependencies_parsed_at":"2024-11-15T15:29:26.390Z","dependency_job_id":"cdad87e6-2682-4ea8-86c0-6d0a73fb6d4d","html_url":"https://github.com/preston176/ShopMART-E-commerce","commit_stats":null,"previous_names":["preston176/shopmart-e-commerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/preston176/ShopMART-E-commerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preston176%2FShopMART-E-commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preston176%2FShopMART-E-commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preston176%2FShopMART-E-commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preston176%2FShopMART-E-commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preston176","download_url":"https://codeload.github.com/preston176/ShopMART-E-commerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preston176%2FShopMART-E-commerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["contextapi","firebase","react","react-router"],"created_at":"2024-11-15T15:28:43.011Z","updated_at":"2026-04-07T20:31:20.206Z","avatar_url":"https://github.com/preston176.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# E-MarketHub\n\nA Fullstack E-commerce website built using REACT js\n\n## Demo\n[Live Preview](https://markethub-f6f5e.web.app/)\n\n![Alt text](smartmockups_lki9vgk4.jpg)\n![Alt text](smartmockups_lki9szlg.jpg)\n\n\n## Installation\n\nrun `git clone https://github.com/preston176/ShopMART-E-commerce`\n\n```bash\n  cd \u003cfolder-name\u003e\n  npm install\n\n  then navigate to localhost:\u003cport\u003e displayed on cli (default is 5173)\n```\n## Features\n\n- User Authentication\n- Realtime Firebase Database\n- Accepts payments through stripe \n- View your order history\n- Responsive design\n- Reusable components\n- React Hooks (useStates, useEffects, Axios, Routing)\n\n### How it works\n```\nAPI Configuration:\nThe code block sets up an Express server to handle API requests. It includes middleware for CORS and JSON parsing. Two API routes are defined: a GET request for the root route and a POST request for \"/payments/create\". The latter handles Stripe payment intents and returns the client secret needed for payment processing.\n\nPayment Component:\nThis React component is responsible for handling the payment process. It uses Stripe's \"react-stripe-js\" and \"Elements\" libraries for card payment integration. The component manages states for processing, success, error, and disabled payment buttons. It generates a client secret from the backend server using Axios and sends the payment confirmation to Stripe. After successful payment, the order details are saved to Firebase Firestore.\n```\n```\n1. Payment API:\n\nEndpoint: /payments/create\nMethod: POST\nDescription: This API endpoint allows the client-side application to create a payment intent for the Stripe payment gateway.\nRequest Parameters:\ntotal: The total amount of the payment in USD (query parameter)\nResponse:\nStatus Code: 201\nResponse Body: A JSON object containing the clientSecret, which is required for client-side payment confirmation with Stripe.\n2. CORS and JSON Middlewares:\n\nDescription: The Cloud Function uses cors middleware to handle Cross-Origin Resource Sharing (CORS) to allow requests from the client-side application. It also uses express.json() middleware to parse JSON request bodies.\n3. Root Endpoint:\n\nEndpoint: /\nMethod: GET\nDescription: A simple root endpoint that responds with \"hello world\" to indicate that the API is functioning.\n4. Stripe Integration:\n\nDescription: The Cloud Function integrates with the Stripe payment gateway to process payments. It uses the stripe library and the Stripe secret key (sk_test_51NUHNtEFBkCVrySQOc98N7TLtO0xwvmoaPSH81tp4f2uuPokh4mhZm094M9MOYNUBaj1Z68MmU9nPt6Ks9mQxzd400IariYDsd), which should be replaced with your actual Stripe secret key.\n5. Deployment:\n\nDescription: The Cloud Function is deployed to Firebase Cloud Functions using Firebase CLI (firebase-functions) to make it accessible through a public URL.\n```\n## Contributing\n\nI welcome contributions to make this project even better! Whether you are fixing a bug, improving the documentation, or adding new features, your efforts will be highly appreciated.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreston176%2Fshopmart-e-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreston176%2Fshopmart-e-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreston176%2Fshopmart-e-commerce/lists"}