Frontend Vue app for Balancer exchange and pool management.
To setup the development environment first clone the repo:
git clone https://github.com/balancer-labs/frontend-v2.git && cd frontend-v2Install dependencies:
npm installStart the app:
npm run serveThe app should be live at http://localhost:8080
If you'd rather spin up the app in a docker container, first install dependencies to you local folder:
docker-compose build
docker-compose run --rm web npm iand start the app:
docker-compose upThe app should be live at http://localhost:8080
If you are on Apple Silicon, try this:
export DOCKER_DEFAULT_PLATFORM=linux/amd64 To change your local development app network, update the network key for
VUE_APP_NETWORK in .env.development. Available networks:
1 - Mainnet
42 - Kovan
137 - Polygon
42161 - Arbitrum
As we believe in decentralization at all layers, we've made it easy to host your own Balancer Frontend.
We've created a production ready docker image that connects to Mainnet and runs a pre-built version of Balancer Frontend-v2 using nginx. You'll need your own Infura, Alchemy, and Blocknative API keys in order to fetch data and make trades.
You can also specify your Portis Dapp ID if you wish to use that service, otherwise it will use a default key.
Here's an example of how to run the container. This can also be found in scripts/run-docker.sh.
docker run \
-e INFURA_PROJECT_ID= \ # Required
-e ALCHEMY_KEY= \ # Required
-e BLOCKNATIVE_DAPP_ID= \ # Required
-e PORTIS_DAPP_ID= \ # Optional
balancerfi/frontend-v2Click the button below to deploy the frontend Docker image to a new instance in your Digital Ocean account. You will be prompted to provide your Infura Project ID, Alchemy Key, and Blocknative Dapp ID as these are required for the frontend to work correctly.
The app is using Tailwind to configure base styles. In development these styles can be viewed by running:
npm run tailwind-viewerYour browser should load the app at http://localhost:3000.