Code Monkey home page Code Monkey logo

duckduckbooze's Introduction

DuckDuckBooze

About

DuckDuckBooze is a group project between four students while at Turing School of Software and Design's Backend Engineering program. The aim of the project is to use the following skills:

  • Advanced database queries and manipulation using ActiveRecord and SQL
  • Basic HTML/CSS layout and design for UX/UI
  • Authentication & Authorization with bcrypt
  • Session management to authenticate different users and each user's respective cart
  • MVC design pattern
  • CRUD and RESTful routes, with nested resources and namspacing
  • TDD using RSpec and Capybara
  • Version control and project management within a group environment

The project is a Rails web application that acts as an e-commerce platform with three types of users: registered users, merchants, and admins. Registered users can put items into shopping cart and check out to purchase; visitors can fill carts but must registered to complete the purchase. Merchants sell items, which they can change the fulfillment status of. The last merchant to fulfill a specific order sets that order to 'shipped'. Admin can edit both registered users and merchants accounts such as downgrade/upgrade role or enable/disable their account. Each user has defined roles and these roles vary the user's permission to access pages within the web application.

Database Schema

schema

Installation & Setup

The program can run in development from the Rails server after following the following steps in your console:

  • clone to a local repository using git clone https://github.com/pschlatt/DuckDuckBooze.git
  • change directory into the app with cd DuckDuckBooze
  • run bundle install
  • initialize the database with rake db:{drop, create, migrate, seed}
  • start the rails server with rails s
  • The terminal output will show the IP address to type into the browser in order to see the project (for example, localhost:3000)

The following is a screenshot of the landing page:

landing

Testing

The project uses SimpleCov and RSpec to test.

rspec runs the tests.

Live Web App

The project is in live production here

To login as a registered user, you can register a new account or use email: [email protected] password: 12345678

To login as a merchant email: [email protected] password: password

To login as admin, email: [email protected] password: password

System Requirements

Ruby on Rails, version 5.1.7.
Postgresql, version 11.2

Contributors

Corey Sheesley @csheesley

Earl Stephens @earl-stephens

Paul Schlattmann @pschlatt

Chi Tran @chitasan

duckduckbooze's People

Contributors

chitasan avatar csheesley avatar earl-stephens avatar pschlatt avatar

Stargazers

 avatar

Watchers

 avatar  avatar

duckduckbooze's Issues

User Story 57, Admin can make a User a Merchant

As an admin user
When I visit a user's profile page ("/admin/users/5")
I see a link to "upgrade" the user's account to become a merchant
When I click on that link
I am redirected to ("/admin/merchants/5") because the user is now a merchant
And I see a flash message indicating the user has been upgraded
The next time this user logs in they are now a merchant
Only admins can reach any route necessary to upgrade the user to merchant status

DO THESE STORIES FIRST:

  • User Story 55, Admin User Index Page
  • User Story 38, Admin can see a merchant's dashboard

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

depends on #15

depends on #36

User Story 33, Admin can "ship" an order

As an admin user
When I log into my dashboard, "/admin/dashboard"
Then I see any "packaged" orders ready to ship.
Next to each order I see a button to "ship" the order.
When I click that button for an order, the status of that order changes to "shipped"
And the user can no longer "cancel" the order.

DO THESE STORIES FIRST:

  • User Story 31, All Merchants fulfill items on an order

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #82

depends on #44

User Story 56, Admin User Profile Page

As an admin user
When I visit a user's profile page ("/admin/users/5")
I see the same information the user would see themselves
I do not see a link to edit their profile

DO THESE STORIES FIRST:

  • User Story 5, Admin Navigation
  • User Story 55, Admin User Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

depends on #76

depends on #15

User Story 48, Merchant adds an item

As a merchant
When I visit my items page
And I click on the link to add a new item
My URI route should be "/dashboard/items/new"
I see a form where I can add new information about an item, including:
- the name of the item, which cannot be blank
- a description for the item, which cannot be blank
- a thumbnail image URL string, which CAN be left blank
- a price which must be greater than $0.00
- my current inventory count of this item which is 0 or greater

When I submit valid information and save the form
I am taken back to my items page
I see a flash message indicating my new item is saved
I see the new item on the page, and it is enabled and available for sale
If I left the image field blank, I see a placeholder image for the thumbnail

DO THESE STORIES FIRST:

  • User Story 44, Merchant Items Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #28

User Story 67, EXTENSION: Admin can manage items on behalf of a merchant

As an admin user
When I visit a merchant's profile page
I can click on the merchant's items link
And have access to all functionality the merchant does, including
- adding new items
- editing existing items
- enabling/disabling/deleting items

All content rules still apply (eg, item name cannot be blank, etc)

DO THESE STORIES FIRST:

  • User Story 44, Merchant Items Index Page
  • User Story 48, Merchant adds an item
  • User Story 50, Merchant edits an item

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #28

depends on #24

depends on #22

Epic: Merchant Index Page

Merchant Index Page

All users can see a merchant index page at "/merchants" which will list some basic information about each merchant. When admins visit this page, however, more functionality is found.

User Story 58, Admin is redirected from User profile to Merchant dashboard

As an admin user
If I visit a profile page for a user, but that user is a merchant
Then I am redirected to the appropriate merchant dashboard page.
eg, if I visit "/admin/users/7" but that user is a merchant
Then I am redirected to "/admin/merchants/7"
And I see their merchant dashboard page

DO THESE STORIES FIRST:

  • User Story 56, Admin User Profile Page
  • User Story 38, Admin can see a merchant's dashboard

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

depends on #14

depends on #36

User Story 42, Admin disables a merchant account

As an admin merchant
When I visit the merchant index page
And I click on a "disable" button for an enabled merchant
I am returned to the admin's merchant index page
And I see a flash message that the merchant's account is now disabled
And I see that the merchant's account is now disabled
This merchant cannot log in

DO THESE STORIES FIRST:

  • User Story 41, Admin visits Merchant Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #35

child of #82

depends on #32

Epic: Extensions

Extensions

If your team finished all other user stories, it is expected that you will begin work on the following additional stories.

The index page indicated in these stories should be namespaced under a route "/admin". This route should only be accessible to admin users of your application. Any functionality mentioned in this epic should be performed by admin users only, and respective routes should all be namespaced under "/admin"

User Story 49, Merchant cannot add an item if details are bad/missing

As a merchant
When I try to add a new item
If any of my data is incorrect or missing (except image)
Then I am returned to the form
I see one or more flash messages indicating each error I caused
All fields are re-populated with my previous data

DO THESE STORIES FIRST:

  • User Story 48, Merchant adds an item

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #24

User Story 39, Merchant Index Page

As a visitor
When I visit the merchant's index page at "/merchants"
I see all merchants in the system who are active
Next to each merchant's name I see their city and state
I also see the date they registered

DO THESE STORIES FIRST:

  • User Story 2, Visitor Navigation

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #35

child of #82

depends on #79

Epic: User Order Show Page

User Order Show Page

The show page template for an order can be shared between users, merchants and admins to DRY up our presentation logic. They will operate through separate controllers, though.

User Control

  • Users can cancel an order if an admin has not "shipped" that order
  • When an order is cancelled, any fulfilled items have their inventory returned to their respective merchants

Merchant Control

  • Merchants only see items in the order that are sold by that merchant
  • Items from other merchants are hidden

Admin Control

  • Admins can cancel an order on behalf of a user
  • Admins can fulfill items on order on behalf of a merchant

User Story 65, EXTENSION: Admin disables a user account

As an admin user
When I visit the user index page
I see a "disable" button next to any users who are not yet disabled
I see an "enable" button next to any users whose accounts are disabled.
If I click on a "disable" button for an enabled user
I am returned to the admin's user index page
And I see a flash message that the user's account is now disabled
And I see that the user's account is now disabled
This user cannot log in
This user's city/state and orders should not be part of any statistics.

DO THESE STORIES FIRST:

  • User Story 55, Admin User Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #15

User Story 50, Merchant edits an item

As a merchant
When I visit my items page
And I click the edit button or link next to any item
Then I am taken to a form similar to the 'new item' form
My URI route will be "/dashboard/items/15/edit" (if the item's ID was 15)
The form is re-populated with all of this item's information
I can change any information, but all of the rules for adding a new item still apply:
- name and description cannot be blank
- price cannot be less than $0.00
- inventory must be 0 or greater

When I submit the form
I am taken back to my items page
I see a flash message indicating my item is updated
I see the item's new information on the page, and it maintains its previous enabled/disabled state
If I left the image field blank, I see a placeholder image for the thumbnail

DO THESE STORIES FIRST:

  • User Story 48, Merchant adds an item

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #24

User Story 29, User views an Order Show Page

As a registered user
When I visit my Profile Orders page
And I click on a link for order's show page
My URL route is now something like "/profile/orders/15"
I see all information about the order, including the following information:
- the ID of the order
- the date the order was made
- the date the order was last updated
- the current status of the order
- each item I ordered, including name, description, thumbnail, quantity, price and subtotal
- the total quantity of items in the whole order
- the grand total of all items for that order

DO THESE STORIES FIRST:

  • User Story 28, User Profile displays Orders

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #49

child of #82

depends on #47

User Story 36, Merchant Dashboard Statistics

As a merchant
When I visit my dashboard, I see an area with statistics:
- top 5 items I have sold by quantity, and the quantity of each that I've sold
- total quantity of items I've sold, and as a percentage against my sold units plus remaining inventory (eg, if I have sold 1,000 things and still have 9,000 things in inventory, the message would say something like "Sold 1,000 items, which is 10% of your total inventory")
- top 3 states where my items were shipped, and their quantities
- top 3 city/state where my items were shipped, and their quantities (Springfield, MI should not be grouped with Springfield, CO)
- name of the user with the most orders from me (pick one if there's a tie), and number of orders
- name of the user who bought the most total items from me (pick one if there's a tie), and the total quantity
- top 3 users who have spent the most money on my items, and the total amount they've spent

DO THESE STORIES FIRST:

  • User Story 34, Merchant Dashboard Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #41

child of #82

depends on #40

User Story 32, Admin can see all orders

As an admin user
When I log into my dashboard, "/admin/dashboard"
Then I see all orders in the system.
For each order I see the following information:

- user who placed the order, which links to admin view of user profile
- order id
- date the order was created

Orders are sorted by "status" in this order:

- packaged
- pending
- shipped
- cancelled

DO THESE STORIES FIRST:

  • User Story 56, Admin User Profile Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #82

depends on #14

User Story 28, User Profile displays Orders

As a registered user
When I visit my Profile Orders page, "/profile/orders"
I see every order I've made, which includes the following information:
- the ID of the order, which is a link to the order show page
- the date the order was made
- the date the order was last updated
- the current status of the order
- the total quantity of items in the order
- the grand total of all items for that order

DO THESE STORIES FIRST:

  • User Story 17, User Profile Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #49

child of #82

depends on #60

User Story 59, Admin can downgrade a merchant to regular user

As an admin user
When I visit a merchant's dashboard ("/admin/merchants/6")
I see a link to "downgrade" the merchant's account to become a regular user
The merchant themselves do NOT see this link
When I click on that link
I am redirected to ("/admin/users/6") because the merchant is now a regular user
And I see a flash message indicating the user has been downgraded
The next time this user logs in they are no longer a merchant
All items for sale by this user are disabled
Only admins can see the "downgrade" button
Only admins can reach any route necessary to downgrade the merchant to user status

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

User Story 46, Merchant enables an item

As a merchant
When I visit my items page
And I click on an "enable" button or link for an item
I am returned to my items page
I see a flash message indicating this item is now available for sale
I see the item is now enabled

DO THESE STORIES FIRST:

  • User Story 44, Merchant Items Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #28

User Story 63, EXTENSION: Admin cancels a user's order

As an admin user
When I visit a user's order show page
If the order is still "pending", I see a button or link to cancel the order
When I click the cancel button for an order
The same behaviors happen as if the user canceled the order themselves

DO THESE STORIES FIRST:

  • User Story 17, User Profile Show Page
  • User Story 29, User views an Order Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #60

depends on #46

User Story 47, Merchant deletes an item

As a merchant
When I visit my items page
And I click on a "delete" button or link for an item
I am returned to my items page
I see a flash message indicating this item is now deleted
I no longer see this item on the page

DO THESE STORIES FIRST:

  • User Story 44, Merchant Items Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #28

Epic: Merchant Dashboard

Merchant Dashboard

This is the landing page when a merchant logs in. Here, they will see their contact information (but cannot change it), some statistics, and a list of pending orders that require the merchant's attention.

Admins can act on behalf of merchants

Admin users will see more information on the "/merchants" route that all users see. For example, on this page, an admin user can navigate to each merchant's dashboard under a route like "/admin/merchants/7". This will allow the admin to perform every action that the merchant themselves can perform. Admin users can also "downgrade" a merchant account to become a user account.

User Story 68, EXTENSION: Admin can fulfill order items on behalf of a merchant

As a merchant
When I visit an order show page from my dashboard
For each item of mine in the order
If the user's desired quantity is greater than my current inventory quantity for that item
Then I do not see a "fulfill" button or link
Instead I see a big red notice next to the item indicating I cannot fulfill this item

DO THESE STORIES FIRST:

  • User Story 53, Merchant fulfills part of an order
  • User Story 54, Merchant cannot fulfill an order due to lack of inventory
  • User Story 31, All Merchants fulfill items on an order

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #18

depends on #17

depends on #44

User Story 53, Merchant fulfills part of an order

As a merchant
When I visit an order show page from my dashboard
For each item of mine in the order
If the user's desired quantity is equal to or less than my current inventory quantity for that item
And I have not already "fulfilled" that item:
- Then I see a button or link to "fulfill" that item
- When I click on that link or button I am returned to the order show page
- I see the item is now fulfilled
- I also see a flash message indicating that I have fulfilled that item
- My inventory quantity is permanently reduced by the user's desired quantity

If I have already fulfilled this item, I see text indicating such.

DO THESE STORIES FIRST:

  • User Story 52, Merchant sees an order show page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #20

child of #82

depends on #19

User Story 54, Merchant cannot fulfill an order due to lack of inventory

As a merchant
When I visit an order show page from my dashboard
For each item of mine in the order
If the user's desired quantity is greater than my current inventory quantity for that item
Then I do not see a "fulfill" button or link
Instead I see a big red notice next to the item indicating I cannot fulfill this item

DO THESE STORIES FIRST:

  • User Story 52, Merchant sees an order show page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #20

child of #82

depends on #19

User Story 61, EXTENSION: Admin links to User's Order Show from Admin Dashboard

As an admin user
When I visit my dashboard and see all order data
The order ID is a link to an admin-only view of the order
When I click on the link for an order ID,
My URL route is "/admin/users/5/orders/15"

DO THESE STORIES FIRST:

  • User Story 56, Admin User Profile Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #14

User Story 45, Merchant disables an item

As a merchant
When I visit my items page
And I click on a "disable" button or link for an item
I am returned to my items page
I see a flash message indicating this item is no longer for sale
I see the item is now disabled

DO THESE STORIES FIRST:

  • User Story 44, Merchant Items Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #28

User Story 62, EXTENSION: Admin views a User's Order Show Page

As an admin user
When I visit a user's profile
And I click on a link for order's show page
My URL route is now something like "/admin/users/5/orders/15"
I see all information about the order, including the following information:
- the ID of the order
- the date the order was made
- the date the order was last updated
- the current status of the order
- each item the user ordered, including name, description, thumbnail, quantity, price and subtotal
- the total quantity of items in the whole order
- the grand total of all items for that order

DO THESE STORIES FIRST:

  • User Story 56, Admin User Profile Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #14

User Story 30, User cancels an order

As a registered user
When I visit an order's show page
If the order is still "pending", I see a button or link to cancel the order
When I click the cancel button for an order, the following happens:
- Each row in the "order items" table is given a status of "unfulfilled"
- The order itself is given a status of "cancelled"
- Any item quantities in the order that were previously fulfilled have their quantities returned to their respective merchant's inventory for that item.
- I am returned to my profile page
- I see a flash message telling me the order is now cancelled
- And I see that this order now has an updated status of "cancelled"

DO THESE STORIES FIRST:

  • User Story 17, User Profile Show Page
  • User Story 29, User views an Order Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #49

child of #82

depends on #60

depends on #46

User Story 55, Admin User Index Page

As an admin user
When I click a new "Users" link in the nav (only visible to admins)
Then my current URI route is "/admin/users"
Only admin users can reach this path.
I see all users in the system who are not merchants nor admins.
Each user's name is a link to a show page for that user ("/admin/users/5")
Next to each user's name is the date they registered
Next to each user's name is a button that says 'Upgrade to Merchant'

DO THESE STORIES FIRST:

  • User Story 5, Admin Navigation

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

depends on #76

User Story 41, Admin visits Merchant Index Page

As an admin user
When I visit the merchant's index page at "/merchants"
I see all merchants in the system
Next to each merchant's name I see their city and state
The merchant's name is a link to their Merchant Dashboard at routes such as "/admin/merchants/5"
I see a "disable" button next to any merchants who are not yet disabled
I see an "enable" button next to any merchants whose accounts are disabled

DO THESE STORIES FIRST:

  • User Story 39, Merchant Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #35

child of #82

depends on #34

User Story 64, EXTENSION: Admin can edit a user's profile data

As an admin user
When I visit a user's profile page ("/admin/users/5")
And I click the link to edit the user's profile data
The same behaviors exist as if I were that user trying to change their own data
Except I am returned to the show page path of
"/admin/users/5" when I am finished

DO THESE STORIES FIRST:

  • User Story 5, Admin Navigation
  • User Story 56, Admin User Profile Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #76

depends on #14

User Story 26, Registered users can check out

As a registered user
When I add items to my cart
And I visit my cart
I see a button or link indicating that I can check out
And I click the button or link to check out
An order is created in the system, which has a status of "pending"
I am taken to my orders page ("/profile/orders")
I see a flash message telling me my order was created
I see my new order listed on my profile orders page
My cart is now empty

DO THESE STORIES FIRST:

  • User Story 21, User views their cart show page with items in the cart

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #57

child of #82

depends on #55

User Story 40, Merchant Index Page Statistics

As a visitor
When I visit the merchants index page, I see an area with statistics:
- top 3 merchants who have sold the most by price and quantity, and their revenue
- top 3 merchants who were fastest at fulfilling items in an order, and their times
- worst 3 merchants who were slowest at fulfilling items in an order, and their times
- top 3 states where any orders were shipped (by number of orders), and count of orders
- top 3 cities where any orders were shipped (by number of orders, also Springfield, MI should not be grouped with Springfield, CO), and the count of orders
- top 3 biggest orders by quantity of items shipped in an order, plus their quantities

DO THESE STORIES FIRST:

  • User Story 39, Merchant Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #35

child of #82

depends on #34

User Story 66, EXTENSION: Admin enables a user account

As an admin user
When I visit the user index page
And I click on a "enable" button for a disabled user
I am returned to the admin's user index page
And I see a flash message that the user's account is now enabled
And I see that the user's account is now enabled
This user can now log in
This user's city/state and orders should be included in all statistics.

DO THESE STORIES FIRST:

  • User Story 55, Admin User Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #9

child of #82

depends on #15

User Story 52, Merchant sees an order show page

As a merchant
When I visit an order show page from my dashboard
I see the customer's name and address
I only the items in the order that are being purchased from my inventory
I do not see any items in the order being purchased from other merchants
For each item, I see the following information:
- the name of the item, which is a link to my item's show page
- a small thumbnail of the item
- my price for the item
- the quantity the user wants to purchase

DO THESE STORIES FIRST:

  • User Story 35, Merchant Dashboard displays Orders

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #20

child of #82

depends on #39

User Story 38, Admin can see a merchant's dashboard

As an admin user
When I visit the merchant index page ("/merchants")
And I click on a merchant's name,
Then my URI route should be ("/admin/merchants/6")
Then I see everything that merchant would see

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #41

child of #82

User Story 31, All Merchants fulfill items on an order

When all items in an order have been "fulfilled" by their merchants
The order status changes from "pending" to "packaged"

DO THESE STORIES FIRST:

  • User Story 53, Merchant fulfills part of an order

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #82

depends on #18

Epic: User Management by Admins

User Management by Admins

Admins will need a way to view a list of all regular users and view their profile and order data.

Admins can also change a user's role between being a regular user and a merchant user.

User Story 43, Admin enables a merchant account

As an admin merchant
When I visit the merchant index page
And I click on a "enable" button for a disabled merchant
I am returned to the admin's merchant index page
And I see a flash message that the merchant's account is now enabled
And I see that the merchant's account is now enabled
This merchant can now log in

DO THESE STORIES FIRST:

  • User Story 41, Admin visits Merchant Index Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #35

child of #82

depends on #32

User Story 37, Merchant's Items index page

As a merchant
When I visit my dashboard
I see a link to view my own items
When I click that link
My URI route should be "/dashboard/items"

DO THESE STORIES FIRST:

  • User Story 17, User Profile Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #41

child of #82

depends on #60

User Story 27, User Profile displays Orders link

As a registered user
When I visit my Profile page
And I have orders placed in the system
Then I see a link on my profile page called "My Orders"
When I click this link my URI path is "/profile/orders"

DO THESE STORIES FIRST:

  • User Story 17, User Profile Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #49

child of #82

depends on #60

User Story 60, Admin is redirected from Merchant Dashboard to User profile

As an admin user
If I visit a merchant dashboard, but that merchant is a regular user
Then I am redirected to the appropriate user profile page.

eg, if I visit "/admin/merchants/7" but that merchant is a regular user
then I am redirected to "/admin/users/7" and see their user profile page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #16

child of #82

User Story 34, Merchant Dashboard Show Page

As a merchant user
When I visit my dashboard ("/dashboard")
I see my profile data, but cannot edit it

DO THESE STORIES FIRST:

  • User Story 7, User Registration
  • User Story 4, Merchant Navigation

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #41

child of #82

depends on #73

depends on #77

User Story 44, Merchant Items Index Page

As a merchant
When I visit my items page "/dashboard/items"
I see a link to add a new item to the system
I see each item I have already added to the system, including:
- the ID of the item
- the name of the item
- a thumbnail image for that item
- the price of that item
- my current inventory count for that item
- a link or button to edit the item

If no user has ever ordered this item, I see a link to delete the item
If the item is enabled, I see a button or link to disable the item
If the item is disabled, I see a button or link to enable the item

DO THESE STORIES FIRST:

  • User Story 34, Merchant Dashboard Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #40

User Story 35, Merchant Dashboard displays Orders

As a merchant
When I visit my dashboard ("/dashboard")
If any users have pending orders containing items I sell
Then I see a list of these orders.
Each order listed includes the following information:
- the ID of the order, which is a link to the order show page ("/dashboard/orders/15")
- the date the order was made
- the total quantity of my items in the order
- the total value of my items for that order

DO THESE STORIES FIRST:

  • User Story 34, Merchant Dashboard Show Page

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #41

child of #82

depends on #40

Epic: Merchant Order Fulfillment

Merchant Order Fulfillment

Merchants must "fulfill" each ordered item for users. They will visit an order show page which will allow them to mark each item as fulfilled. Once every merchant marks their items for an order as "fulfilled" then the whole order switches its status to "shipped". Merchants cannot fulfill items in an order if they do not have enough inventory in stock. If a user cancels an order after a merchant has fulfilled an item, the quantity of that item is returned to the merchant.

Admin functionality

Admins can fulfill items in an order on behalf of a merchant.

User Story 51, Merchant cannot edit an item if details are bad/missing

As a merchant
When I try to edit an existing item
If any of my data is incorrect or missing (except image)
Then I am returned to the form
I see one or more flash messages indicating each error I caused
All fields are re-populated with my previous data

DO THESE STORIES FIRST:

  • User Story 50, Merchant edits an item

Checklist:

  • base tests are written
  • base code is written to pass tests
  • edge case ("sad path") tests written (if required)
  • edge case code written (if required)
  • code is reviewed
  • branch is merged
  • all tests still pass

child of #29

child of #82

depends on #22

Epic: Merchant Items

Merchant Items

Merchants need CRUD functionality for items in the database. These stories will work through the management of items. These routes should be namespaced like "/dashboard/items" and "/dashboard/items/6" and so on. Merchants can disable items so they are no longer for sale but stay in the database so orders are still handled properly. Merchants can fully delete items if nobody has ever ordered it.

Admin functionality

Admin users share all management functionality, but the routes will be much longer, like "/admin/merchants/8/items" and "/admin/merchants/8/items/6" and so on.

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.