Giter Site home page Giter Site logo

bsky-feeds-images's Introduction

Harke's Image Feeds

This code is a fork of https://github.com/Bossett/bsky-feeds by Bossett, which was originally a fork of the official Bluesky feed generator starter kit. Both repos contain lots of information about the mechanics of feed generation and how to publish feeds.

The feeds in this repo store all image posts off the firehose to a database and use authentication to provide user-specific feeds. This allows for users to only see posts from people they are following in the feed without manually setting up a feed.

Hosting

This feed is hosted on Digital Ocean which was achieved by following the guide written by Bossett. It walks you through setup of the app and gives Bossett some affiliate credit for putting all of this together. Given the high volume of image posts I recommend using the $10 application tier instead of the $5 testing tier recommended in the guide, but ymmv.

Feeds

After Dark Feed

Currently the only feed, watches for any NSFW images and serves the user any images created by people they follow.

Feed at https://bsky.app/profile/did:plc:bfuck3vwwacatltdmnilloym/feed/mutuals-ad

Usage

I run this with Digital Ocean App Platform, with their MongoDB as an attached service. Instructions for setting this up can be found in the above guide.

Database

The DB could feasibly be swapped out for any other, and there are lots of changes that could make it more efficient. However, if you're new I recommend using the provided dbClient.

Docker

I am deploying with Docker rather than the default Node containers. This was more important early on for control over the exact Node version, as certain dependencies were linked tightly to Node 18.

Adding Feeds

The tool is built to have each algorithm self-contained within a file in src/algos. Each algorithm should export both a handler function and manager class (that can inherit from algoManager). The manager is expected to implement filter methods (e.g. filter_post) that will match events that the algorithm will later deal with.

Where there's a match, the post will be stored in the database, tagged for the algorithm that matched. This can be used later in the handler function to identify posts that the algorithm should return.

Feeds will have periodicTask called every X minutes from the environment setting in FEEDGEN_TASK_INTEVAL_MINS - this is for things like list updates, or time consuming tasks that shouldn't happen interactively.

Labels are fetched periodically via the batchUpdate function.

Major TODOs

  • TODO: Add filtering for manual tagging in alt text
  • TODO: Add feed for "Home+" which shows posts from "friends of friends"
  • TODO: Add feed pinning

bsky-feeds-images's People

Contributors

bossett avatar harkebark avatar dependabot[bot] avatar futurgh avatar

Stargazers

Burner avatar

Forkers

trickhyena

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.