Coder Social home page Coder Social logo

coolshop's Introduction

Coolshop

An ECommerce website powered by CommerceJS and NextJS

Run Locally

1. Fork and Clone repo

$ git clone [email protected]:basir/coolshop-final.git
$ cd coolshop-final

2. Get CommerceJS keys

Create account on CommerceJS website and get your api keys.

3. Create .env file

COMMERCE_PUBLIC_KEY_LIVE=pk_xxx
COMMERCE_SECRET_KEY_LIVE=sk_xxx

4. Install NPM Packages

$ npm install

5. Run Application

$ npm run dev

6. Open ecommerce website

Open http://localhost:3000

Use Ecommerce Website

1. Create product

Create a product on CommerceJS dashboard.

  • Set SHIPPING OPTIONS to enabled
  • Set Domestic (United States) to enabled

2. Place an order

3. Check order

Deploy on Vercel

1. Create Vercel account

2. Import github repo to vercel

  • Open https://vercel.com/dashboard
  • Click Import Project
  • Click Import Git Repository
  • Enter forked repo for coolshop on your github
  • give permission in github to vercel

3. Enter env variable for CommerceJS

  • Enter name:COMMERCE_PUBLIC_KEY_LIVE
  • Enter value: your public key on Commercejs

4. Deploy

  • click deploy button
  • wait to complete deployment
  • click Visit Site at the end

Lessons

  1. Introduction
    1. What we will build
    2. What we will learn
    3. What are requirements
    4. What is CommerceJS
    5. What is NextJS
    6. Conclusion
  2. Create NextJS App and Deploy on Vercel
    1. run npx create-next-app
    2. answer questions
    3. create github repo
    4. push to github
    5. create vercel account
    6. connect to vercel
    7. deploy on vercel
  3. Create Products On CommerceJS
    1. Create CommerceJS account
    2. Create a merchant
    3. Create a product
    4. Enter image, name, price, shipping, ...
    5. Create 2 more products
  4. List Products
    1. Create utils/commerce.js
    2. Edit pages/index.js
    3. commerce.products.list()
    4. Show products in divs
  5. Create React Context
    1. Create Store.js
    2. Create _app.js
    3. set publicKey in page props
  6. Design MaterialUI Layout
    1. Install MaterialUI packages
    2. Create _document.js
    3. Create Layout.js
  7. Style Product List Screen
    1. Use Layout
    2. Show alert on no product found
    3. Create Grid, Slide, ...
  8. Create Product Details Screen
    1. create products/[id].js
    2. create 2 columns
  9. Implement Add To Cart action
    1. check cart line items
    2. add or update item in the cart
    3. redirect to /cart
    4. Show Cart Menu on Header
    5. Create CART_RETRIEVE actions
    6. show cart items in header
  10. Create Cart Screen
    1. add cart items columns
    2. add cart summary columns
    3. update cart item
    4. remove cart item
    5. proceed to checkout
  11. Create Checkout Screen
    1. Create checkout form and order summary columns
    2. create steppers to make a wizard
    3. add customer details inputs
    4. add Shipping details inputs
    5. add Payment information inputs
  12. Implement Checkout Actions
    1. Create order
    2. Show error on creating order
    3. Set order in Context
    4. redirect user to confirmation screen on success
  13. Create order confirmation screen
    1. Show order summary
    2. Show order details

coolshop's People

Contributors

goldentroll 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.