A WebSocket server that accepts AT Protocol com.atproto.sync.subscribeRepos connections and polls the IC PDS canister for updates, broadcasting them to connected clients.
- WebSocket server accepting connections on
/xrpc/com.atproto.sync.subscribeRepos - Polls a configurable canister endpoint every 1 second
- Broadcasts updates as AT Protocol commits with incremental sequence numbers
- Handles client connections and disconnections gracefully
- Comprehensive activity logging
- Configurable via environment variables
- Ready for Fly.io deployment
npm installStart the server:
npm startThe server will listen on port 8080 by default.
Configure the server using environment variables:
PORT- Server port (default: 8080)CANISTER_URL- URL to poll for updates (default: https://CANISTER.ic0.app/updates)
Example:
PORT=3000 CANISTER_URL=https://mycanister.ic0.app/updates npm startConnect using any WebSocket client to:
ws://localhost:8080/xrpc/com.atproto.sync.subscribeRepos
Clients will receive updates in AT Protocol format:
{
"$type": "com.atproto.sync.subscribeRepos#commit",
"seq": 1,
"ops": [
{
"action": "create",
"path": "app.bsky.feed.post/abc123"
}
]
}MIT