···11# Red Dwarf Server
2233-Red Dwarf but as a Go AppView server instead of a React TypeScript SPA
33+Golang Monorepo for all server-sided Red Dwarf stuff
44+55+> [!NOTE]
66+> uh im not very confident with the current directory structure, so files and folders might move around
4755-you can use it right now by using `did:web:server.reddwarf.app` with any bluesky client that supports custom appviews (like for example [witchsky](https://witchsky.app/))
88+## Runnables
99+run all of these using `go run .` inside the respective directories
1010+1111+### `/cmd/appview`
1212+an appview, the api server that implements app.bsky.* XRPC methods.
1313+1414+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
615716still very early in development
817···1726- `app.bsky.unspecced.getConfig` (placeholder)
1827- `app.bsky.unspecced.getPostThreadV2` (mostly working! doesnt use prefered sort, not performant yet)
19282020-> [!NOTE]
2121-> uh im not very confident with the current directory structure, so files and folders might move around
2929+3030+### `/cmd/labelmerge`
3131+queryLabel cache. uses a different XRPC method than the default queryLabels endpoint
22322323-## Runnables
2424-run all of these using `go run .` inside the respective directories
3333+- `/xrpc/app.reddwarf.labelmerge.queryLabels`
25342626-### `/cmd/appview`
2727-the main entry point, the actual appview itself. the api server that implements app.bsky.* XRPC methods
3535+the full lexicon schema is [here](/labelmerge/lex/generation/defs/app.reddwarf.labelmerge.queryLabels.json)
28362937### `/cmd/backstream`
3038experimental backfiller that kinda (but not really) conforms to the jetstream event shape. designed to be ingested by consumers expecting jetstream
···44524553slingshot's api client is compatible with `github.com/bluesky-social/indigo/*` stuff, like `agnostic.RepoGetRecord` and `util.LexClient`
46545555+### `/labelmerge/*`
5656+labelmerge helpers, like:
5757+- a badger LRU (of unknown reliability)
5858+- labeler firehose ingester manager (still WIP, and unused)
5959+- lexicon generation files and the generated structs
6060+4761### `/shims/*`
4862most 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`
4963···57715872## todo
59737474+- implement the many other parts of labelmerge
7575+ - labeler firehose ingester, which will be used for:
7676+ - keep caches up to date via firehose ingester
7777+ - rolling cache of the latest few hours of labels
7878+ - which will need a "was this record made in the latest few hours of labels" helper service
6079- clean up /cmd/appview/main.go , its a mess
6180- appview-side query caches
6281- notification service