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
- Add
ferrisletter-connectoras a dependency from crates.io - Implement the
Connectortrait for your source - Register your connector in the server configuration
- Items from your connector will appear alongside other content in the user's feed
Resources
- ferrisletter-connector on crates.io
- GitHub repository — see
crates/connector-rssfor a reference implementation