This is the implementation of the Bluesky Contributors feed. Generated using the bluesky-social/feed-generator template.
The feed is generated by looking for contributors in the Bluesky repositories on GitHub. The list of repositories is defined in the repositories
array in src/findContributors.ts
.
The feed is generated using the following steps:
- Retrieve the list of contributors from GitHub using the GitHub API.
- Look for Bluesky handles in the GitHub profiles of the contributors.
- Store the list of contributors in SQLite.
- At the same time, the server is always listening for new events from the Bluesky Firehose.
- When a new event is received, we check if the event is a
Post
event and if the author of the post is in the list of contributors. - If the author is in the list of contributors, we add the post to the feed.
The feed is available at https://bsky.app/profile/did:plc:pe5lhpot2jvtxribylimv2is/feed/bskycontribs
First, good luck! This is a bunch of hacky code that I wrote while learning how to use the Firehose, and it's not very well documented.
Most of the code is similar to the bluesky-social/feed-generator template, but with some modifications to allow the following:
- Retrieve the list of contributors from GitHub
- Parallelize the processing of Firehose events using node workers
- Deploy to Fly.io
If you want to use this feed as a template, keep in mind the following:
- Copy
.env.example
to.env
and fill in the required values, make sure to follow the instructions in the comments. - Run
yarn
to install the dependencies. - You can update the list of repositories to look for contributors in the
repositories
array insrc/findContributors.ts
. - You'll need to figure out how to deploy this if you don't want to use Fly.io. The
fly.toml
file is included in the repository, but you'll need to set up your own Fly.io account and app and update thefly.toml
file with your app name. You'll also need to set theFEEDGEN_GITHUB_TOKEN
secret in your Fly.io app. Other environment variables are configured in thefly.toml
file.
Feel free to ask me any questions on Bluesky at @horus.dev.
If you want to contribute to this feed, please open an issue or reach out to me on Bluesky at @horus.dev first. I'm happy to accept contributions, but I want to make sure that we're on the same page before you start working on something.