collection of golang services under the Red Dwarf umbrella server.reddwarf.app
bluesky reddwarf microcosm appview
Go 99.5%
Other 0.5%
43 1 3

Clone this repository

https://tangled.org/whey.party/red-dwarf-server
git@tangled.org:whey.party/red-dwarf-server

For self-hosted knots, clone URLs may differ based on your setup.

readme.md

Red Dwarf Server#

Golang Monorepo for all server-sided Red Dwarf stuff

NOTE

uh im not very confident with the current directory structure, so files and folders might move around

Runnables#

run all of these using go run . inside the respective directories

/cmd/appview#

an appview, the api server that implements app.bsky.* XRPC methods.

development of the appview itself is on hold, but other parts of this red dwarf server repo are still being developed and will be used by the appview, probably, eventually

still very early in development

implemented routes:

  • app.bsky.actor.getProfiles
  • app.bsky.actor.getProfile
  • app.bsky.notification.listNotifications (placeholder)
  • app.bsky.labeler.getServices
  • app.bsky.feed.getFeedGenerators
  • app.bsky.feed.getPosts (post rendering is incomplete)
  • app.bsky.feed.getFeed (post rendering is incomplete)
  • app.bsky.unspecced.getConfig (placeholder)
  • app.bsky.unspecced.getPostThreadV2 (mostly working! doesnt use prefered sort, not performant yet)

/cmd/labelmerge#

queryLabel cache. uses a different XRPC method than the default queryLabels endpoint

  • /xrpc/app.reddwarf.labelmerge.queryLabels

the full lexicon schema is here

/cmd/backstream#

experimental backfiller that kinda (but not really) conforms to the jetstream event shape. designed to be ingested by consumers expecting jetstream

/cmd/aturilist#

experimental listRecords replacement. is not backfilled. uses the official jetstream go client, which means it suffers from this bug

Packages#

/auth#

taken from go-bsky-feed-generator but modified a bit.

handles all of the auth, modified to have a more lenient version to make getFeed work

/microcosm/*#

microcosm api clients, implements constellation slingshot and spacedust

slingshot's api client is compatible with github.com/bluesky-social/indigo/* stuff, like agnostic.RepoGetRecord and util.LexClient

/labelmerge/*#

labelmerge helpers, like:

  • a badger LRU (of unknown reliability)
  • labeler firehose ingester manager (still WIP, and unused)
  • lexicon generation files and the generated structs

/shims/*#

most of Red Dwarf Server logic lives here. pulls data from upstream services like microcosm constellation and slingshot, transforms it, and spits out bsky api -like responses using the published app.bsky.* codegen from github.com/bluesky-social/indigo/api/bsky

/sticket#

unused leftover sorry

/store#

unused leftover sorry

todo#

  • implement the many other parts of labelmerge
    • labeler firehose ingester, which will be used for:
      • keep caches up to date via firehose ingester
      • rolling cache of the latest few hours of labels
        • which will need a "was this record made in the latest few hours of labels" helper service
  • clean up /cmd/appview/main.go , its a mess
  • appview-side query caches
  • notification service
  • bookmarks service
  • create aturilist service
  • make backstream usable
  • create jetrelay service