Giter Site home page Giter Site logo

bulwark-explorer's Introduction

Bulwark Logo

Bulwark Explorer · GitHub license Build Status Discord GitHub version

Simple cryptocurrency block explorer system.

Required

This repo assumes git, mongodb, node, yarn, and are installed with configuration done. Please adjust commands to your local environment.

Download links:

https://docs.mongodb.com/manual/administration/install-on-linux/

https://nodejs.org/en/download/package-manager/

https://yarnpkg.com/lang/en/docs/install/

It is also required to have the Bulwark daemon running in the background. It is recommended to set this up before beginning to set up the explorer so that it syncs by the time you need it.

Our geniuses here at BulwarkCorp™ have put together a script to do this for you. Just run

bash script/bulwarkd_setup.sh

This will install the latest Bulwark wallet and create a rpc username/password before starting the daemon.

Install

git clone https://github.com/bulwark-crypto/bulwark-explorer.git - copy repo to local folder.

cd blockex - change into project directory.

yarn install - install packages used by the system.

Configure

BlockEx API Configuration

cp config.template.js config.js - setup configuration using template.

Database Configuration

mongo - connect using mongo client.

use blockex - switch to database.

db.createUser( { user: "blockexuser", pwd: "Explorer!1", roles: [ "readWrite" ] } ) - create a user with the values stored in the config.js file from above, meaning they should match.

exit - exit the mongo client.

Crontab

The following automated tasks are currently needed for BlockEx to update but before running the tasks please update the cron script /path/to/blockex/script/cron_block.sh for the block with the local /path/to/node.

yarn run cron:coin - will fetch coin related information like price and supply from coinmarketcap.com.

yarn run cron:masternode - updates the masternodes list in the database with the most recent information clearing old information before.

yarn run cron:peer - gather the list of peers and fetch geographical IP information.

yarn run cron:block - will sync blocks and transactions by storing them in the database.

yarn run cron:rich - generate the rich list.

Note: is is recommended to run all the crons before editing the crontab to have the information right away. Follow the order above, start with cron:coin and end with cron:rich.

To setup the crontab please see run crontab -e to edit the crontab and paste the following lines (edit with your local information):

*/1 * * * * cd /path/to/blockex && ./script/cron_block.sh >> ./tmp/block.log 2>&1
*/1 * * * * cd /path/to/blockex && /path/to/node ./cron/masternode.js >> ./tmp/masternode.log 2>&1
*/1 * * * * cd /path/to/blockex && /path/to/node ./cron/peer.js >> ./tmp/peer.log 2>&1
*/1 * * * * cd /path/to/blockex && /path/to/node ./cron/rich.js >> ./tmp/rich.log 2>&1
*/5 * * * * cd /path/to/blockex && /path/to/node ./cron/coin.js >> ./tmp/coin.log 2>&1

Build

At this time only the client web interface needs to be built using webpack and this can be done by running yarn run build:web. This will bundle the application and put it in the /public folder for delivery.

Run

yarn run start:api - will start the api.

yarn run start:web - will start the web, open browser http://localhost:8081.

Test

yarn run test:client - will run the client side tests.

yarn run test:server - will test the rpc connection, database connection, and api endpoints.

To-Do

  • Write more tests
  • Cluster support for api

bulwark-explorer's People

Contributors

dustinengle avatar dummyuser avatar ff899f avatar kaneohunter avatar raikzer avatar bigalan09 avatar lyght1337 avatar penple03 avatar imprecation avatar u74r0 avatar

Watchers

James Cloos avatar xinfushe 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.