Coder Social home page Coder Social logo

martijnvdbrug / marketplace_dapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yann1ckv/marketplace_dapp

0.0 1.0 0.0 7.61 MB

Decentralized marketplace application built on the Ethereum Blockchain using the Truffle Framework

License: MIT License

HTML 20.29% JavaScript 74.59% CSS 5.12%

marketplace_dapp's Introduction

alt text

Marketplace_dapp

Simple decentralized auctioning website on the Ethereum Blockchain. An agreement to sell creates an obligation for the buyer to deposit ether in an escrow contract, where the money is stored until the buyer agrees to release the money to the sellers' account or the seller agrees to refund the money to the buyers' account.

Site

Landing Page

The user should be logged in using MetaMask. He or she then has the ability to either list a new item or view details of already listed items.

alt text

It is also possible to make bids on already listed items.

alt text

After an auction is closed, the winner of the auction sends ether to an escrow account, in which it stays until either the buyer releases the funds to the seller or the seller refunds the funds to the buyer.

alt text

Once there are funds in the escrow contract, the buyer can decide to release the funds upon receiving the product.

alt text

Installation

Start by cloning this repository.

git clone https://github.com/yvisbeek/Marketplace_dapp.git

You will also need a working node.js setup (instructions) and globally installed ganache-cli (instructions).

Install dependencies

cd Marketplace_dapp
npm install

Install MongoDB

https://docs.mongodb.com/manual/installation/

Install IPFS

https://ipfs.io/docs/install/

Install the MetaMask extension for your browser

https://metamask.io/

Deployment

Open a new terminal window and start a local blockchain using the ganache command-line-interface

1. ganache-cli
2. use the mnemonic to login to Metamask on localhost 8545

Open another terminal window and compile the contracts and migrate them to the blockchain

3. truffle compile
4. truffle migrate
5. npm run dev (start the dev server on localhost:8080)

Open another terminal window and run MongoDB

6. mongod

Open another terminal window and run the server that listens to activity on the blockchain and interacts with MongoDB

7. nodemon server.js

Open another terminal windows and start an IPFS connection

8. ipfs daemon

The app should now be running on http://localhost:8080

Built with

  • Node.js - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
  • IPFS - A peer-to-peer hypermedia protocol to make the web faster, safer, and more open.
  • Ethereum - Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference.
  • jQuery - Ajax - jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
  • Truffle Framework - Truffle is the most popular development framework for Ethereum with a mission to make your life a whole lot easier.
  • MongoDB - MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need.
  • Ganache-cli - Quickly fire up a personal Ethereum blockchain which you can use to run tests, execute commands, and inspect state while controlling how the chain operates.
  • MetaMask - MetaMask is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node.

License

You can check out the full license here

This project is licensed under the terms of the MIT license.

marketplace_dapp's People

Contributors

yann1ckv 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.