/rock-shop-frontend

An e-commerce web application for purchasing rocks

Primary LanguageJavaScriptMIT LicenseMIT

Rock Shop

Contents

 

Overview

Description

Rock Shop is an e-commerce web application for purchasing rocks. It utilizes React with inline CSS for a dynamic and interactive user experience. Rock Shop manages user authentication, cart functionality and purchases using JWT, localStorage and a Ruby on Rails backend.

Features

  • View, sort and filter rocks by category, price, rating and rarity
  • Create an account with a unique username and password along with log-in/log-out functionality
  • Add and remove items to a cart where they will be saved and stored in backend
  • Upon logging in, the user's most recent cart (along with its items) will be loaded and rendered
  • View previous purchases (with items, price, and total)
  • Edit, update, and delete user account information

Challenges

  • Figuring out how the classes in the back-end will interact with one another to form a fully functioning e-commerce application
    • Individual cart items became a "joiner-class" (Purchase), joining the Rock class and the Order class
    • Every time an item is added to a cart, a Purchase instance is created with the specific Rock and the current Order (cart)
  • Rendering the current cart associated to user when user logs in
    • Using JWT and ActiveModelSerializers, token, user information, and cart information is sent to the front-end to render the correct user along with their current cart

Technologies and Frameworks

Front-End

Back-End

 

Installation

Prerequisites

Rock Shop is built on React, Ruby, Ruby on Rails and PostgreSQL. Make sure you have the latest versions of all four components installed before cloning this repo. You can find their official installation guides below:

Instructions

  • Clone the most recent branch in this repository

Make sure you are in the project path before running the commands

  • Run npm install in your bash-enabled terminal to make sure all dependancies are installed
  • Run npm start to start and launch local server on your browser

Back-End

Rock Shop Back-End

 

Credits

License

GitHub license

Copyright 2019 © Jacky Feng