# 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](/labelmerge/lex/generation/defs/app.reddwarf.labelmerge.queryLabels.json) ### `/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](https://github.com/bluesky-social/jetstream/pull/45) ## Packages ### `/auth` taken from [go-bsky-feed-generator](https://github.com/jazware/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