Giter Site home page Giter Site logo

next-ecommerce-sanity-stripe's Introduction

23 Apr 2022

E-commerce App 🎧 πŸ”Š | Live Link

Next-Js + Sanity + CSS

Learning Context:

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

yarn --legacy-peer-deps 

run this short command for install packages...
that listed inside dependencies { object } based on package.json file.

Yarn | Dependencies...

No Package Installs Use for...
1 yarn add @babel/core slider
2 yarn add @sanity/cli managing Sanity installations, schemas & DB
3 yarn add @sanity/client Client for read, create & update data from Sanity.io
4 yarn add @sanity/image-url Tools to generate image urls from Sanity content
5 yarn add @stripe/stripe-js Stripe.js loading utility
6 yarn add stripe payment gateway
7 yarn add react-icons icons at UI
8 yarn add react-hot-toast short notification
9 yarn add canvas-confetti performant confetti animation in the browser
10 yarn add next-sanity-image Utility for using responsive image host in Sanity.io
🟨
    src
    β”œβ”€β”€ 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
🟨

Sanity JSM

Success Animation

Project Demo

Learning by inspired from.

next-ecommerce-sanity-stripe's People

Contributors

taiseen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.