Code Monkey home page Code Monkey logo

force-bridge-ui's Introduction

Force Bridge User Interface

Quick Start

Requirement

  • NodeJS 12+
  • yarn 1.x
git clone path/to/the/force-bridge-ui
cd force-bridge-ui
yarn install
# build commons libraries
yarn build:lib
# craco start
yarn workspace @force-bridge/ui run start
# build ui
cd apps/ui
yarn build
# serve -s build

Build the User Interface

Create .env

Create an .env.local at apps/ui/ to declare required environment variables, the below env config shows how force-bridge-ui works with Rinkeby network and Bsc network

Testnet
# Force-Bridge Ethereum Backend RPC
REACT_APP_BRIDGE_RPC_URL=/api/force-bridge/api/v1
# Force-Bridge Bsc Backend RPC
REACT_APP_BRIDGE_BSC_RPC_URL=

# CKB node RPC
REACT_APP_CKB_RPC_URL=https://testnet.ckbapp.dev/rpc

# 0: mainnet
# 1: testnet
# 2: devnet
REACT_APP_CKB_CHAIN_ID=1

# Nervos explorer for exploring transaction
REACT_APP_TX_EXPLORER_NERVOS=https://explorer.nervos.org/aggron/transaction/
# Ethereum explorer for exploring transaction
REACT_APP_TX_EXPLORER_ETHEREUM=https://rinkeby.etherscan.io/tx/
# Bsc explorer for exploring transaction
REACT_APP_TX_EXPLORER_BSC=https://testnet.bscscan.com/tx/

# Rinkeby
REACT_APP_ETHEREUM_ENABLE_CHAIN_ID=4
REACT_APP_ETHEREUM_ENABLE_CHAIN_NAME=Rinkeby

# Bsc Testnet
REACT_APP_BSC_ENABLE_CHAIN_ID=97
REACT_APP_BSC_ENABLE_CHAIN_NAME=Bsc-Testnet
Mainnet
# Force-Bridge Ethereum Backend RPC
REACT_APP_BRIDGE_RPC_URL=/api/force-bridge/api/v1
# Force-Bridge Bsc Backend RPC
REACT_APP_BRIDGE_BSC_RPC_URL=

# CKB node RPC
REACT_APP_CKB_RPC_URL=//lina.ckb.dev/rpc

# 0: mainnet
# 1: testnet
# 2: devnet
REACT_APP_CKB_CHAIN_ID=0

# Nervos explorer for exploring transaction
REACT_APP_TX_EXPLORER_NERVOS=https://explorer.nervos.org/transaction/
# Ethereum explorer for exploring transaction
REACT_APP_TX_EXPLORER_ETHEREUM=https://etherscan.io/tx/
# Bsc explorer for exploring transaction
REACT_APP_TX_EXPLORER_BSC=https://bscscan.com/tx/

# Ethereum Mainnet
REACT_APP_ETHEREUM_ENABLE_CHAIN_ID=1
REACT_APP_ETHEREUM_ENABLE_CHAIN_NAME=Ethereum

# Bsc Mainnet
REACT_APP_BSC_ENABLE_CHAIN_ID=56
REACT_APP_BSC_ENABLE_CHAIN_NAME=Bsc-Mainnet

Run Command To Build

> pwd
/path/to/force-bridge-ui
> yarn install
> yarn run build:lib

> cd apps/ui
> yarn run build

We will get a build folder after the build. The build/index.html is the program entry, and we should serve the build folder with an HTTP server.

For more about deployment, we can check this doc

force-bridge-ui's People

Contributors

cryptowen avatar homura avatar jacobdenver007 avatar nolanxyg 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.