Contributors:
Fred Rondina, Kelsha Darby & Brian Greeson
"Monster Shop" is a fictitious e-commerce platform built for Turing School of Software Design's Back-End Module 2 project (Weeks 4 & 5). This app is a one-stop-shop for items ranging from pet products to bike parts. Can't find something you fancy? Custom merchants can be created with any number of items!
Users are able to register, login, add items to the cart and place the order. Users employed by a merchant on the site can fulfill part of a users order if that order contains items that they sell. If this all other items have already been fulfilled then an admin user will be able to ship that order.
This project was built in 10 days and implemented the following.
Design patterns:
- TDD (Test Driven Development)
- MVC (Model View Controller)
- CRUD Functionality (Create Read Update Destroy)
- ActiveRecord
Gems:
- Orderly
- BCrypt
- Shoulda Matchers
- Capybara
- Clone this repo onto your local machine
- Run the following commands in your terminal to get the code up and running on your local machine (make sure to run each of these without the $)
$ bundle
$ rake db:create
$ rake db:migrate
$ rake db:seed
You must have the following to run this project
Rails 5.1.7
Ruby 2.6.x
Bundler version 2.0.1
To run the entire test suite on your local machine run the following command
$ rspec
Note: You may need to prepend this command with bundle exec
To run a specific test file run the following command
$ rspec <file_path>
Note: Your file path may look something like spec/features/items/index_spec.rb
To run a specific test within a test file run the following command
$ rspec <file_path>:<line_number>
Notes:
- Your file path may look something like
spec/features/items/index_spec.rb
- Your line number should be the line of the beginning of the
it
block - Example:
spec/features/items/index_spec.rb:15
This project allows different types of users to do different actions.
They are laid out as follows:
Admin User
- Permissions:
- View/edit their profile
- View all orders in the system sorted by order status
- Activating and deactivating merchants
- Ship orders
- Add edit and remove items
- Restrictions:
- Create and place orders
- Cannot use their powers for evil
- Sample Credentials:
username: admin_user@example.com
password: admin_password
Merchant User
- Permissions:
- View/edit their profile
- Fulfill orders that contain their items
- Edit and delete their items
- Add a new item to their inventory
- Restrictions:
- Fulfill items in orders that are not that merchants items
- Fulfill orders if their inventory of that item is not large enough
- Create, update or delete any items that are not their own
- Sample Credentials:
username: merchant_user@example.com
password: merchant_password
Default User
- Permissions:
- Add items to a cart
- Place the order
- View/edit their profile
- Restrictions:
- View any admin or merchant specific pages
- Sample Credentials:
username: default_user@example.com
password: default_user_password
Visitor
- Permissions:
- Add items to the cart
- View all items
- Restrictions:
- Checkout with their cart (they must login first)
- View any admin or merchant specific pages
- There are no sample credentials
Not viewable by any other users
Also Viewable By:
- Admin Users
Merchant Address & All Pending Orders
Merchant Profile (Admins cannot view this page)
Order Information (Only their items are shown)
Also Viewable By:
- Merchant Users
Cart View as a Registered User
Also Viewable By:
- Default Users
- Merchant Users