DVMDash aims to be a monitoring and debugging tool for DVM activity on Nostr. Data Vending Machines (nip-90) offload computationally expensive tasks from relays and clients in a decentralized, free-market manner. They are especially useful for AI tools, algorithmic processing of user’s feeds, and many other use cases.
A version of the website is running here:
These instructions aren't complete but hopefully are helpful for those with some experience with Django, mongo db, and neo4j. Feel free to open an issue if you have any problems running this locally. We will write better instructions after we refactor the backend architecture.
git clone https://github.com/dtdannen/dvmdash.git
cd dvmdash
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -e . # this is so the general/ folder is available to the django app
Neo4j is used to store the graph of DVM events
./neo4j start
~/bin/neo4j-community-5.20.0/bin/neo4j start
http://localhost:7474/
Mongo DB should be straightforward
./mongod --dbpath ~/mongodb/data/db
Run the background scripts to start collecting DVM related events from relays. If you don't do this step, the django web app will not have any data or metrics to show. Run each one of them in their own terminal window. If running these on a server, consider screen
or run them as a cron job.
Run the Django web app
# ensure virtualenv is activated (i.e. source venv/bin/activate)
# ensure you're at the project root
python dvmdash/manage.py runserver
It may take a few seconds to connect to both neo4j and mongo databases. Once it's running, you can view the web app at http://localhost:8000/
npm run build
to update the javascript files in the static/ directory in the monitor/static/ directory.python dvmdash/manage.py collectstatic
to update the static files in the main staticfiles/ directory, which is where static files are served when running locally.Run a MongoDB locally
./mongod --dbpath ~/mongodb/data/db
Run Neo4j
./neo4j start
~/bin/neo4j-community-5.20.0/bin/neo4j start
http://localhost:7474/
(Optional) Run a local DVM
(Optional) Run a local relay, such as bucket
dbms.security.procedures.unrestricted=apoc.*
The graph structure of events is stored in a Neo4j database.
Note that these are the primitive relationships. There will be other, inferred relationships later based on the primitive ones.
These are the relays where we watch for DVM events.