Search by

socialdept / atp-appview

socialdept

Build lexicon-driven AT Protocol AppViews in Laravel

Package info

github.com/socialdept/atp-appview

pkg:composer/socialdept/atp-appview

Statistics

Installs: 205

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

v0.4.7 2026-11-04 02:42 UTC

README

Build lexicon-driven AT Protocol AppViews in Laravel.


Warning

In early development. Nothing here is ready to use yet. Expect breaking changes until the first tagged release.

This package turns a Laravel application into an AT Protocol AppView. It syncs the collections you name from the network, keeps every record in your own database, and serves them through XRPC methods built from your lexicons. To learn all about it, head over to the documentation.

Here are a few short examples of what you can do. Name the collections to sync from the network:

// config/atp-appview.php
'ingest' => [
    'collections' => ['app.example.post', 'app.example.comment', 'app.example.like'],
],

Query what arrives with Eloquent:

Record::collection('app.example.post')->by($did)->latest('sort_at')->get();

Serve a collection straight from the index, with no handler to write:

// config/atp-appview.php
'xrpc' => [
    'collections' => ['com.example.listThings' => 'com.example.thing'],
],

Or write a handler of your own when the default is not enough:

#[Xrpc('com.example.getTimeline', auth: Auth::Required)]
class GetTimeline
{
    public function __invoke(XrpcRequest $request): array
    {
        return ['feed' => []];
    }
}

Beyond the core, turn on what your app needs, from feeds and search to moderation and notifications:

'features' => [
    Features::moderation(),
    Features::notifications(['latest' => 5]),
    Features::graph(),
],

It builds on atp-client for OAuth, service auth and forwarding, and on atp-schema for lexicons.

Documentation

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

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
npm test

Contributing

Please see CONTRIBUTING for details.

License

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