Giter Club home page Giter Club logo

little-esty-shop's Introduction

Little Esty Shop

Archival Notice

As of May 2023, this project has been archived/retired from Rails 5. Please find and use the Rails 7/Ruby 3 project here.

Background and Description

"Little Esty Shop" is a group project that requires students to build a fictitious e-commerce platform where merchants and admins can manage inventory and fulfill customer invoices.

Learning Goals

  • Practice designing a normalized database schema and defining model relationships
  • Utilize advanced routing techniques including namespacing to organize and group like functionality together.
  • Utilize advanced active record techniques to perform complex database queries
  • Practice consuming a public API while utilizing POROs as a way to apply OOP principles to organize code

Requirements

  • must use Rails 5.2.x
  • must use PostgreSQL
  • all code must be tested via feature tests and model tests, respectively
  • must use GitHub branching, team code reviews via GitHub PR comments, and either GitHub Projects or a project management tool of your group's choice (Trello, Notion, etc.)
  • must include a thorough README to describe the project
    • README should include a basic description of the project, a summary of the work completed, and some ideas for a potential contributor to work on/refactor next. Also include the names and GitHub links of all student contributors on your project.
  • must deploy completed code to Heroku
  • Continuous Integration / Continuous Deployment is not allowed
  • Use of scaffolding is not allowed
  • Any gems added to the project must be approved by an instructor

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:create
  • Run the test suite with bundle exec rspec.
  • Run your development server with rails s to see the app in action.

Phases

  1. Database Setup
  2. User Stories
  3. Extensions
  4. Evaluation

little-esty-shop's People

Contributors

brianzanti avatar cjsim89 avatar jamisonordway avatar megstang avatar mikedao avatar scottalexandra avatar timomitchel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

little-esty-shop's Issues

Merchant Invoice Show Page

As a merchant
When I visit my merchant's invoice show page(/merchants/merchant_id/invoices/invoice_id)
Then I see information related to that invoice including:

  • Invoice id
  • Invoice status
  • Invoice created_at date in the format "Monday, July 18, 2019"
  • Customer first and last name

Merchant Items Grouped by Status

As a merchant,
When I visit my merchant items index page
Then I see two sections, one for "Enabled Items" and one for "Disabled Items"
And I see that each Item is listed in the appropriate section

Merchant Invoice Show Page: Invoice Item Information

As a visitor,
When I click on an invoice id from a merchant's invoice index page,

I am taken to the show page for that invoice (/merchant/:merchant_id/invoices/:invoice_id),

Where I can see all of the items (and invoice item) information related to that invoice including:

  • Item name

  • Item quantity

  • Item unit price

  • Total cost of all items on invoice

Merchant Dashboard

As a visitor,
When I visit the merchant dashboard for each specific merchant,
I see 3 links:

  • A link for items that goes to an items index page that lists all of the items that that merchant sells (/merchant/:merchant_id/items)

  • A link to invoices that goes to an invoice index page that lists all of the invoices for that merchant (/merchant/:merchant_id/invoices)

  • A link for transactions that goes to a transaction index page that lists all of the transactions for that merchant (/merchant/:merchant_id/transactions)

Admin Dashboard: Merchant Index

As a visitor,
When I visit the admin dashboard,
I see a list of all merchant’s names.

Each merchant name links to the merchant's dashboard ('/merchant/:merchant_id/dashboard')

Merchant Item Create

As a merchant
When I visit my items index page
I see a link to create a new item.
When I click on the link,
I am taken to a form that allows me to add item information.
When I fill out the form I click ‘Submit’
Then I am taken back to the items index page
And I see the item I just created displayed in the list of items.
And I see my item was created with a default status of disabled.

Merchant Invoice Show Page: Invoice Item Information

As a merchant
When I visit my merchant invoice show page
Then I see all of my items on the invoice including:

  • Item name
  • The quantity of the item ordered
  • The price the Item sold for
  • The Invoice Item status
    And I do not see any information related to Items for other merchants

Merchant Invoices Index

As a merchant,
When I visit my merchant's invoices index (/merchants/merchant_id/invoices)
Then I see all of the invoices that include at least one of my merchant's items
And for each invoice I see its id
And each id links to the merchant invoice show page

Merchant Dashboard Invoices sorted by least recent

As a merchant
When I visit my merchant dashboard
In the section for "Items Ready to Ship",
Next to each Item name I see the date that the invoice was created
And I see the date formatted like "Monday, July 18, 2019"
And I see that the list is ordered from oldest to newest

Merchant Dashboard Links

As a merchant,
When I visit my merchant dashboard
Then I see link to my merchant items index (/merchant/merchant_id/items)
And I see a link to my merchant invoices index (/merchant/merchant_id/invoices)

Merchant Invoice Show Page: Customer Information

As a visitor,
When I click on an invoice id from a Merchant's invoice index page,
I am taken to the show page for that invoice (/merchant/merchant_id/invoices/invoice_id),
Where I can see all of the customer information related to that invoice including:

  • The customer's first and last name

  • The customer's shipping address

Merchant Dashboard Items Ready to Ship

As a merchant
When I visit my merchant dashboard
Then I see a section for "Items Ready to Ship"
In that section I see a list of the names of all of my items that
have been ordered and have not yet been shipped,
And next to each Item I see the id of the invoice that ordered my item
And each invoice id is a link to my merchant's invoice show page

Merchant Invoice Show Page

As a visitor,
When I click on an invoice id from the invoice index page,
I am taken to the show page for that invoice (/merchant/merchant_id/invoices/invoice_id),
Where I can see all of the information related to that invoice including:

  • Invoice id

  • Invoice status

  • Invoice created_at date

Merchant Item Disable/Enable

As a visitor,
When I visit a merchant's items index page,
Next to each item name, I see an option to disable/enable an item.

For example:
If an item’s status is currently set to enabled,
I should see a button to disable that item.

When I click on disable,
the page should refresh and a button to enable that item should now be displayed.

When I visit the item show page, I should see the current status of the item disabled displayed.

If an item’s status is currently set to disabled, I should see a button to enable that item.

When I click on enable, the page should refresh and a button to disable that item should now be displayed.

When I visit the items show page, I should see the current status of the item enabled displayed.

Welcome Page

As a visitor,
When I visit the welcome page ('/'),
I see a greeting welcoming me to the site along with two buttons, one for merchants and one for admins.

  • Merchant button - takes me to the merchant index page (‘/merchants)

  • Admin button - takes me to the admin dashboard (‘/admin/dashboard)

Merchant Items Show Page

As a merchant,
When I click on the name of an item from the merchant items index page,
Then I am taken to that merchant's item's show page (/merchant/merchant_id/items/item_id)
And I see all of the item's attributes including:

  • Name
  • Description
  • Current Selling Price

Navigation Links

As a visitor,
When I visit the site,
I see a navigation bar on every page I visit that includes links for the following:

  • a link to return to the welcome / home page of the application ("/")

  • a link to the merchant index page ("/merchants")

  • a link to the admin dashboard (“/admin/dashboard”)

Merchant Item Disable/Enable

As a merchant
When I visit my items index page
Next to each item name I see a button to disable or enable that item.
When I click this button
Then I am redirected back to the items index
And I see that the items status has changed

Merchant Items Index Page

As a visitor,
When I visit a merchant's items index page ('merchant/:merchant_id/items'),
I see a list of all items that belong to that merchant that includes the:

  • Item name

Merchant Invoice Show Page: Update Item Status

As a merchant
When I visit my merchant invoice show page
I see that each invoice item status is a select field
And I see that the invoice item's current status is selected
When I click this select field,
Then I can select a new status for the Item,
And next to the select field I see a button to "Update Item Status"
When I click this button
I am taken back to the merchant invoice show page
And I see that my Item's status has now been updated

5 Most Popular Items

As a visitor,
When I visit the merchant items index page ('/merchant/:merchant_id/items),
I see a heading for 5 Most Popular Items.

Under that heading,
I see the top 5 most popular items ranked by total revenue generated for that specific Merchant.

In addition to the total revenue, I want to see the total quantity purchased for each item.

Merchant Invoice Update

As a visitor,
When I visit a merchant's invoice show page,
I see a form to update the status of an invoice.
The form includes a select menu where I can select a new status for that invoice

  • canceled

  • packaging

  • pending

  • shipped

After selecting the new status,
I click submit and see the page refresh.
I should now see the new status reflected on the that invoice's show page.

Merchant Item Update

As a merchant,
When I visit the merchant show page of an item
I see a link to update the item information.
When I click the link
Then I am taken to a page to edit this item
And I see a form filled in with the existing item attribute information
When I update the information in the form and I click ‘submit’
Then I am redirected back to the item show page where I see the updated information
And I see a flash message stating that the information has been successfully updated.

Merchant Dashboard Statistics - Favorite Customers

As a merchant,
When I visit my merchant dashboard
Then I see the names of the top 5 customers
who have conducted the largest number of successful transactions with my merchant
And next to each customer name I see the number of successful transactions they have
conducted with my merchant

Merchant Items Index: Top Item's Best Day

As a merchant
When I visit my items index page
Then next to each of the 5 most popular items I see the date with the most sales for each item.
And I see a label “Top selling date for was "

Note: use the invoice date. If there are multiple days with equal number of sales, return the most recent day.

Merchant Items Show Page

As a visitor,
When I click on the name of an item from a merchant's items index page,
I am taken to that item's show page (/merchant/:merchant_id/items/:item_id),
Where I can see all of the items attributes including:

  • Name

  • Description

  • Unit_price

  • Status

Merchant Item Update

As a visitor,
When I visit the show page of a merchant's item,
I see a link to update the item information.

When I click the link,
I am taken to the items edit form (/merchant/merchant_id/items/item_id/edit)

I see a form filled in with the existing item's attributes.

When I update the information in the form, then click ‘Update Item’,

I am redirected back to the item show page,

Where I see the updated information and a flash message stating that The item has been successfully updated

Customer Count

As a visitor,
When I visit a merchant's Dashboard Page
(/merchant/:merchant_id/dashboard),

I see the total number of customers that merchant has.

Merchant Discounts - Open Ended Feature

Students should add multiple user stories that cover all functionality necessary to complete this feature.

As a merchant,
I want to create bulk discounts on specific items so that customers are incentivized to purchase more items.

  1. This feature should include full CRUD functionality for discounts.

  2. Discounts are specific to each merchant

  3. Discounts are percentage based:
    i.e. 5% discount on 20 or more items

  4. A merchant can have multiple bulk discounts in the system.

  5. A bulk discount from one merchant should not affect discounts from other merchant

  6. Students are responsible for defining additional database tables, models and relationships.
    *Use of a database diagram is highly encouraged.

  7. Students are responsible for determining where the discount CRUD functionality lives in the app.
    *Use of wireframes is highly encouraged.

  8. Students do not need to add functionality to apply the discounts to invoices, only CRUD discounts for individual merchant

Merchant Dashboard

As a merchant,
When I visit my merchant dashboard (/merchant/merchant_id/dashboard)
Then I see the name of my merchant

Favorite Customer

As a vistor,
When I visit the merchant dashboard for a specific merchant (/merchant/:merchant_id/dashboard),
I see the names of the top 5 customers who have conducted the largest number of successful transactions.

Merchant Invoice Index Page

As a visitor,
When I visit a merchant's invoices index page (/merchant/:merchant_id/invoices),
I see a list of all of the invoices that belong to that merchant.

The list the following invoice information:

  • invoice id

  • status

Admin Dashboard: Merchant Total Revenue

As a visitor,
When I visit the admin dashboard,
I see a list of all the merchant’s names.
Next to each name I see the total revenue for that merchant.
*include only successful transactions

Merchant Index

As a visitor,
When I visit the merchants index page,
I see a list of all the merchant's names.

When I click on a name, I am taken to that merchant’s dashboard page ('/merchant/:merchant_id/dashboard')

Merchant Items Index: 5 most popular items

As a merchant
When I visit my items index page
Then I see the names of the top 5 most popular items ranked by total revenue generated
And I see that each item name links to my merchant item show page for that item
And I see the total revenue generated next to each item name

Notes on Revenue Calculation:

  • Only invoices with at least one successful transaction should count towards revenue
  • Revenue for an invoice should be calculated as the sum of the revenue of all invoice items
  • Revenue for an invoice item should be calculated as the invoice item unit price multiplied by the quantity (do not use the item unit price)

Top Items Best Day

As a vistor,
When I visit the items index page ('/merchant/:merchant_id/items'),
Next to each of the 5 most popular items,
I see the date with the most sales for each item.

With a label “Top selling date for was .

  • Note: use the invoice date. If there are multiple days with equal number of sales, return the most recent day.

Merchant Items Create

As a visitor,
When I visit a merchant's items index page,
I see a link to Add New Item.

When I click on the link,
I am taken to a form that allows me to add item information.

Once I fill out the form I click Create Item,
I am taken back to the items index page,
Where I see the item I just created displayed in the list of items.

*Each new item should have a default status of disabled.

Merchant Items Index Page

As a merchant,
When I visit my merchant items index page ("merchant/merchant_id/items")
I see a list of the names of all of my items
And I do not see items for any other merchant

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.