Building Connectors

Ferrisletter's connector system is pluggable — anyone can build a connector to bring in content from any source. RSS feeds, APIs, databases, scrapers — if you can fetch it, you can serve it.

The Connector trait

At its core, a connector implements a single trait:

connector.rs
#[async_trait]
pub trait Connector: Send + Sync {
    /// Fetch items from this content source.
    async fn fetch_items(&self) -> Result<Vec<Item>>;

    /// A human-readable name for this source.
    fn source_name(&self) -> &str;
}

The Item struct contains fields for headline, summary, source URL, publication date, topic, and tags.

Built-in connectors

  • connector-rss — Fetches items from RSS and Atom feeds
  • connector-static — Serves items from a static JSON file (useful for testing)

Getting started

  1. Add ferrisletter-connector as a dependency from crates.io
  2. Implement the Connector trait for your source
  3. Register your connector in the server configuration
  4. Items from your connector will appear alongside other content in the user's feed

Resources