Skip to content

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

License

Notifications You must be signed in to change notification settings

yann1ckv/Marketplace_dapp

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published