bluesky appview implementation using microcosm and other services server.reddwarf.app
appview bluesky reddwarf microcosm
1# Red Dwarf Server 2 3Red Dwarf but as a Go AppView server instead of a React TypeScript SPA 4 5you 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/)) 6 7still very early in development 8 9implemented routes: 10- `app.bsky.actor.getProfiles` 11- `app.bsky.actor.getProfile` 12- `app.bsky.notification.listNotifications` (placeholder) 13- `app.bsky.labeler.getServices` 14- `app.bsky.feed.getFeedGenerators` 15- `app.bsky.feed.getPosts` (post rendering is incomplete) 16- `app.bsky.feed.getFeed` (post rendering is incomplete) 17- `app.bsky.unspecced.getConfig` (placeholder) 18- `app.bsky.unspecced.getPostThreadV2` (mostly working! doesnt use prefered sort, not performant yet) 19 20> [!NOTE] 21> uh im not very confident with the current directory structure, so files and folders might move around 22 23## Runnables 24run all of these using `go run .` inside the respective directories 25 26### `/cmd/appview` 27the main entry point, the actual appview itself. the api server that implements app.bsky.* XRPC methods 28 29### `/cmd/backstream` 30experimental backfiller that kinda (but not really) conforms to the jetstream event shape. designed to be ingested by consumers expecting jetstream 31 32### `/cmd/aturilist` 33experimental 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) 34 35## Packages 36 37### `/auth` 38taken from [go-bsky-feed-generator](https://github.com/jazware/go-bsky-feed-generator) but modified a bit. 39 40handles all of the auth, modified to have a more lenient version to make `getFeed` work 41 42### `/microcosm/*` 43microcosm api clients, implements constellation slingshot and spacedust 44 45slingshot's api client is compatible with `github.com/bluesky-social/indigo/*` stuff, like `agnostic.RepoGetRecord` and `util.LexClient` 46 47### `/shims/*` 48most 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` 49 50 51### `/sticket` 52unused leftover sorry 53 54 55### `/store` 56unused leftover sorry 57 58## todo 59 60- clean up /cmd/appview/main.go , its a mess 61- appview-side query caches 62- notification service 63- bookmarks service 64- create aturilist service 65- make backstream usable 66- create jetrelay service