Overview
A Feed Generator is Bluesky’s mechanism for algorithmic feeds. You can publish a custom feed tailored to specific keywords, user conditions, or any logic you choose. Withlaravel-bluesky, building a Feed Generator on a Laravel application is straightforward.
Official tutorial: Write a Custom Feed
Official starter kit: bluesky-social/feed-generator
Register a FeedGenerator algorithm
The simplest approach is to register an algorithm closure inAppServiceProvider::boot().
name must be a URL-safe string.
The algorithm must return an array containing cursor and feed.
http://localhost/xrpc/app.bsky.feed.getFeedSkeleton?feed=at://did:web:example.com/app.bsky.feed.generator/artisanhttp://localhost/xrpc/app.bsky.feed.describeFeedGeneratorhttp://localhost/.well-known/did.json- The service DID is derived from the current URL (e.g.
did:web:example.com).
Publish the feed generator
Implementing the Feed Generator in your Laravel app doesn’t make it visible on Bluesky. You need to create and run a command that callspublishFeedGenerator.
1
Generate the command
2
Implement the command
3
Run the command
publishFeedGenerator any number of times — it simply updates the existing record.Create multiple feed generators
Register as many feeds as you need by using a differentname each time.
publishFeedGenerator once for each feed in your publish command.
Separate algorithm class
Instead of a closure, you can implement a dedicated callable class. This keeps yourAppServiceProvider clean and makes each algorithm independently testable.
Authentication
The authentication check from the official starter kit is enabled by default. To disable it, pass a closure tovalidateAuthUsing that simply returns the user DID.
Advanced usage
Use Artisan commands and task scheduling to save posts to a database. Your algorithm then only needs to query the DB, giving you fast feed responses without live API calls.Source: docs/feed-generator.md