algodex / algodex-service

@algodex/service
GNU Affero General Public License v3.0
2 stars 1 forks source link

Algodex Service

This is the 2.0 backend (essentially a custom blockchain indexer) for Algodex and also includes the rewards calculations.

@algodex/service algodex/service:image

You can find the contribution guides for getting started in CONTRIBUTING.md

Algodex Documentation: https://docs.algodex.com

Getting Started

Todo: Below instructions are very incomplete!

Building rust rewards calculation on ubuntu

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install build-essential
sudo apt-get install pkg-config libssl-dev
cd rewards-calc
cargo build

Testing (Localhost with Docker Data)

First make sure CouchDB and Redis services are running according to .integration.test.env. The node.js should not be running as these will be started by the end-to-end test.

Quick Start for CouchDB and Redis Services

cp .testnet.docker.env .env
docker-compose up -f docker-compose.yml -f docker-compose.docker.yml

Set up reverse-proxy

(todo) The reverse proxy sits in front of algodex-service. The basic request flow is nginx -> reverse-proxy-rust -> algodex-service API

Some instructions are at https://github.com/algodex/reverse-proxy-rust

Integration Test Run

npm run end-to-end-light 

Core Packages

Core Services