Skip to content

this-is-joeking/bulk-discount

 
 

Repository files navigation

Little Esty Shop/Bulk Discount

Collaborators

Description

"Little Esty Shop" is a group project where we built a fictitious e-commerce platform where merchants and admins can manage inventory and fulfill customer invoices. We built the application with Ruby on Rails, and focused our learning on advanced routing, rake tasks that read csv files loading them into our database, complex ActiveRecord queries, simple consumption of Nager.Date API, and basic CRUD funtionality while maintaining MVC standards. Our Database offers many different relationships (many-to-many or one-to-many) as shown by our schema outlined below.

Schema/Database

alt text

Heroku Deployment

Here is our deployed Heroku App!

Setup

This project requires Ruby 2.7.4.

  • Fork this repository
  • Clone your fork
  • From the command line, install gems and set up your DB:
    • bundle
    • rails db:{drop,create,migrate}
    • rake csv_load:all (this may take a couple minutes)
  • Run the test suite with bundle exec rspec.
  • Run your development server with rails s to see the app in action.

Opportunities to Refactor

  • The main opportunity to refactor we identified is our rake task which loads CSV data into the database. Currently it adds rows to the database line by line. We could refactor this to use the gems activerecord-copy and activerecord-import. This would add each table to the database in entirety instead of row by row reducing the time to load data significantly. Additionally, the file that parses the csv could be abstracted to multiple files.
  • Cleanup date formatting for upcoming holidays

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 82.9%
  • HTML 14.4%
  • CSS 1.7%
  • JavaScript 1.0%