i've been building pollen over the last few days, and i honestly haven't had to build much of it myself because there are a ton of open source tools just there at my disposal. the protocol is open enough that people build shared tools. you don't have to use the official stuff. pollen uses three services from microcosm, which builds open infrastructure for the atproto ecosystem. you can support the work here.
slingshot: identity caching
when you see a post, the author isn't stored as "@jay.bsky.team" - it's stored as did:plc:oky5czdrnfjpqslsw2a5iclo. the handle is resolved separately.
atproto has a few ways to resolve identity:
DNS TXT records - check
_atproto.handle.examplefor a DID.well-known - fetch
https://handle.example/.well-known/atproto-didplc.directory - the DID registry, authoritative for
did:plc:identifiers
for DID β handle (what you need for displaying posts), you hit plc.directory and read the alsoKnownAs field from the DID document.
works fine but it's a lot of round trips when you're loading 50 posts from 50 different people :(
slingshot is an edge cache that subscribes to the firehose and keeps identity data ready to go:
GET https://slingshot.microcosm.blue/xrpc/com.bad-example.identity.resolveMiniDoc?identifier=jay.bsky.team
returns:
{
"did": "did:plc:oky5czdrnfjpqslsw2a5iclo",
"handle": "jay.bsky.team",
"pds": "https://morel.us-east.host.bsky.network",
"signing_key": "zQ3sht..."
}pass a handle, get the DID. pass a DID, get the handle. also get the PDS url for free, which is useful if you need to fetch records.
in pollen i use slingshot first with fallback to the standard resolution methods if it's down.
constellation: backlink tracking
the second problem: engagement. when someone likes or reposts a bluesky post, that record lives in their repo, not on the post itself. there's no magic "get all likes" endpoint that works across the network.
constellation solves this by indexing backlinks across the firehose. it tracks when records point to other records - likes pointing to posts, reposts pointing to posts, follows pointing to profiles.
GET https://constellation.microcosm.blue/xrpc/blue.microcosm.links.getBacklinks
?subject=at://did:plc:xyz/app.bsky.feed.post/abc123
&source=app.bsky.feed.like:subject.urireturns everyone who liked that post:
{
"total": 2,
"records": [
{ "did": "did:plc:abc", "collection": "app.bsky.feed.like", "rkey": "xyz123" },
{ "did": "did:plc:def", "collection": "app.bsky.feed.like", "rkey": "xyz456" }
],
"cursor": null
}pollen uses this to warm up engagement data - i fetch likes/reposts on your bluesky-crossposted posts so you can see who engaged. at some point it will do this in the background, but for now with just me using it, this works great.
there's also a lightweight count endpoint:
GET https://constellation.microcosm.blue/links/count/distinct-dids
?target=at://did:plc:xyz/app.bsky.feed.post/abc123
&collection=app.bsky.feed.like
&path=.subject.urispacedust: real-time interactions
constellation gives you historical data, but what about real-time? that's where spacedust comes in.
spacedust is a websocket firehose filtered to just the interactions you care about. you subscribe with a list of DIDs you want to watch, and it streams likes/reposts as they happen:
wss://spacedust.microcosm.blue/subscribe
?targetDid=did:plc:xyz
&targetDid=did:plc:abc
&wantedCollections=app.bsky.feed.like
&wantedCollections=app.bsky.feed.repostwhen someone likes a post by one of your watched DIDs, you get an event immediately:
{
"kind": "link",
"did": "did:plc:someone",
"time_us": 1706745600000000,
"link": {
"target": "at://did:plc:xyz/app.bsky.feed.post/abc123",
"collection": "app.bsky.feed.like",
"path": "subject.uri",
"rkey": "3abc..."
}
}pollen keeps a spacedust connection open to track engagement on cross-posted content in real-time. when you cross-post to bluesky and someone likes it there, the activity shows up in your pollen feed within seconds. also the reaction feature on pollen itself works this way.
this is the part that makes me genuinely excited about community infrastructure. constellation + spacedust together give you the same capabilities as bluesky's own engagement tracking, but for any atproto app. someone built this because they thought it would be useful, published it openly, and now I get to benefit from it π
why this matters
bluesky runs their own versions of these - profile resolution and the public API for likes/reposts. but those are bluesky-specific.
constellation works with any lexicon. pollen reactions (place.pollen.reaction) are indexed the same way bluesky likes are. slingshot works with any DID, not just bluesky accounts.
if someone builds a new app tomorrow that uses atproto, these tools already work with it and that is so coooool!!!
links
slingshot - identity caching
constellation - backlink index
spacedust - real-time interactions
microcosm - the site for the various pieces of infrastructure
sponsor uniphil - give support on github sponsors. community infrastructure only works if the community supports it!
plc.directory - the DID registry