{"id":23439684,"url":"https://github.com/sanidhyy/ecommerce-app","last_synced_at":"2025-04-13T08:09:00.840Z","repository":{"id":112910328,"uuid":"504565615","full_name":"sanidhyy/ecommerce-app","owner":"sanidhyy","description":"E-commerce app using next.js, sanity and stripe payments.","archived":false,"fork":false,"pushed_at":"2025-04-07T05:30:20.000Z","size":2978,"stargazers_count":11,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T08:08:28.127Z","etag":null,"topics":["css","ecommerce","js","nextjs","react","reactjs","sanity"],"latest_commit_sha":null,"homepage":"https://ecommerce-app-next.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanidhyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["sanidhyy"],"patreon":"sanidhy","custom":"https://www.buymeacoffee.com/sanidhy"}},"created_at":"2022-06-17T14:30:15.000Z","updated_at":"2025-03-29T07:33:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9dc6208-4dd4-4fb1-ad2a-6ee61da2d024","html_url":"https://github.com/sanidhyy/ecommerce-app","commit_stats":null,"previous_names":["sanidhyy/ecommerce-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fecommerce-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fecommerce-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fecommerce-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fecommerce-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanidhyy","download_url":"https://codeload.github.com/sanidhyy/ecommerce-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681489,"owners_count":21144700,"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":["css","ecommerce","js","nextjs","react","reactjs","sanity"],"created_at":"2024-12-23T15:33:15.733Z","updated_at":"2025-04-13T08:09:00.806Z","avatar_url":"https://github.com/sanidhyy.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sanidhyy","https://patreon.com/sanidhy","https://www.buymeacoffee.com/sanidhy"],"categories":[],"sub_categories":[],"readme":"# E-COMMERCE WEB APPLICATION USING NEXT JS\n\n![E-commerce Web App using Next JS](https://user-images.githubusercontent.com/71302066/174431664-59ee8d85-ed57-4e74-a002-f3fe2d166966.png)\n\n[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://github.com/Technical-Shubham-tech)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/Technical-Shubham-tech/ecommerce-app/commits/main)\n[![GitHub license](https://img.shields.io/github/license/Technical-Shubham-tech/ecommerce-app)](https://github.com/Technical-Shubham-tech/ecommerce-app/blob/main/LICENSE.md)\n[![GitHub branches](https://badgen.net/github/branches/Technical-Shubham-tech/ecommerce-app/)](https://github.com/Technical-Shubham-tech/ecommerce-app/branches)\n[![Github commits](https://badgen.net/github/commits/Technical-Shubham-tech/ecommerce-app/main)](https://github.com/Technical-Shubham-tech/ecommerce-app/commits/)\n[![Website](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://ecommerce-app-next.vercel.app/)\n[![GitHub issues](https://img.shields.io/github/issues/Technical-Shubham-tech/ecommerce-app)](https://github.com/Technical-Shubham-tech/ecommerce-app/issues)\n\n## 📌 How to setup this App?\n\n1. Make sure **Git** and **NodeJS** is installed\n2. **Yarn** is faster than Npm. So use [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/).\n3. To get started, create .env file in root folder.\n4. Contents of `.env` file\n\n```\nNEXT_PUBLIC_SANITY_PROJECT_ID=xxxxxxxx\nNEXT_PUBLIC_SANITY_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx\nNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx\nNEXT_PUBLIC_STRIPE_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n5. Clone this **repository** to your local computer.\n6. Open **terminal** in root directory. Run `npm install` or `yarn install`\n7. Now, `cd sanity-ecommerce-app`. Run `npm install` or `yarn install` again.\n8. Now all required packages are installed, let's setup sanity.\n9. Create an account in [sanity](https://www.sanity.io/)\n10. In terminal, type `sanity init` to initialize our sanity project.\n    ![sanity init output](https://user-images.githubusercontent.com/71302066/174443245-5508b29d-07e9-4078-b335-d014ab838831.png)\n\n11. Type `sanity start` to start sanity studio on localhost. URL will be shown in terminal.\n    ![sanity start output](https://user-images.githubusercontent.com/71302066/174443446-7f470faf-d256-4b37-807d-354a223bc715.png)\n12. After going to localhost, login in with your account. Now, your account is connected with this project.\n13. To get `NEXT_PUBLIC_SANITY_PROJECT_ID` and `NEXT_PUBLIC_SANITY_TOKEN`, go to [sanity](https://www.sanity.io).\n14. Copy your **project id** as shown below:\n    ![copy project id](https://user-images.githubusercontent.com/71302066/174444494-5388b489-ebc2-4f0f-ac16-9b0b539a0ece.png)\n\n15. Under **API Tab**, go to **tokens** section and create a token. You can name it whatever you want. Just Don't fotget\n    to copy your project token. You will not be able to copy later.\n    ![copy project token](https://user-images.githubusercontent.com/71302066/174444200-2c1b7b2c-32e2-4821-9078-d17f046839ce.png)\n\n16. Now, you add products and banner from http://localhost:3333 to your project through sanity.\n    ![add new products](https://user-images.githubusercontent.com/71302066/174444767-78dee70d-941c-4cc5-951d-c8adc09eedf6.png)\n\n**NOTE:** If you want to use same images as mine, you can find all images in **public/assets** folder. You can use your own images as well, but make sure they are in .webp format or you have to define your own images format in **pages/api/stripe.js**\n![change image format here](https://user-images.githubusercontent.com/71302066/174445034-2e279b6a-04eb-4003-841a-8aa9dd3566bf.png)\n\n17. After sanity is setup successfully, it's time to setup online payments with stripe.\n18. Create an account in [Stripe](https://stripe.com). Make sure **test mode** is enabled.\n19. On account dashboard, you can simply get your `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` and `NEXT_PUBLIC_STRIPE_SECRET_KEY`.\n    ![copy keys](https://user-images.githubusercontent.com/71302066/174445248-cce52da0-e172-433b-906f-88399750f93c.png)\n    **NOTE:** Don't share these keys publicaly.\n20. You can also create custom shipping rates, to create one, go to: **Products** \u003e Shipping rates \u003e Create shipping rate.\n\n![Create shipping rate](https://user-images.githubusercontent.com/71302066/174445465-bc16148a-8c07-4a3e-9599-3ac6336867d7.png)\n\n21. After creating shipping rate, you can copy **shipping rate id** and paste it in **pages/api/stripe.js**\n    ![copy shipping rate id](https://user-images.githubusercontent.com/71302066/174445681-f7a4b6a8-2dc5-43b3-9a21-096ec71a39e3.png)\n\n![paste shipping rate id](https://user-images.githubusercontent.com/71302066/174445828-1eeb8b09-d409-4f9a-b698-d199f1299cd1.png)\n\n22. Now everything has been setup. You can start this app using `npm start` or `yarn start`.\n\n## 📃 Built with\n\n[\u003cimg src=\"https://img.shields.io/badge/JavaScript-323330?style=for-the-badge\u0026logo=javascript\u0026logoColor=F7DF1E\" width=\"150\" height=\"40\" /\u003e](https://www.javascript.com/)\n\n[\u003cimg src=\"https://img.shields.io/badge/React-20232A?style=for-the-badge\u0026logo=react\u0026logoColor=61DAFB\" width=\"150\" /\u003e](https://reactjs.org/)\n\n[\u003cimg src=\"https://img.shields.io/badge/next.js-000000?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=white\" width=\"150\" /\u003e](https://nextjs.org/)\n\n[\u003cimg src=\"https://img.shields.io/badge/Stripe-626CD9?style=for-the-badge\u0026logo=Stripe\u0026logoColor=white\" width=\"150\" /\u003e](https://stripe.com/)\n\n## 🔧 Stats\n\n![Stats for this App](https://user-images.githubusercontent.com/71302066/174447557-438e3ae9-241e-451c-91fa-a1e6d795d036.svg)\n\n## 🙌🏼 Contribute\n\nYou are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.\n\n## Buy Me a Coffee 🍺\n\n[\u003cimg src=\"https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black\" width=\"200\" /\u003e](https://www.buymeacoffee.com/sanidhy \"Buy me a Coffee\")\n\n## 🚀 Follow Me\n\n[![GitHub followers](https://img.shields.io/github/followers/Technical-Shubham-tech?style=social\u0026label=Follow\u0026maxAge=2592000)](https://github.com/Technical-Shubham-tech)\n[![Twitter](https://img.shields.io/twitter/url?style=social\u0026url=https%3A%2F%2Ftwitter.com%2FTechnicalShubam)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2FTechnical-Shubham-tech%2Fmedical-chat-app)\n[![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/channel/UCNAz_hUVBG2ZUN8TVm0bmYw)\n\n## Give A Star ⭐\n\nYou can also give this repository a star to show more people and they can use this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanidhyy%2Fecommerce-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanidhyy%2Fecommerce-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanidhyy%2Fecommerce-app/lists"}