Giter VIP home page Giter VIP logo

kyber-tracker's Introduction

KyberTracker

Setup environment and run the app

Install system dependencies

  • NodeJS v8+
  • MariaDB v10+ (may use MySQL v5.7+ instead)

Install NodeJS global packages

$ npm install -g knex pm2

Checkout and install node packages from source code

$ git clone [email protected]:sotatek-dev/KyberTracker.git
$ cd KyberTracker
$ npm install

Create environment variables settings

$ cp .env.example .env // Then update the valid setting values in the .env file

Initialize the database schema and seeds data

$ npm run init-db
$ npm run seeds

Run the app

$ npm start

Code directory structure

The .env file

  • Store the environement variables
PORT=9009                     // The port that app will run in
NODE_ENV=development          // JS bundle files will be minified/compressed if the environment is production.
LOG_LEVEL=INFO                // Available options: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL

MYSQL_DB_HOST=127.0.0.1       // MySQL host address
MYSQL_DBNAME=kyber_tracker    // MySQL database name
MYSQL_USERNAME=root           // MySQL username
MYSQL_PASSWORD=1              // MySQL user password

The config directory

  • config/routes/api.js: View/add/update the API routes.
  • config/network/production: Configuration that is related to on-chain data
  • Almost don't need to touch other files.

The app/controllers directory

  • The first request's handler layer.

The app/crawlers directory

  • The process that crawls on-chain data to local database.

The app/models directory

  • The interface that interacts with MySQL database.

The app/services directory

  • The functions that will handle the main logic/business of the app

Maintenance

Add new token

  • Add data to config/network/production.js file.

Change the localization

  • Update values in json files under folder resources/lang.

kyber-tracker's People

Contributors

amory1206 avatar chubby-chocobo avatar duongpham avatar favadi avatar manhlx3006 avatar thith avatar toniqhz avatar vietthang207 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kyber-tracker's Issues

Can't locally deploy

Hi, I'm a researcher working on testing dapps. I would like to deploy kyber-tracker locally on my own machine. It seems the instructions in README.md is out-of-date. I tried to follow them and I have installed the dependencies (including mariadb and redis). Initialising database and start app using npm run init-db, npm run seeds and npm start shows no error but when I open localhost:8000 in the browser. I got a lot of errors and the page seems not working, as shown in the below screenshot.

Screenshot 2020-07-09 at 15 33 20 (2)

Could you provide some more instructions on deploying kyber-tracker locally? Thanks!

Change topbar items

Change topbar item to: 24H VOLUME - FEES TO BURN - FEES BURNED - KNC PRICE
And add tooltip for them:

  • 24H VOLUME: Network volume during the last 24 hours
  • FEES TO BURN: Total fees set aside to burn so far
  • FEES BURNED: Total fees that was burnt so far
  • KNC PRICE: Current KNC price
  • KNC PRICE % Change part: Percent changed comparing to price 24 hour ago

Some UI changes

Trade detail pages:

  • Fees To Burn (24h) -> the word "24h" is wrong, pls remove (should use a separate resource item for this)
  • When hover mouse over 24h/7D/1M/1Y/All, mouse cursor should turn to "hand"

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.