Coder Social home page Coder Social logo

little-esty-shop's Introduction

Little Esty Shop

Table of Contents

  1. About The Project
  2. Project Board
  3. Database Schema
  4. Built With
  5. Setup Instructions
  6. Contact
  7. Acknowledgements

About The Project

Little Esty Shop is a module 2 two-part project for the Turing School of Software & Design. The application resembles a fictitious e-commerce platform where merchants and administrators can manage inventory and fulfill customer invoices, and customers can make purchases. The project is broken into two parts, the first being a 4 person group project with the collaborators mentioned below, and the second part being a solo project

User stories tracked using Github projects.

Skills Developed in part 1

  • Designed schema with custom rake task for database seeding
  • Used advanced ActiveRecord to perform complex database queries
  • Utilized namespacing for efficient and organized routing
  • Practiced MVC concepts, effectively staying within rails conventions
  • Consumed github API and utilized POROS as a way to apply OOP principals
  • Deployed application on Heroku

Extensions Complete

  • Utilized sessions & account models with Devise Gem
  • Added a shopping cart session for customers
  • Implemented a CSS framework

Skills Developed in part 2

  • Used advanced ActiveRecord to perform complex database queries
  • Utilized namespacing for efficient and organized routing
  • Practiced MVC concepts, effectively staying within rails conventions
  • Implemented checkout and payment functionality using POROs and Braintree's paypal API implementation
  • Use webmock to test functionality of API calls
  • Deployed application on Heroku

Extensions Complete

  • Used ActiveRecord to implement functionality that limits merchants from deleting/editing discounts belonging to invoices that are pending
  • Used ActiveRecord to store pertinent discount information on invoice records for referencing throughout application

Project Board

Check out the Project board for a complete list of features / user stories used to develop this application.

Database Schema

Schema

Built With

Setup Instructions

To get a local copy up and running follow these simple steps.

  1. Clone the repo
    git clone https://github.com/elyhess/little-esty-shop
    
  2. Install dependencies
    bundle install
    
  3. DB creation/migration
    rails db:create
    rails db:migrate
    rails db:seed
    
  4. Run tests and view test coverage
    bundle exec rspec
    open coverage/index.html
    
  5. Run server and navigate to http://localhost:3000/
    rails s
    

OR

  1. Visit heroku

    https://immense-ocean-82455.herokuapp.com/
    
  2. Login

    Admin:
    email: [email protected]
    password: password
    
    User:
    email: [email protected]
    password: strongpassword
    

Contact

Acknowledgements

little-esty-shop's People

Contributors

brianzanti avatar elyhess avatar jlfoxcollis avatar philmccarthy avatar scottalexandra avatar sk-sam avatar timomitchel avatar

Stargazers

 avatar

little-esty-shop's Issues

Top 5 Merchants By Revenue

As an admin,
When I visit the admin merchants index
Then I see the names of the top 5 merchants by total revenue generated
And I see that each merchant name links to the admin merchant show page for that merchant
And I see the total revenue generated next to each merchant 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)

Admin Merchants Grouped by Status

As an admin,
When I visit the admin merchants index
Then I see two sections, one for "Enabled Merchants" and one for "Disabled Merchants"
And I see that each Merchant is listed in the appropriate section

Admin Merchant Enable/Disable

As an admin,
When I visit the admin merchants index
Then next to each merchant name I see a button to disable or enable that merchant.
When I click this button
Then I am redirected back to the admin merchants index
And I see that the merchant's status has changed

Admin Dashboard Incomplete Invoices

As an admin,
When I visit the admin dashboard
Then I see a section for "Incomplete Invoices"
In that section I see a list of the ids of all invoices
That have items that have not yet been shipped
And each invoice id links to that invoice's admin show page

GitHub API: Commits

As a visitor or an admin user
When I visit any page on the site
I see the number of commits next to each Github username
This number is updated as each member of the team contributes more commits

Admin Dashboard Incomplete Invoices

As an admin,
When I visit the admin dashboard
Then I see a section for "Incomplete Invoices"
In that section I see a list of the ids of all invoices
That have items that have not yet been shipped
And each invoice id links to that invoice's admin show page

Admin Invoice Show Page: Update Invoice Status

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

Admin Invoice Show Page

As an admin,
When I visit an admin invoice show page
Then I see information related to that invoice including:

  • Invoice id
  • Invoice status
  • Invoice created_at date in the format "Monday, July 18, 2019"

Admin Merchants Grouped by Status

As an admin,
When I visit the admin merchants index
Then I see two sections, one for "Enabled Merchants" and one for "Disabled Merchants"
And I see that each Merchant is listed in the appropriate section

GitHub API: User Names

As a visitor or an admin user
When I visit any page on the site
I see the Github usernames of myself and my teammates somewhere on the site
The most up to date usernames are always displayed

Admin Merchant Show

As an admin,
When I click on the name of a merchant from the admin merchants index page,
Then I am taken to that merchant's admin show page (/admin/merchants/merchant_id)
And I see the name of that merchant

Admin Merchants: Top Merchant's Best Day

As an admin,
When I visit the admin merchants index
Then next to each of the 5 merchants by revenue I see the date with the most revenue for each merchant.
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.

Admin Invoice Show Page: Invoice Item Information

As an admin
When I visit an admin invoice show page
Then I see all of the items on the invoice including:

  • Item name
  • The quantity of the item ordered
  • The price the Item sold for
  • The Invoice Item status

Admin Merchant Create

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

Admin Merchants: Top Merchant's Best Day

As an admin,
When I visit the admin merchants index
Then next to each of the 5 merchants by revenue I see the date with the most revenue for each merchant.
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 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

Admin Merchant Update

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

GitHub API: Repo Name

As a visitor or an admin user
When I visit any page on the site
I see the name of the Github repo somewhere on the site

Admin Merchants Index

As an admin,
When I visit the admin merchants index (/admin/merchants)
Then I see the name of each merchant in the system

Admin Dashboard Invoices sorted by least recent

As an admin,
When I visit the admin dashboard
In the section for "Incomplete Invoices",
Next to each invoice id 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

Admin Merchant Enable/Disable

As an admin,
When I visit the admin merchants index
Then next to each merchant name I see a button to disable or enable that merchant.
When I click this button
Then I am redirected back to the admin merchants index
And I see that the merchant's status has changed

GitHub API: Repo Name

As a visitor or an admin user
When I visit any page on the site
I see the name of the Github repo somewhere on the site

Admin Dashboard Links

As an admin,
When I visit the admin dashboard (/admin)
Then I see a link to the admin merchants index (/admin/merchants)
And I see a link to the admin invoices index (/admin/invoices)

Admin Merchant Update

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

GitHub API: Repo Name

As a visitor or an admin user
When I visit any page on the site
I see the name of the Github repo somewhere on the site

GitHub API: Commits

As a visitor or an admin user
When I visit any page on the site
I see the number of commits next to each Github username
This number is updated as each member of the team contributes more commits

Admin Invoice Show Page: Invoice Item Information

As an admin
When I visit an admin invoice show page
Then I see all of the items on the invoice including:

  • Item name
  • The quantity of the item ordered
  • The price the Item sold for
  • The Invoice Item status

GitHub API: PRs

As a visitor or an admin user
When I visit any page on the site
I see the number of merged PRs across all team members
This number is updated as each member of the team merges more PRs

GitHub API: User Names

As a visitor or an admin user
When I visit any page on the site
I see the Github usernames of myself and my teammates somewhere on the site
The most up to date usernames are always displayed

Admin Invoices Index Page

As an admin,
When I visit the admin Invoices index ("/admin/invoices")
Then I see a list of all Invoice ids in the system
Each id links to the admin invoice show page

Admin Dashboard Statistics - Top Customers

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

Admin Merchants Index

As an admin,
When I visit the admin merchants index (/admin/merchants)
Then I see the name of each merchant in the system

GitHub API: User Names

As a visitor or an admin user
When I visit any page on the site
I see the Github usernames of myself and my teammates somewhere on the site
The most up to date usernames are always displayed

GitHub API: PRs

As a visitor or an admin user
When I visit any page on the site
I see the number of merged PRs across all team members
This number is updated as each member of the team merges more PRs

Top 5 Merchants By Revenue

As an admin,
When I visit the admin merchants index
Then I see the names of the top 5 merchants by total revenue generated
And I see that each merchant name links to the admin merchant show page for that merchant
And I see the total revenue generated next to each merchant 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)

GitHub API: Commits

As a visitor or an admin user
When I visit any page on the site
I see the number of commits next to each Github username
This number is updated as each member of the team contributes more commits

Admin Invoice Show Page: Update Invoice Status

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

Admin Merchant Create

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

Admin Dashboard

As an admin,
When I visit the admin dashboard (/admin)
Then I see a header indicating that I am on the admin dashboard

Admin Invoice Show Page: Update Invoice Status

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

Admin Invoice Show Page

As an admin,
When I visit an admin invoice show page
Then I see information related to that invoice including:

  • Invoice id
  • Invoice status
  • Invoice created_at date in the format "Monday, July 18, 2019"

Admin Invoices Index Page

As an admin,
When I visit the admin Invoices index ("/admin/invoices")
Then I see a list of all Invoice ids in the system
Each id links to the admin invoice show page

GitHub API: PRs

As a visitor or an admin user
When I visit any page on the site
I see the number of merged PRs across all team members
This number is updated as each member of the team merges more PRs

Admin Dashboard Invoices sorted by least recent

As an admin,
When I visit the admin dashboard
In the section for "Incomplete Invoices",
Next to each invoice id 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

Admin Merchant Show

As an admin,
When I click on the name of a merchant from the admin merchants index page,
Then I am taken to that merchant's admin show page (/admin/merchants/merchant_id)
And I see the name of that 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.