Connects to the Bluesky Jetstream WebSocket firehose and republishes post-create events to a Redis Pub/Sub channel. This allows multiple downstream consumers to subscribe to the Redis channel independently, without each needing its own Jetstream connection.
- Opens a WebSocket connection to one of the Jetstream endpoints (US-East / US-West, with automatic failover across four servers).
- Filters for
app.bsky.feed.postevents and validates them with Zod via@vinerima/jetstream-types. - Publishes each validated post-create event as JSON to a configurable Redis Pub/Sub channel.
- Node.js (v18+)
- A running Redis instance
| Variable | Default | Description |
|---|---|---|
REDIS_URL |
redis://localhost:6379 |
Redis connection string |
REDIS_CHANNEL |
jetstream:posts |
Pub/Sub channel name |
pnpm installThe relay requires a running Redis instance. If you don't have one, install and start it:
# macOS (Homebrew)
brew install redis
brew services start redis
# or run in the foreground
redis-server# Docker
docker run -d --name redis -p 6379:6379 redis:7-alpineTo use a remote or non-default Redis instance, set REDIS_URL:
export REDIS_URL=redis://your-host:6379# development
pnpm start
# production
pnpm build
node dist/index.jsYou can verify events are flowing by subscribing to the channel in a separate terminal:
redis-cli SUBSCRIBE jetstream:posts@vinerima/wah— WebSocket client with reconnection, failover, and schema-based message handling@vinerima/jetstream-types— Zod schemas for Jetstream event typesioredis— Redis client
MIT