Skip to content

A refactor of an existing e-commerce app created by a developer who suddenly moved to Bali

Notifications You must be signed in to change notification settings

codemargaret/bali_refactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Site

A refactor of an existing e-commerce site, 12.08.2017

By Margaret Berry

Description and Project Goals

The lead developer of this e-commerce site quit abruptly and moved to Bali. The goal of this project was to add AJAX to the site and refactor it.

Refactoring

  • Add and delete items from cart using AJAX.
  • Show and hide product details with AJAX.
  • Add a validation for quantity in order_item.rb
  • Add product validations.
  • Add image property to products.
  • Add flash messages for signing in and out.
  • Add stripe so users can pay with a credit card.
  • Add ability to create, update, and destroy products for admins.
  • Add flash messages for creating, updating, and destroying products.
  • Allow products to be created with non-whole dollar amounts.

Other Changes Made

  • Remove turbolinks.
  • Add testing, stripe, bootstrap, and admin gems.
  • Add unit testing.
  • Add interface for admins to manage data.

Setup/Installation Requirements

Uses bcrypt and materialize. Run the following commands in Terminal:

  1. $ git clone this repository
  2. $ cd bali_refactor
  3. $ bundle
  4. $ rails:db:create
  5. $ rails:db:migrate
  6. $ rails:db:test:prepare
  7. $ rails:db:seed
  8. $ rails s
  9. Navigate to localhost:3000

To use Stripe for credit card payment:

  1. Visit Stripe
  2. Login or create an account to get your API keys.
  3. Paste the following text in the .env file and add your own API keys: PUBLISHABLE_KEY=your key here SECRET_KEY=your key here

Known Bugs

  • The product update and delete functionality has not been tested.

Support and contact details

If you have questions, comments, or concerns, please contact Margaret. Feel free to make a contribution to the code.

Technologies Used

  • Ruby-on-Rails
  • ActiveRecord
  • AJAX

License

This software is licensed under the MIT license.

Copyright (c) 2017 Margaret Berry

About

A refactor of an existing e-commerce app created by a developer who suddenly moved to Bali

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published