Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ecommerce shop built with Next.js and Sanity.io

NotificationsYou must be signed in to change notification settings

Joshhortt/ecommerce-shop

Repository files navigation

23 October 2022

ByJosh Hortt

version: 23/10/2022

Description

This application is about an E-commerce Hardware store for small businesses
It was built for a local business client
It uses the portuguese language
It is Developed in React.js
This E-commerce application includes modern design and animations,the
ability to add and edit products on the go using a Sanity CMS, all advanced cart,
and checkout functionalities, and most importantly, the complete integration
with Stripe so that the user can cover real payments.It can be used for any kind of E-commerce store (Fashion, Jewellry, etc..).

E-commerce shop 🎧 🔊 |Live Link

Technologies Used

  • JavaScript
  • React.js
  • Next.js
  • CSS-3
  • Sanity CMS

Learning Context:

NoContext learn by doing this project...
1Dynamic Routing
2File Base Routing
3Folder Structure
4Layout Architecture
5Global Vanilla CSS
6Stripe for Payment Gateway
7Data fetching fromBackEnd
8ConnectSanity BackEnd withNext-Js
9Context API for globally data sharing...
10Project data flow functional Architecture...
11react-hot-toast for displaying notification
12canvas-confetti firework animation for success sms
13getStripe function call, inSingleTon Pattern style
14Image change at hover state by the help ofonMouseEnter attribute
15getStaticPaths() ==>SSG ( staticallypre-render all the paths )
16getStaticProps() ==>SSG (pre-render fetching data atbuild time )
17getServerSideProps() ==>SSR ( fetching data ateach user request )

npm --legacy-peer-deps

run this short command for installing updated packages...
that listed inside dependencies { object } based onpackage.json file.

NPM | Dependencies...

NoPackage InstallsUse for...
1npm i@babel/coreslider
2npm i@sanity/climanaging Sanity installations, schemas & DB
3npm i@sanity/clientClient for read, create & update data from Sanity.io
4npm i@sanity/image-urlTools to generate image urls from Sanity content
5npm i@stripe/stripe-jsStripe.js loading utility
6npm istripepayment gateway
7npm ireact-iconsicons at UI
8npm ireact-hot-toastshort notification
9npm icanvas-confettiperformant confetti animation in the browser
10npm inext-sanity-imageUtility for using responsive image host in Sanity.io

File Structure...

🟨    ecommerce-shop    |    ├── components    |   ├── Cart.jsx    |   ├── Footer.jsx    |   ├── FooterBanner.jsx    |   ├── HeroBanner.jsx    |   ├── index.js    |   ├── Layout.jsx    |   ├── Navbar.jsx    |   └── Product.jsx    |    ├── context    |   └── StateContext.js     |🌐| Global Data Sharing |🌐|    |    ├── lib    |   ├── client.js           |🟠| Sanity Connection Configuration  |🟠|    |   ├── getStripe.js        |🟠| getStrip key- SingleTon Pattern  |🟠|    |   └── utils.js            |🟠| Success animation after purchase |🟠|    |    ├── pages    |   ├── api                 |🟨| BackEnd |🟨|    |   |   └── stripe.js       |🟨| BackEnd |🟨|    |   |    |   ├──product    |   |  └── [slug].js    |   |    |   ├── _app.js    |   ├── index.js    |   └── success.jsx    |    ├── sanity_ecommerce        |🔶| Headless CMS |🔶|    |   └── schemas             |🔶| Headless CMS |🔶|    |       ├── banner.js       |🔶| Headless CMS |🔶|    |       ├── product.js      |🔶| Headless CMS |🔶|    |       └── schema.js       |🔶| Headless CMS |🔶|    |    └── styles        └── globals.css🟨

User Specifications

  • User searches for products which the user wants to purchase.
  • by clicking on the image the user is able to see the choosen product details.
  • User adds (adicionar) one or more products to the shopping cart.
  • User checks the shopping cart (carrinho de compras) to confirm if all products are showing up.
  • User can add (+) or remove (-) the quantity of choosen products.
  • User can see and confirm the total price of purchase inside the shopping cart.
  • User can pay with Stripe by clicking the Pay with stripe (Finalizar compra).

Setup/Installation Requirements

Clone repository in a shell using the command:
git clone https://github.com/Joshhortt/ecommerce-shop

Known Bugs

Due to time constraints the site may not scale perfectly on every device.

Support and contact details

If you have any questions or find any issues with this web-application, get in touch.
My email is:joshhortt@yahoo.com

License

MIT License Copyright (c) 2022 Josh Hortt

Project Demo

About

Ecommerce shop built with Next.js and Sanity.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp