nexus_watcher/lib.rs
1//! # Nexus Watcher
2//!
3//! The `nexus-watcher` crate is responsible for monitoring a Pubky homeserver’s `/events` endpoint and processing
4//! events into the Nexus databases. It integrates with `nexus-common` to manage database connections (Neo4j and Redis),
5//! configuration, logging, metrics, and stack initialization.
6//!
7//! Key responsibilities include:
8//!
9//! - Listening to a homeserver’s events stream.
10//! - Processing various event types (posts, bookmarks, follows, mutes, tags, user updates, etc.).
11//! - Applying retry logic for events that fail to index.
12//! - Updating both the graph database and Redis indexes based on incoming events.
13//!
14//! The crate provides a builder interface via `NexusWatcher::builder()` and supports configuration from files.
15//! The main entry point is in `main.rs`, which simply calls the builder’s `run()` method to start the event loop.
16
17mod builder;
18pub mod events;
19
20pub use builder::{NexusWatcher, NexusWatcherBuilder};