Coder Social home page Coder Social logo

duality-web-app's Introduction

duality-web-app

The code for the Duality front-end web app.

This version of the front end is intended to work with the release of the backend that is noted in the @duality-labs/neutronjs dependency in package.json

Setting up the dev environment

To set up the front end locally, connected to the current online testnet:

  1. $ npm install
  2. $ npm run dev
  3. The dev site should become available at http://localhost:5173
  4. Install/enable the Keplr extension on your browser
  5. when you visit/refresh http://localhost:5173, allow the site to connect to the Duality testnet chain through Keplr prompt window that should appear
  6. Select the Duality testnet chain on your Keplr extension
  7. Add/select a valid Cosmos account on Keplr
  8. If your account on Keplr has a bank balance on the Duality chain you will see that bank balance represented on your Keplr extension

Connecting to a local backend with Docker Compose

  1. Follow the instructions for Neutron Cosmopark local development to start a local environment with the Neutron chain and some chaines you can bridge to and from

  2. The env vars for specific IBC denoms in local development should have examples in .env.development

  3. Edit your own .env.development.local file to change the backend ENV vars (without adding changes to git because .local files are ignnored)

    • REACT_APP__REST_API=http://localhost:1317
    • REACT_APP__RPC_API=http://localhost:26657
    • REACT_APP__WEBSOCKET_URL=ws://localhost:26657/websocket

    match these endpoints to your locally running chain cluster to develop against it.

    You can also use one of the MNENOMIC env vars in the Docker Compose file to add a new Keplr account (select "Import existing account") for local development

  4. Start/restart your development server to use these new ENV vars:

    • npm run dev

    your development should now be making requests to your local backend

Generated API types

The frontend connects to the backend through the backend API. We use TypeScript types and API client code generated from the backend repo .proto files and the @osmonauts/telescope package to help define the shape of the API for the frontend code base. These files exist at https://github.com/duality-labs/neutronjs

The current backend repository version to use with the frontend should be defined in the package.json file: here the version number of the https://github.com/duality-labs/neutronjs dependency should represent the corresponding backend API version number to use, see https://github.com/neutron-org/neutron/releases

Deployed At

Current build of main should be available at https://app.testnet.duality.xyz

duality-web-app's People

Contributors

dib542 avatar semantic-release-bot avatar nickzoum avatar tonypeng 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.