This repository builds a basic dashboard using data saved from the Mempool.space REST API. This data is persisted to a MongoDB instance by the mempool_api repo hosted on Railway and invoked every 5 minutes by a CRON job in Railway.
Clone the Repository:
git clone https://github.com/lone-starr/mempool_dashboard.git
cd mempool_dashboard
python3 -m venv .
Open VS Code from the mempool_dashboard directory:
code .
In VS Code press < Ctrl >< Shift >< p >, type Python and choose 'Python: Select Interpretor', choose the newly created venv for mempool_dashboard
Open a new Terminal in VS Code and use the following command to install the required dependencies. Your Python venv should be indicated in your terminal shell.
pip install -r requirements.txt
Create a .env file with the necessary credentials and API keys for your MongoDB instance. You can create a free cluster to host your collection at https://cloud.mongodb.com/ or create a MongoDB instance on Railway.
MONGO_URI=mongodb+srv://XXX:YYYYYYYYYYYY@clusterName.ZZZZZ.mongodb.net/?retryWrites=true&w=majority
Run the Streamlit App:
streamlit run app.py