Signal is a Laravel package that lets you respond to real-time events from the AT Protocol network. Build reactive applications, custom feeds, moderation tools, analytics systems, and AppViews by listening to posts, likes, follows, and other social interactions as they happen across Bluesky and the entire AT Protocol ecosystem.
Think of it as Laravel's event listeners, but for the decentralized social web.
- Laravel-style code - Familiar patterns you already know
- Real-time processing - React to events as they happen
- Three consumption modes - Jetstream (efficient JSON), Firehose (comprehensive CBOR), or Obelisk (replayable archive delivery)
- AppView ready - Full support for custom collections and protocols
- Production features - Queue integration, cursor management, auto-reconnection
- Easy filtering - Target specific collections, operations, and users with wildcards
- Built-in testing - Test your signals with sample data
use SocialDept\AtpSignals\Events\SignalEvent;
use SocialDept\AtpSignals\Signals\Signal;
class NewPostSignal extends Signal
{
public function eventTypes(): array
{
return ['commit'];
}
public function collections(): ?array
{
return ['app.bsky.feed.post'];
}
public function handle(SignalEvent $event): void
{
$record = $event->getRecord();
logger()->info('New post created', [
'did' => $event->did,
'text' => $record->text ?? null,
]);
}
}Run php artisan signal:consume and start responding to every post on Bluesky in real-time.
composer require socialdept/atp-signals
php artisan signal:installThat's it. Read the installation docs →
Once installed, you're three steps away from consuming AT Protocol events:
php artisan make:signal NewPostSignalpublic function collections(): ?array
{
return ['app.bsky.feed.post'];
}php artisan signal:consumeYour Signal will now handle every matching event from the network. Read the quickstart guide →
- Custom feeds - Curate content based on your own algorithms
- Moderation tools - Detect and flag problematic content automatically
- Analytics platforms - Track engagement, trends, and network growth
- Social integrations - Mirror content to other platforms in real-time
- Notification systems - Alert users about relevant activity
- AppViews - Build custom AT Protocol applications with your own collections
Getting Started
- Installation - Detailed setup instructions
- Quickstart Guide - Build your first Signal
- Jetstream vs Firehose - Choose the right mode
Building Signals
- Creating Signals - Complete Signal reference
- Filtering Events - Target specific collections and operations
- Queue Integration - Process events asynchronously
Obelisk Mode
- Obelisk Mode - Archive-backed delivery, push or pull, with replay
Advanced
- Configuration - All config options explained
- Testing - Test your Signals
- Examples - Real-world use cases
public function collections(): ?array
{
return ['app.bsky.graph.follow'];
}public function collections(): ?array
{
return ['app.bsky.feed.*'];
}
public function shouldQueue(): bool
{
return true; // Process in background
}public function collections(): ?array
{
return ['app.yourapp.custom.collection'];
}Signal supports three modes for consuming AT Protocol events:
- Jetstream (default) - Simplified JSON events with server-side filtering. Speaks
either wire version: v1 (
time_uscursors), or v2 (SIGNAL_JETSTREAM_VERSION=2) with seq cursors, a server-side kinds filter, repo-divergencesyncevents, andCursorOutdatedadvisories surfaced as a Laravel event - Firehose - Raw CBOR/CAR format with client-side filtering
- Obelisk - Replayable delivery from a self-hosted record archive, by webhook or by polling
Learn more about modes → | Learn more about Obelisk →
Match multiple collections with patterns:
public function collections(): ?array
{
return [
'app.bsky.feed.*', // All feed events
'app.bsky.graph.*', // All graph events
'app.yourapp.*', // All your custom collections
];
}Process events asynchronously for better performance:
public function shouldQueue(): bool
{
return true;
}# Install Signal
php artisan signal:install
# Create a new Signal
php artisan make:signal YourSignal
# List all registered Signals
php artisan signal:list
# Start consuming events (Jetstream/Firehose/Obelisk)
php artisan signal:consume
# Test a Signal with sample data
php artisan signal:test YourSignal
# Obelisk management
php artisan signal:obelisk:subscribe --execute # Create/update this app's webhook subscription
php artisan signal:obelisk:status # Archive health, subscriptions, cursors
php artisan signal:obelisk:rewind {cursor} --name=my-app --execute # Replay from a cursor
php artisan signal:obelisk:pull # Drain new events once and exit- PHP 8.2+
- Laravel 11+
- WebSocket support (enabled by default)
Found a bug or have a feature request? Open an issue.
Want to contribute? We'd love your help! Check out the contribution guidelines.
- Miguel Batres - founder & lead maintainer
- All contributors
Signal is open-source software licensed under the MIT license.
Built for the Atmosphere • By Social Dept.
