| Crates.io | nexus-watcher |
| lib.rs | nexus-watcher |
| version | 0.4.1 |
| created_at | 2025-07-01 08:08:02.537325+00 |
| updated_at | 2025-07-01 11:40:39.678014+00 |
| description | Nexus Watcher constructs a social graph out of all of the events on pubky-core homeservers |
| homepage | https://github.com/pubky/pubky-nexus |
| repository | https://github.com/pubky/pubky-nexus |
| max_upload_size | |
| id | 1732886 |
| size | 526,615 |
Nexus Watcher is a service that monitors events from a Pubky homeserver and updates the Nexus databases accordingly.
It polls for events from the /events endpoint of a homeserver and processes them ensuring that the graph database (Neo4j) and Redis indexes remain synchronized.
Event Processing:
Processes various types of events such as posts, bookmarks, follows, mutes, tags, and user profile updates using pubky-app-specs object builder.
Retry Mechanism:
Supports retry logic for events that fail to index due to missing dependencies or other transient errors
Integration with Nexus Common:
Leverages shared components from the nexus-common crate for configuration, database access, logging, and stack management
Configurable and Extensible:
Provides a builder API to configure service parameters such as the homeserver Pubky ID, database settings, logging level, testnet mode, and more
Comprehensive Testing:
Comes with an extensive test suite covering all event types and error conditions
The main entry point is available via the builder in the nexus_watcher::builder module. For example, you can start the watcher using:
use nexus_watcher::builder::NexusWatcher;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
NexusWatcher::builder().run().await
}
Alternatively, if you prefer to load the configuration from a file:
use nexus_watcher::builder::NexusWatcher;
use std::path::PathBuf;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
NexusWatcher::start_from_path(PathBuf::from("path/to/config/folder")).await?;
Ok(())
}
This project is licensed under the MIT License.