Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

AppView

Colibri’s AppView is what a conventional full-stack application calls the backend. It serves the XRPC API and the event socket, holds each Space’s credentials and writes records on its behalf, keeps a synced copy of every ATproto space it serves, sends push notifications, and hosts the voice SFU.

A typical atproto AppView subscribes to a relay, consumes a firehose of public records, and indexes what it cares about. Colibri’s data lives in ATproto spaces, and there is no relay for permissioned data.

The AppView pulls each member’s repository from that member’s own host, holding a credential the Space issued it. Sync covers how that works.

Some data reaches the AppView another way. Public records such as profiles and custom emoji arrive over Jetstream. The space repositories of a member whose PDS cannot hold them are written to the AppView directly, as Hosting describes.

Colibri AppView architectureThe client sends requests through the user's PDS to the AppView and opens a direct WebSocket to it for live events. The Space's PDS asks the AppView whether a user may read a space, and the AppView writes the Space's records back to it. Holding a space credential, the AppView pulls each member's repository from that member's own host and stores what it reads locally.subscribeEvents (direct WS connection)requestsservice authSpace writescheckAccesslistRepoOps / getReporead / writeClientSolidJS UIYour PDSATproto proxySpace PDSspace authorityMember reposown PDS or polyfillLocal storelibSQL or PostgresAppViewNode

Every ATproto space of a Colibri Space except its public profile space uses a managed-space policy naming the AppView, so the Space’s PDS calls com.atproto.managedspace.checkAccess before it issues a credential for one.

When the AppView cannot be reached from wherever the Space’s PDS runs, its Spaces are unreadable while the PDS itself is healthy. The PDS answers UpstreamFailure for the duration, and writes made during the outage enter the writer set once their host retries them after the AppView is back.

We are considering changing this in the future.

Clients authenticate with an atproto service auth JWT that their own PDS minted for one specific method, sent in the Authorization header. The usual way to get one is to call the AppView through the user’s PDS with an atproto-proxy header, which makes the PDS mint and attach the token.

On top of the standard checks, the AppView enforces a maximum token lifetime, 300 seconds by default (SERVICE_AUTH_MAX_LIFETIME_SECONDS). It rejects a token whose issuer set an expiry further ahead than that.

Voice and video run on a mediasoup SFU inside the AppView, on nodes that hold the voice role. Session setup and control happen over the social.colibri.beta.voice.subscribeSignals subscription, a WebSocket that carries JSON frames. Media flows over the WebRTC transports negotiated there. Acting on someone else in a call is the social.colibri.beta.voice.moderate procedure.

  • ATproto Spaces: the primitive the AppView builds on.
  • Colibri Spaces: what a Space is made of.
  • Sync: keeping a copy of an ATproto space current without a relay.
  • Storage: what lands in the database and what can be rebuilt.
  • Hosting: the spaces polyfill and bring-your-own hosting.
  • Specification: the endpoint and event reference.
  • Self-hosting: running one.