Skip to content

wilfredallyn/conduit

Repository files navigation

Conduit

Objectives

This project is a prototype app for analyzing nostr data to help with search, discovery, and onboarding.

Live Demo

[add url] (Note: db contains mostly events from 2023-11-14 to 2023-11-21)

Features

  • Vectorizes content with embeddings to enable semantic search across different kinds
  • Uses nix to setup infrastructure to:
    • Parse nostr events from strfry database
    • Load events into vector (weaviate) and graph (neo4j) databases
    • Query data using plotly dash app with interactive python visualizations

Usage

  • Install Nix package manager to setup databases (weaviate and neo4j)
  • Start nix:
    • nix develop
  • Download nostr events using strfry
  • Export nostr events from strfry database as json (for neo4j import):
    • strfry export dbdump.jsonl
  • Start weaviate docker container:
    • docker compose up -d
  • Create .env file with environment variables:
    • cp .env.example .env
    • Set STRFRY_DB_FOLDER, NEO4J_IMPORT_DIR to correct directories
  • Start Neo4j
    • neo4j start
  • Run python script main.py:
    • python -m conduit.main
    • create weaviate classes
    • load events into weaviate
    • load data into neo4j
  • Start plotly dash app:
    • python -m conduit.app
  • Go to browser to use app:
    • http://localhost:8050/: home page summarizes the number of events in db

      home
    • Search tab (src): find events related to search phrase using vector-based similarity

      search
    • Network tab (src): show network-level metrics such as most active, followed, and targeted users

      network
    • User tab (src): show user metrics such as histogram of created events (broken down by kind, day of week, and hour of day) and biggest fan (user with the most mentions/reactions to those events)

      user
    • Neo4j tab (src): link to neo4j browser

      neo4j

Tools/Software Used

Future Plans

  • TBD

About

Prototype for Analyzing Nostr Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published