The dashboard service provides a suite of dashboards using streamlit. The dashboards are designed to use the data marts created by the transformers service.
The service runs as a docker container, and is started along with the other services in the docker compose setup. The dashboard is available at the port set by the DASHBOARD_PORT environment variable, which defaults to 8501.
The secrets_default.toml file contains default environment variables for this services. To override the defaults, create a secrets.toml file at .streamlit/secrets.toml and add the environment variables you want to override. Then, update the docker-compose.yml file to mount the secrets file as a volume. Learn more about streamlit secrets here.
The dashboard service consists of a page in the pages directory which corresponds to a network (OP mainnet, Base Sepolia, Base Mainnet, etc.) Each page is set up to import a set of modules from the modules directory. To add new modules:
- Create a new python file in the
modulesdirectory for the corresponding network - Import the module in the
pagesfile for the corresponding network - Add the module to the
pagesdictionary for that page