Giter Site home page Giter Site logo

kaystore's Introduction

Clothing E-Commerce Website

Table of Contents

Description

A clothing e-commerce website that allows users to create an account or login with a Google account, add products to their cart and checkout using Stripe API. Client-side created using React, SASS. Server-side created using Firebase for authentication and databse storage.

Technologies

HTML5 CSS3 SASS JavaScript React React Router Firebase Redux Stripe API Netlify

Packages

NameDescription
@reduxjs/toolkitUsed for state management to manage the state of the user, products in the cart and the categories and products.
@stripe/react-stripe-jsReact Stripe.js is a thin wrapper around Stripe Elements. It allows you to add Elements to any React app. Used to add Card Element for payment form and also the hook to safely pass payment information collected by the Card Element to the Stripe API.
@stripe/stripe-jsUsed to return a promise that resolves with a newly created Stripe Object. Allows connection of Stripe API.
dotenvUsed to load Stripe API keys from .env file.
firebaseUsed for user authentication via email and password and also Google sign in. Firestore database used to store product information and user information.
reactJavaScript library for building user interfaces
react-domPackage that provides DOM-specific methods for React
react-reduxUsed for state management to manage the state of the user, products in the cart and the categories and products. Specifically used for creating selectors of returning cart values and returning products to display.
react-router-domEnables client side routing navigation.
redux-loggerRedux middleware used in development to debug and track state using redux.
redux-persistUsed with redux to persist and rehydrate a redux store. Will persist cart products, user state and what products have been fetched.
reselectUsed with redux to create memoized selectors.
stripeProvides access to Stripe API to server-side code. Used specicially for netlify functions to connect to Stripe API using API key and also creating the payment object that is sent to Stripe.

Install Instructions

To run locally on machine (assuming up to date Node Package Manager), first install dependencies:

npm install npm install netlify-cli -g

To run locally in browser:

netlify dev

Stripe API

You will require your own instance of Stripe API for the code to function properly. Follow instructions below to run project locally:

  • Create account at Stripe
  • Create .env file and create two variables named:
    • REACT_APP_STRIPE_PUBLISHABLE_KEY
    • STRIPE_SECRET_KEY
  • Copy Publishable key from Stripe website and insert into REACT_APP_STRIPE_PUBLISHABLE_KEY
  • Copy Secret key from Stripe website and insert into STRIPE_SECRET_KEY
  • You should now be good to go if not feel free to contact me and I can try to help!

Roadmap

Features

  • Confirmation page after checking out
  • Profile page allowing user to edit profile details
  • Add ability to pay via different options
  • Add a clear cart button

Optimisations

  • Have title of website point to current page
  • Redirect after sign up/login to account
  • Allow users to delete their account from database
  • On signing out, clear cart items
  • Use toast alerts for confirmation and errors
  • Empty cart after checking out

UI

  • Mobile Stylings
  • Colour Themes

kaystore's People

Contributors

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