Giter Club home page Giter Club logo

origin-dapp's Introduction

origin_github_banner origin_travis_banner

Head to https://www.originprotocol.com/developers to learn more about what we're building and how to get involved.

Just getting started with Origin? We recommend using Origin Box for development and testing on your local machine.

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 dev.env .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.

Browser & Wallet Compatibility

Browsers with wallets for both desktop and mobile that you can use with the Origin Demo DApp.

OS Application Status Notes
Mac Chrome + Metamask extension Operational
Mac Firefox + Metamask extension Operational
Mac Brave with Metamask Operational
PC Chrome + Metamask extension Operational
PC Firefox + Metamask extension Operational
PC Brave with Metamask ⚪️ Not tested
iOS Trust Wallet Operational
iOS Toshi 🚫 Main Toshi app does not currently work with test nets
iOS Toshi Developer 🚫 DApp hangs on Toshi client #327
iOS Cipher ⛔️ Acquired by Coinbase. Not in development.
Android Trust Wallet ⚪️ Not tested
Android Toshi Developer ⚪️ Not tested
Android Toshi Developer ⚪️ Not tested
Android Cipher ⛔️ Not in development

Tests for http://demo.originprotocol.com

Localization

See translations directory.

Deploy on Heroku or IPFS

To deploy a development copy of the site on Heroku, choose which branch you would like to use and follow the instructions:

Master branch
(stable)
Develop branch
(active development)
Deploy Deploy

Heroku will prompt you to set some config variables. You will likely want to stick with the defaults which use Origin's IPFS Gateway and Bridge Server. We also recommend using Infura for connecting to Ethereum even when visitors don't have web3-enabled browsers.

Since this app is just a bunch of HTML and JavaScript, you can also deploy and use it directly from IPFS. Just run:

./scripts/deploy.sh

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.

origin-dapp's People

Contributors

wanderingstan avatar micahalcorn avatar joshfraser avatar tyleryasaka avatar jordajm avatar matthewliu avatar danielvf avatar nick avatar sparrowdom avatar ryana avatar digidigo avatar tomlinton avatar davecraige avatar mek32390 avatar endlist avatar ambertch avatar anshumanv avatar inkredabull avatar nsimon avatar crazybuster avatar acal avatar aiham avatar yayap13 avatar that1guy avatar cuongdo avatar franckc avatar hvardhanx avatar lastmjs avatar kayyoo23 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.