GithubHelp home page GithubHelp logo

moza88 / defi_wallet_app Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 5.0 3.45 MB

Home Page: defi-wallet-app-frontend.vercel.app

JavaScript 36.53% TypeScript 8.50% Dockerfile 0.72% Shell 0.08% CSS 0.79% HTML 53.38%

defi_wallet_app's Introduction

DeFi Wallet App

This is a web app to illustrate how we can integrate BitGo and Fireblocks into our UIs. This experimental app helped us better understand the features of each product and how each of these features worked.

Running this Project

Starting BitGo Express Server - Running Docker Image

Starting BitGo Express Server, go to the root directory of the project and start Bitgo-Express Docker image:

docker-compose up

Installing the Dependency Concurrently

In the root directory run the following command to install concurrently*:

*Concurrently builds both the backend and frontend in one command and starts both the backend and frontend in one command

npm run install

Installing the Dependencies for Frontend & Backend

In the root directory run the following command to install dependencies for the frontend and backend:

npm run build

Running the Backend and Frontend Projects

In the root directory run the following command to start the frontend and backend:

npm run start

URL for Backend

After everything is up and running go to the backend swagger docs

http://localhost:9000/api-docs

You can also test the API's using the postman collection found in the folder /packages/backend/postman

URL for Frontend

After everything is up and running go to

http://localhost:3000

Architecture (WIP)

img_1.png https://lucid.app/lucidchart/17d6ec18-0a55-4525-879f-b62e62618ec7/edit?viewport_loc=-76%2C-120%2C2273%2C1233%2C0_0&invitationId=inv_c4e17f19-afbd-43c3-8227-595913ee0788#

Stack

Backend - NestJS

Frontend - NextJS

Crypto Libraries

Bitgo

Fireblocks

Bitgo Signer

Currently for this POC we are using a docker instance of the signer

Fireblocks Signer

Azure Cloud to host both the API Callback Handler and API Co-Signe

API Co-Signer uses Intel SGX enclave device to secure the key shards stored in a secret DB

Setting Up the Project

Backend

Copy the env.example file in the packages/backend folder and populate the variables.

You'll need an API token from BitGo and Fireblocks, check their website on how to procure one.

Fireblocks will also require a cert

Frontend

Copy the env.example file in the packages/frontend folder and populate the variables.

You'll need an API token from Firebase Google and a project ID

Backend Docker Image

Backend Image Rebuild

Image Rebuild

After making changes re-build the image using the command below:

docker-compose up -d --build backend

Test your image locally using the command below: docker-compose up -d --build backend

Deploying Image to Serverless Environment

We are deploying our docker images to Google Cloud's Container Registry.

To re-deploy the image to the registry, run the following command:

  1. Tag the image with the tag you want to use.
docker tag backend us-central1-docker.pkg.dev/wallet-app-54dff/defi-wallet-app/backend:tag1
  1. Push the image to the registry.
docker push us-central1-docker.pkg.dev/wallet-app-54dff/defi-wallet-app/backend:tag1
  1. Verify that the image is now available in the registry. By visiting the following page in the console: https://console.cloud.google.com/artifacts/docker/wallet-app-54dff/us-central1/defi-wallet-app?project=wallet-app-54dff

defi_wallet_app's People

Contributors

moza88 avatar luizflor avatar cxyzhang0 avatar

Stargazers

Roberto Porfiro avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

defi_wallet_app's Issues

Bitgo Wallet Page - List of Addresses and Balances in a Wallet

In the bitgo wallet page when you click on the hyperlink of the wallet you should get all the addresses associated to the wallet and the balances. It works the first time you click on a link of a name but when you click on the second one it still presents the previous addresses and balances.

The wallet id is not resetting after closing out of the the window.

This code can be found in ListWallets and WalletDetails in the Bitgo folders.

Fix the Get Transaction History Query - Fireblocks

The Transaction history query isn't working as intented, it should return a specific source Id

This query is using Fireblock's sdk call getTransactions and the code that's calling it is in txn.service.ts in the fireblocks folder

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.