A real-time Bluesky emoji tracker built with Bun. This service connects to Bluesky's firehose and monitors posts for emoji usage, allowing clients to subscribe to specific emoji patterns and receive notifications in real-time. Read more about it and reach out on Bluesky @skorfmann and discuss
Skymood Relay aims to reduce client-side network traffic by an order of magnitude compared to connecting directly to Bluesky's Jetstream. While Jetstream provides a full firehose of Bluesky activities, Skymood Relay focuses specifically on emoji usage patterns, allowing clients to receive only the emoji-related data they're interested in. This targeted approach significantly reduces bandwidth requirements while still enabling real-time emoji tracking and analysis.
This can be easily adapted to similar scenarios where you need to filter and relay specific patterns from a larger data stream.
- 🔄 Real-time monitoring of Bluesky posts
- 🎯 Emoji filtering capabilities
- 🔌 WebSocket-based communication
- 🚀 Built with Bun for high performance
- 📊 Live client connection tracking
- Bun v1.1.34 or higher
- Clone the repository:
git clone https://github.com/yourusername/skymood-bun.git
cd skymood-bun
- Install dependencies:
bun install
Start the server:
bun run index.ts
The WebSocket server will be available at ws://localhost:3000
.
Build and run using Docker:
docker build -t skymood .
docker run -p 3000:3000 skymood
This project includes configuration for deployment on Fly.io. Deploy using:
fly launch
Send filter messages in the following format:
{
"type": "filter",
"emoji": "🚀" // The emoji to filter for
}
To clear filters:
{
"type": "filter",
"emoji": "clear"
}
The server sends three types of messages:
- Emoji Updates:
{
"type": "emojis",
"emojis": ["🚀", "💫"]
}
- Filtered Posts:
{
"type": "post",
"text": "Post content",
"url": "https://bsky.app/...",
"timestamp": 1234567890,
"emojis": ["🚀"]
}
- Client Count Updates:
{
"type": "clientCount",
"count": 5
}
MIT
Contributions are welcome! Please feel free to submit a Pull Request.