Giter VIP home page Giter VIP logo

chain-shop's Introduction

Chain Shop

This dApp is a shopping application in which there are three user types - guest, admin, and owner. Guests can shop at a variety of store fronts and check out using Ether, whereas admins can add owners and other admins. Owners can add store fronts and products for guests to purchase.

The purpose of this application is to practice using the Ethereum set of tools to build a decentralized application. This application can be deployed on the local development blockchain, and can also be found on the Ropsten network here: 0xa2a379fd570A02E86452a7E5c57daD67DDd85592.

Setup

  1. Start Ganache on port 8545.
  2. Migrate contracts: truffle migrate --reset --all
  3. Install main dependencies: npm install
  4. Install client dependencies: cd client && npm install
  5. npm start

Testing Flow

The easiest way to test the flow is the following:

  1. Deploy the contract with account 1
  2. Add account 2 as an admin
  3. Add account 3 as an owner
  4. Switch to account 3 and add a store and then add a product for that store
  5. Switch to account 4 and attempt a purchase
  6. Switch back to account 3 and withdraw earnings from the transaction
  7. Use account 3 to test updating / deleting stores and products

Design Pattern Decisions

To see information on design pattern decisions for this application, please refer to the documentation here.

Avoiding Common Attacks

To see information on how this application has avoided common attacks, please refer to the documentation here.

chain-shop's People

Contributors

arsood avatar

Watchers

 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.