Giter Site home page Giter Site logo

mini_shop's Introduction

Mini Shop

Mini Shop is an e-commerce site that allows for organizations/companies (Merchants) to create a profile and add the products (Items) that they offer so they are available for sale. Mini Shop

How to install it

  1. Make sure you have Ruby v. 2.5.5 and Rails v. 5.1.7 installed.

  2. Clone this repo.

  3. Once you have your local clone; navigate into the project, bundle your gems and create, migrate, and seed your database:

cd mini_shop
bundle install
rails db:create
rails db:migrate
rails db:seed
  1. Run rspec in your terminal to ensure all tests are passing.

  2. Run your server in your local environment (your computer). Enter in your terminal rails s and then visit localhost:3000.

  3. To see the production site on Heroku, visit: https://immense-oasis-67806.herokuapp.com/

Features

Merchant

  • Merchant Index page - List of all merchants in the system.
  • Merchant Show page - Details of a specific merchant.
  • Merchant Creation - Fill out a form to create a new merchant.
  • Merchant Update - Fill out a form to update any attribute of a merchant.
  • Merchant Delete - Delete a specific merchant.
  • Merchant Items page - Shows all items that belong to a merchant. With the ability to filter by item status (active/ inactive).

Relationship: A Merchant has many Items.

Attributes Description Requirement
Name Company name (string) Required
Address Address where they operate (string) Required
City City where they operate (string) Required
State State where they operate (string) Required
Zip Zipcode where they are located (string) Required

Items

  • Items Index page - List of all items in the system (shows 16 per page).
  • Items Show page - Details of a specific item.
  • Items Creation - Fill out a form to create a new item.
  • Items Update - Fill out a form to update any attribute of an item.
  • Items Delete - Delete a specific item.

Relationship: An Item belongs to a Merchant.

Attributes Description Requirement
Name Product name (string) Required
Description Product description (text) Optional
Image Image Path (string) Required
Price Price (decimal) Required
Inventory Inventory available (integer) Required
Status Active/ Inactive (enum - integer) Optional (Active by default)

Built With

  • Rails 5.1.7
  • Ruby 2.5.5
  • PostgreSQL
  • HTML/CSS

Testing

All test are done with RSpec with a 100% code coverage (calculated with SimpleCov)

To run all tests, enter in your terminal:

$ cd mini_shop
$ rspec

To run a single test:

$ cd mini_shop
$ rspec spec/models/item_spec.rb #(e.g.)

To see the test coverage, enter in your terminal:

$ rspec
$ open coverage/index.html

mini_shop's People

Contributors

nmcolome avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

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.