blacksky-algorithms / rsky

ATProto Feed Generator built in Rust
https://blackskyweb.xyz
Apache License 2.0
47 stars 4 forks source link
blacksky bluesky diversity

Rsky ☣️ ☠️

An ATProtocol Feed Generator framework, built in Rust.

Ceasefire Now dependency status License

This is a starter kit for creating ATProto Feed Generators. It's not feature complete, but should give you a good starting ground off of which to build and deploy a feed. It is designed as 2 binaries: a firehose subscriber and an HTTP server for returning skeletons.

Overview

Feed Generators are services that provide custom algorithms to users through the AT Protocol.

They work very simply: the server receives a request from a user's server and returns a list of post URIs with some optional metadata attached. Those posts are then hydrated into full views by the requesting server and sent back to the client. This route is described in the app.bsky.feed.getFeedSkeleton lexicon.

A Feed Generator service can host one or more algorithms. The service itself is identified by DID, while each algorithm that it hosts is declared by a record in the repo of the account that created it. For instance, feeds offered by Bluesky will likely be declared in @bsky.app's repo. Therefore, a given algorithm is identified by the at-uri of the declaration record. This declaration record includes a pointer to the service's DID along with some profile information for the feed.

The general flow of providing a custom algorithm to a user is as follows:

For users, this should feel like visiting a page in the app. Once they subscribe to a custom algorithm, it will appear in their home interface as one of their available feeds.

Features

User Warning

This project comes as is. We provide no guarantee of stability or support, as the crates closely follow the needs of the BlackSky project.

If you use this project in a production environment, it is your responsibility to perform a security audit to ensure that the software meets your requirements.

Credits

This project would not have been possible without the great work done in:

A lot of the code was inspired and adapted from their work.