Skip to content

go-faast/faast-web

Repository files navigation

Faast

Package version GitHub license Build Status Netlify Status

A decentralized cryptocurrency portfolio manager and exchange. https://faa.st

This repository contains code for both the Faast static website and single page application. Both are built using React.

Usage

Prerequisites

NPM is required, please see the website for installation instructions.

Running

This repository includes a prebuilt version of the application located in dist. To run it you'll need to install local-web-server:

npm install local-web-server

Then start the application with:

npm start

Then open https://localhost:8000. To resolve the SSL warning follow these steps to install the certificate.

Building

To build the application, you will need to install all of the modules:

npm install

Build the app:

npm run build

Files will be built to the dist folder. They can be served from your machine with:

npm start

Contributing

Development Server

The static website is built using react-static, which uses webpack under the hood. And the single page app is built directly with Webpack. For easier development, both can be run with webpack dev server. This allows live reloading on code changes. To start both dev servers behind a frontend proxy, run:

npm run dev

Once compiled, open http://localhost:8000 in your browser.

This concurrently runs the following:

HTTPS

To run the development server over https use HTTPS=true npm run dev

To resolve the SSL warning follow these steps.

or on Google Chrome Browser visit chrome://flags/#allow-insecure-localhost and set the property to Enabled.

Ngrok

For mobile development you can run the development server behind ngrok by running npm run ngrok in a separate terminal.

Branches

The OneFlow model will be followed as best as possible, with develop being the working branch and master pointing to the latest release tag.

Testing

Run:

npm run test

New Currency Checklist

  1. Implement the Wallet abstraction which specifies how to load balances, generate/sign transactions, etc. (see src/services/Wallet/lib/Wallet.ts)
    • If the currency is Bitcoin based and has bitcore support, you can implement BitcoreWallet instead. For an example refer to one of the existing implementations for Bitcoin/Litecoin.
  2. Update src/services/Wallet/lib/WalletSerializer.ts
  3. Update src/utilities/walletIcon.js
  4. Update src/app/components/ConfirmTransactionModal/index.jsx
  5. Update explorer URLs src/config/index.js
  6. If hardware wallet based:
    • Update src/app/actions/connectHardwareWallet.js
    • Add default derivation path src/config/walletTypes.js
    • If export flow differs from Bitcoin, add instruction override in src/app/components/HardwareWalletModal/ConnectionInstructions.jsx
  7. If not hardware wallet based:
    • Add new access tile src/app/components/Access
    • Create custom action to connect to the wallet src/app/actions/access.js

Security

Faast is a fully client side application. Faast is never in control of user funds, and private keys never leave the browser, they are only used to sign transactions. This is similar to myetherwallet.com

Faast never stores, transmits or otherwise knows of private keys. If you are interesting in auditing this, you can find the wallet handling logic located in src/services/Wallet.

License

This project is licensed under the MIT License - see the LICENSE file for details