Page cover

bring-forwardRun locally

How to locally run the frontend + backend

As the public websitearrow-up-right is limited in its ability to process all orderbook requests and update them dynamically, anyone can clone and launch the interface and adapt it to their needs.

By default, the orderbook.wtfarrow-up-right user interface simulates between 20 and 40 points on each side. A real orderbook would require 10x or 100x more simulations. So let's deploy locally.

By customising the backend, you can run your own unlimited orderbook simulations and use your own solver to customise the algorithm behind it.

You can start by cloning the repository herearrow-up-right.

The repository has a NextJS frontend and a Rust backend API.

The application is designed to be modular and can be launched effortlessly using docker compose.

The repo has the sdk and the frontend part as a submodule, so to clone it, do :

git clone --recurse-submodules https://github.com/0xMerso/tycho-orderbook-web web
cd web

It's important to have the following tree structure

tree -L 1
├── back
├── docker-compose.yaml
├── front
├── sdk
└── update.sh

If you prefer, step by step.

Docker Setup Instructions

Make sure Docker is installed and active. You can launch the whole stack with one shell script.

Or, step by step.

You can then access the UI at http://localhost:3000/

The swagger at http://localhost:42042/swagger

You can also use an SSH tunnel to view it from your local machine if you're running the docker compose on a remote server.

Local Setup Instructions

If you prefer to build and run the application directly, we provide shell scripts for simple startup. You will need to install Rust, Node, Redis.

Last updated

Was this helpful?