Giter Club home page Giter Club logo

dvmdash's Introduction

dvmdash

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.

The project is pre-alpha. Main branch is not guaranteed to be stable.

A version of the website is running here:

https://dvmdash.live/

Install

  • Use Python3.11
    • As of May 13th, 2024, Python 3.12 is unsupported
  • If you are only using scripts/ (i.e. listengin for DVM events, you should only need requirements_backend.txt)

How to update javascript via npm

  • After you've added a new library to the package.json file and made any changes to webpack.config.js, you can run npm run build to update the javascript files in the static/ directory in the monitor/static/ directory.
  • Then run 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.

How to run this locally

  1. Run Mongita or a MongoDB locally

    • for example, run mongo locally:
      • ./mongod --dbpath ~/mongodb/data/db
  2. Run Neo4j

  3. (Optional) Run a local DVM

  4. (Optional) Run a local relay, such as bucket

    • this is helpful to test local dvms with the playground page, testing sending and receiving DVM events.

APOC Extension

  • Download the APOC library JAR file that matches your Neo4j version from the APOC releases page on GitHub: https://github.com/neo4j/apoc/releases
  • Copy the APOC JAR file to the plugins directory of your Neo4j installation. For example, if you're using Neo4j 4.x, the path would be neo4j-home/plugins/.
  • Open the neo4j.conf configuration file located in the conf directory of your Neo4j installation.
  • Uncomment or add the following line to the neo4j.conf file to enable the APOC library: dbms.security.procedures.unrestricted=apoc.*

Graph Structure

DVM_Process_Flow.png

The graph structure of events is stored in a Neo4j database.

Nodes:

  • Entity:
    • These have an npub, and contain all users and DVMs
  • Event:
    • These are Nostr events signed by Entities
  • Invoice:
    • Data that contains information for a payment. Events refer to these
  • Payment Receipt:
    • Data showing a receipt of purchase, such as a zap receipt.

Relationships:

Note that these are the primitive relationships. There will be other, inferred relationships later based on the primitive ones.

  • MAKES_EVENT: # Used any time an entity makes an event
    • Entity -> Event
  • FEEDBACK_FOR: # Used to connect a DVM feedback event to the original request
    • Event -> Event
  • RESULT_FOR: # Used to connect a DVM result event to the original request
    • Event -> Event
  • HAS_INVOICE: # Used to connect a feedback event to an invoice
    • Event -> Invoice
  • HAS_RECEIPT: # Used to connect an invoice to a payment receipt
    • Invoice -> Payment Receipt
  • PAYMENT_FROM: # Used to connect a payment receipt to the entity that paid
    • Payment Receipt -> Entity
  • PAYMENT_TO: # Used to connect a payment receipt to the entity that received the payment
    • Payment Receipt -> Entity

List of Relays to Watch for DVM Events

These are the relays where we watch for DVM events.

  • wss://nostr-pub.wellorder.net
  • wss://relay.damus.io
  • wss://nos.lol
  • wss://relay.primal.net
  • wss://offchain.pub
  • wss://nostr.mom
  • wss://relay.nostr.bg
  • wss://nostr.oxtr.dev
  • wss://relay.nostr.bg
  • wss://nostr-relay.nokotaro.com
  • wss://relay.nostr.wirednet.jp

dvmdash's People

Contributors

dtdannen avatar

Stargazers

Aljaz Ceru avatar Rif'at Ahdi Ramadhani avatar  avatar 22388o⚡️  avatar Cryptopath avatar arkinox avatar BoltC avatar

Watchers

 avatar Kostas Georgiou avatar

Forkers

22388o

dvmdash's Issues

Event format stats

For all events for a particular kind, compute the percentage that each field or subfield (ideally nested as far as it goes) is used.

This would give developers a good idea of what the most popular template for that kind.

For example, maybe 80% of kind 5100 put the user task as an "i" tag Va using the top level "content" field in the other 20%.

Then using this data, when a developer looks at any event, you can say how unusual that event template is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.