Code Monkey home page Code Monkey logo

bali_refactor's Introduction

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

bali_refactor's People

Contributors

codemargaret avatar franzknupfer avatar

Watchers

 avatar  avatar

bali_refactor's Issues

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.