New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

socialdept/atp-signals

Build Reactive Signals for Bluesky's AT Protocol Firehose in Laravel
1,544 4
Install
composer require socialdept/atp-signals
Latest Version:v2.3.3
PHP:^8.3
Laravel:11 · 12 · 13
License:MIT
Last Updated:Nov 7, 2026
Links: GitHub  ·  Packagist
Maintainer: socialdept

Signal Header

Consume real-time AT Protocol events in your Laravel application.



This package lets a Laravel application react to AT Protocol events as they happen. A Signal is a class that names the events it wants, by event type, collection, operation or DID, and handles each one, in the consumer process or on a queue. Events come from Jetstream, the firehose or an Obelisk archive, and the cursor is saved so a restarted consumer resumes where it stopped. For code that keeps its own cursor, Jetstream v2 and labeler streams deliver events and labels in batches. To learn all about it, head over to the documentation.

Here are a few short examples of what you can do. Write a Signal that handles every new post:

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
    {
        logger()->info('New post', [
            'did' => $event->did,
            'text' => $event->getRecord()->text ?? null,
        ]);
    }
}

Match several collections with a wildcard, and only the operations you care about:

use SocialDept\AtpSignals\Enums\SignalCommitOperation;

public function collections(): ?array
{
    return ['app.bsky.feed.*', 'app.bsky.graph.*'];
}

public function operations(): ?array
{
    return [SignalCommitOperation::Create];
}

Handle events on a queue instead of in the consumer:

public function shouldQueue(): bool
{
    return true;
}

Then start consuming:

php artisan signal:consume

Documentation

You'll find the documentation on https://socialde.pt/docs/atp-signals.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving it? Feel free to create an issue on GitHub.

Testing

vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see LICENSE for more information.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

660,512,042 9,702
laravel/framework

The Laravel Framework.

617,629,957 34,997
laravel/tinker

Powerful REPL for the Laravel framework.

524,145,802 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

442,489,569 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

418,503,470 4,663

Version History

Version Released PHP Laravel License
v2.3.3 ^8.3 ^11.0|^12.0|^13.0 MIT
v2.3.2 ^8.3 ^11.0|^12.0|^13.0 MIT
v2.3.1 ^8.3 ^11.0|^12.0|^13.0 MIT
v2.3.0 ^8.3 ^11.0|^12.0|^13.0 MIT
v2.2.1 ^8.3 ^11.0|^12.0|^13.0 MIT