Skip to content

sparrowDom/demo-dapp

 
 

Repository files navigation

origin_github_banner

Origin Demo DApp

This is an example DApp (Decentralized Application) that shows how easy it is to create a truly peer to peer marketplace on the Ethereum blockchain with origin-js. Using only javascript, you can create and purchase listings, leave reviews, check identity, and more.

To learn more about Origin Protocol, please read our product brief and whitepaper for a high-level description of what we're building and why it matters. Our official website is https://www.originprotocol.com.

Try Demo Dapp on the Rinkeby testnet

This demo is currently running on the Rinkeby testnet. (Note that this demo is slightly behind the current state of this repo.)

Run Demo DApp

1. Check node version

Make sure you have node version 8.5.0 or greater

node --version

2. Set up DApp

In a new tab:

git clone https://github.com/OriginProtocol/demo-dapp origin-demo-dapp && cd origin-demo-dapp
npm install
npm run start

A browser will open to http://localhost:3000. If you don't have the MetaMask extension (or another wallet provider) follow instructions of the next step.

Origin-homepage

3. Set up MetaMask

  • Install MetaMask Chrome Browser Extension.

  • Follow the instructions to set up your wallet.

  • Click where it says "Ethereum Main Network" and select "Rinkeby Test Network" or "Ropsten Test Network". This takes us off of the real Ethereum network and onto a test network. Ethers on test networks cannot be exchanged for fiat currency.

Be careful not to mix up your test wallet with your real one on the Main Network.

4. Get test ether

4. Try it!

Create a listing and post it to IPFS and Ethereum.

Run Demo DApp with local origin-js and local blockchain

If you want hack on origin-js code, or if you just want to use a private local blockchain, follow these instructions.

1. Set up and run origin-js locally

Follow these instructions to setup and run origin-js.

2. Set up the DApp for local development

Leave origin-js running and create a new terminal window. Then run the following:

git clone https://github.com/OriginProtocol/demo-dapp origin-demo-dapp && cd origin-demo-dapp
cp .env.dev .env  # Use development env vars
npm run install:dev
npm run start

The install:dev script performs the regular install and then links to your local origin-js from step 1. Changes made to origin-js code will then immediately reflected in Demo DApp without requiring npm install.

Your browser will open to http://localhost:3000 and display the DApp.

3. Connect to your local blockchain in MetaMask

  • Log out of MetaMask.

  • Click Restore from seed phrase

  • Enter the following seed phrase (Mnemonic):

candy maple cake sugar pudding cream honey rich smooth crumble sweet treat

This is the default seed phrase used by Truffle for development.

⚠️ Be careful not to mix up your test wallet with your real one on the Main Network.

  • Click where it says "Ethereum Main Network" and select "Localhost 8545". Click the back arrow to return to your account.

  • You should see your first test account now has 100 ETH and the address 0x627306090abaB3A6e1400e9345bC60c78a8BEf57. Additional generated accounts will also have this amount.

Contributing

Origin is an 100% open-source and community-driven project and we welcome contributions of all sorts. There are many ways to help, from reporting issues, contributing code, and helping us improve our community.

To get involved, please join our Discord channel and review our guide to contributing.

About

Demo DApp for our peer to peer marketplace using origin.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.3%
  • CSS 23.6%
  • Other 1.1%