A monorepo containing the backend infrastructure services powering: Vunbox.com
A site providing transparency and auditability for the Wax Blockchain.
Each "app" is designed to serve a specific pourpose, we have listed them below.
feed- Arguably the most important app, listens for live socket events from the Wax API.wet- Grabs case information from the wax api and caches it locally in the db.stats- While generally named, Listens for changes in events and calculates user stats in realtime.casestats- Listens for changes in case events and calculates case stats in realtime.casesites- Listens for changes in case events and calculates casesite stats in realtime.api- Fetches data from various tables in the database, exposing a simple api.snapshots- Listens for changes in events and forms "snapshots" of stats each day.leaderboards- Forms leaderboards for various properties. WIP
This project is built and maintained using Node.js, RethinkDB & Yarn.
Required enviornment variables used by the various apps.
name- name of the app you want to runport- port to expose the app/apirethink.db- database name for rethinkdbrethink.host- host url/ip for rethinkdbrethink.port- port for rethinkdbrethink.user- username for rethinkdbrethink.password- password for rethinkdbgcloud.projectId- project id associated to the bucketgcloud.keyFilename- gcloud bucket credentialsgcloud.bucket- gcloud bucket name
name=api
port=9001
rethink.db=test
rethink.host=localhost
rethink.port=
rethink.user=
rethink.password=
# needed only for snapshots app
gcloud.projectId=
gcloud.keyFilename="./secrets/gcloud.json"
gcloud.bucket= curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh docker pull rethinkdb
docker run -d -P --name rethink1 rethinkdbBelow are some simple instructions on how to run an app.
- Create a
.envfile in the root directory using the template above. - Fillout the
.envtemplate with your relevant details. - Start the app name you defined using
yarn start- Alternatively, you can use various defined shorthand methods.
yarn feed,yarn stats,yarn api, ... ( see package.json )