Git Product home page Git Product logo

the_pivot's Introduction

LitBids

Built with Ruby on Rails

Development Team

Erin Greenhalgh, Brian Sayler, Chris Soden

This project was created as a part of the curriculum for the Turing School of Software & Design.

Overview

This Rails application took a previous project, an single-tenant ecommerce web application, and pivoted it to a multi-tenancy application, implementing a bidding system instead of a typical cart-and-orders system. Users can bid on and win multiple items from different businesses. They can also create businesses to become business admins and monitor the item action for theri businesses. Platform admins have access to every business on the app and change business status between active and inactive.

Live Version

You can find a live version of this application on Heroku at: https://litbids.herokuapp.com/

Setup

To set up a local copy of this project, perform the following:

  1. Clone the repository: git clone https://github.com/seeker105/the_pivot
  2. cd into the project's directory
  3. Run bundle install
  4. Run rake db:create db:migrate db:seed to set up the postgres database and seed it with users, admins, businesses, items, and categories. - To navigate the site as a platform admin user username: jorge and password: password - To navigate the site as a business admin user username: jcasimir and password: password - To navigate the site as a regular user user username: user and password: password - If you would like to create your own database information do not run db:seed - There are items in the seed data with an auction end time in the past. There is a Heroku scheduler that will run a rake task to close open auctions every hour. To manually close these auctions up app startup, run heroku run rake auction:update_status.
  5. Run the application in the dev environment by running rails s

App Features

Some of the main features of the app include:

Default Users

Login as a default user

  • username: user
  • password: password
Default users can... Screenshot
Browse items by category and by business users browses items by category and business
Bid on items from multiple businesses user bids on items
Access their dashboard to view auction information, including open auctions, auctions lost, and auctions won. They can also update their profile information or create a business from their dashboard. user wins items when they are the highest bidder when auction closes

Business Admins

Login as a business admin

  • username: business_admin
  • password: password
Business admins can... Screenshot
View a list of their businesses from their admin dashboard business admin views businesses they own
View the business dashboards of all of their businesses. From the business dashboard, they can update the business information and see and update items belonging to that business. business admin sees their business' dashboards

Platform Admins

Login as a platform admin

  • username: platform_admin
  • password: password
Platform admins can... Screenshot
View a list of all businesses from their admin dashboard. From the platform admin dashboard, they can activate and deactivate businesses. admins can view all their businesses

Machine Learning Feature:

We have implemented a rudimentary machine learning feature that predicts the final selling price of an item.

  • The algorithm takes in a training set of data, with each data point representing one bid. The x value is the time elapsed since the auction start and the y value is the price of the bid.
  • It then generates a trained function that can take in an x value, the amount of time elapsed between auction start and auction end, and returns a y value that represents the predicted price of the item at auction end.
  • The function is describes a square root graph in which y is the square root of x. It was estimated that this shape of graph would roughly fit bit data.

Dependencies

This application depends on many ruby gems, all of which are found in the Gemfile and can be installed by running bundle install from the terminal in the main directory of the project.

the_pivot's People

Contributors

seeker105 avatar rgbatty avatar icorson3 avatar saylerb avatar

Watchers

James Cloos avatar

the_pivot's Issues

push to heroku for checkin w/ josh

clean up test suite by deleting failing tests
-keep track of which tests are failing so we can delete code later
-push to heroku and check functionality on heroku

platform admin dashboard

As a logged in platform admin,
I click a link to the platform admin dashboard on the navbar
I see a table listing each business status (all, pending, online, offline)
I can filter businesses by status
Each business name is a link to that biz's admin dashboard

---

As a guest user
I visit an item show page
I see the item, description and high bid and high bidder
I see the 'log in or create account' button

I click 'log in or create account'
I see the log in form
I fill in username and password
I click log in
I am redirected back to the item show page I was on
I now see the number field for bid amount and 'place bid' button instead
I do NOT see the 'log in or create account' button

user places a bid on an item

As logged in user, I visit the item show page for a given item
I see the price, which is the current high bid
And the username of the current high bidder
I see a field to enter a bid and I enter my amount
I click a "Bid" button
I should still be on the item show page
I see the updated price and my username as the high bidder

User with auctions won can Filter table by auctions won

As a logged in user
I visit my dashboard page (my-pivot.com/dashboard)
I see a link to update my account information
I see the table of all auctions I've bid on

I click the 'won' button
I see a table of only the auctions I've won

---

As a guest user
I visit an item show page
I see the item, description and starting price
I see the 'log in or create account' button

I click 'log in or create account'
I see the log in form
I fill in username and password
I click log in
I am redirected back to the item show page I was on
I now see the number field for bid amount and 'place bid' button instead
I do NOT see the 'log in or create account' button

--

Add a column to the user dashboard or something

User with auctions can view their dashboard

As a logged in user
I visit my dashboard page (my-pivot.com/dashboard)
I see a link to update my account information
I see a table of all the auctions I've placed bids on

user must be logged in to bid

as a visitor, ( registered user who is not logged in)
I visit the show page for an item
Instead of seeing form to bid, I see a link that says "Log In or Create Account to Bid"
I click the link and enter my login information
I am redirected back to the item's show page
and I can now see the form to place a bid

User with auctions can Filter table by auctions lost

As a logged in user
I visit my dashboard page (my-pivot.com/dashboard)
I see a link to update my account information
I see the table of all auctions I've bid on

I click the 'lost' button
I see a table of only the auctions I've lost

A business can be created by a registered user

Visit the page to create a new business
Enter the business's name and description
click button "Create Business"
expect the page to be the home page for the business
with a flash message that the business has been created

only a business admin can update business information

as a logged in biz admin
I visit the show page for one of my businesses
I see link "Update Business Information"

as any a registered user or guest,
I go to the show page for a business
and I do not see the link

as and admin for a different business,
I don't see the link on a business that's not mine

business admin dashboard

As a logged in admin for Biz A
I click a link for the admin dashboard for Biz A in the navbar
I see a link to manage items
I see a link to update my business information
I see a link to manage admins

user can place a bid on an item with existing bids

as a logged in user,
I visit an item's show page
I see the current high bid
I see the username of the current high bidder
I see a field to enter my bid
I enter my bid and click "Place Bid"
I see myself as the high bidder and show my bid as the high bid

user can place the first bid on an item

as a logged in user,
I visit an item's show page
I see a message that says "No current bids"
I see a field to enter my bid
I enter my bid and click "Place Bid"
I see myself as the high bidder and show my bid as the high bid

Users can see businesses

As a user (right now, regardless of role),
I visit the business index page
I see links to individual businesses

user can make a bid when current high bid exists

as a logged in user
I visit an item's show page
I see that the current high bid is X and current high bidder is X user
I fill in my bid that is higher than the current bid in the form
I click Place Bid
I see my bid as the current high bid
I see my username as the current high bidder

Sad: I fill in with a bid lower than the current high bid
I see a message with errors

Guest can view products

As a guest
I can visit the homepage
When I navigate to a specific business
I see the items available from that business.

When I click on an item that already has bids
I am taken to that item's show page
I see the current high bid
I see the username of the high bidder.
I see a button that says "Log in or Create Account to Place Bid"

business-specific dashboard

When I navigate to "/some_business/dashboard"
And I see a Header that displays "some_business's Dashboard"

user can see an individual business

visit the page for an individual business
the URL should be my-pivot.com/business-name
I see all the items that belong to that business
I can navigate to another business
the URL should be my-pivot.com/business-name2

business information can be updated

I visit the show page for a business
I click a link to update business info
I fill in the form with the updated business name and description
I click Update Business Information
My current path is the business show page
I see a flash notification that my business information has been updated
I see the updated business name and description on the page
(with vanity URL, since it will be after create, the vanity url will not update)

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.