Giter VIP home page Giter VIP logo

crypto-dash-react-india's Introduction

crypto-dashboard-ui-

crypto-dashboard-ui

Crypto currency app, we can build screen like -

Name of the currency

Its price - we will do streaming for price not static one.

Movement from yesterday - Dynamic as price is moving.

Graph showing that currency's performance over time - We need Api that provide this data

Buy Button

Last list of confirmed trades. Blotter that showing real time status of trade lifecycle. We can mock this.

Getting Started

First, install all the dependencies and then run the development server:

npm i
npm run dev

Open http://localhost:3000/ in the web browser to see the result

Openfin Integaration

Install openfin-cli

npm install -g openfin-cli

Docs:

To launch an application via command line use below command:

openfin --launch --url http://localhost:3000

npm script to run the application

npm run openfin

How to use local mock APIs

  1. APIMocker is used to mock APIs. API response is served as a static file stored.
  2. Static files are present at location apiMocker/mocks.json.
  3. First install api mocker using below npm command
sudo npm install -g apimocker
  1. Change location of mock files at apiMocker/config.json line number 3 like this -
   "mockDirectory": "~/project/ReactConf/crypto-dashboard-ui/apiMocker/mocks",
  1. Run api mocker - make sure path to apiMocker is correct.
cd <crypto-dashboard-ui>
node /usr/local/lib/node_modules/apimocker/bin/apimocker -c ./apiMocker/config.json

Expected console logs like

crypto-dashboard-ui % node /usr/local/lib/node_modules/apimocker/bin/apimocker -c ./apiMocker/config.json
[apimocker] Loading config file: /Users/amandeeprehal/project/ReactConf/crypto-dashboard-ui/apiMocker/config.json
[apimocker] Set route: GET assets : allCurrencies.json 5 ms
[apimocker] Set route: GET assets/:currencyName/ : <no mockFile> 20 ms
[apimocker]  with switch on param: currencyName
[apimocker] Set route: GET assets/:currencyName/history : <no mockFile> 20 ms
[apimocker]  with switch on param: currencyName
[apimocker] Mock server listening on port 7878

  1. Comment coincap api and uncomment local api in file config.js -

 COINCAP_URL: 'https://api.coincap.io/v2'
 //COINCAP_URL: 'http://localhost:7878'

  1. Finally run
npm run dev

crypto-dash-react-india's People

Contributors

abhishek-jha-lab49 avatar amandeeprehal-lab49 avatar ashishrathour-lab49 avatar bp89 avatar pradeep-kumar-lab49 avatar vivekbisht-lab49 avatar vprjapati-lab49 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.