README.md

atproto#

the AT Protocol. an open protocol for decentralized social applications.

philosophy#

atmospheric computing: a paradigm of "connected clouds." if traditional servers are "the cloud" (centralized, closed), the AT Protocol creates an "atmosphere" where millions of personal clouds float and interoperate.

  • sovereign: users run their own "personal cloud" (PDS) and own their identity.
  • connected: services aggregate data from these personal clouds to build shared experiences.
  • open: applications compete on service quality, not by locking away data.

architecture#

┌─────────┐     ┌─────────┐     ┌─────────┐
│   PDS   │     │   PDS   │     │   PDS   │    user repos
└────┬────┘     └────┬────┘     └────┬────┘
     │               │               │
     └───────────────┼───────────────┘
                     │ firehose
                     ▼
               ┌───────────┐
               │   Relay   │                   aggregates events
               └─────┬─────┘
                     │ firehose
       ┌─────────────┼─────────────┐
       ▼             ▼             ▼
  ┌─────────┐  ┌───────────┐  ┌─────────┐
  │ AppView │  │   Feed    │  │ Labeler │     consume & process
  │         │  │ Generator │  │         │
  └────┬────┘  └───────────┘  └─────────┘
       │
       │ read/write
       ▼
  ┌─────────┐
  │   PDS   │                                  back to user repos
  └─────────┘

components#

PDS (Personal Data Server) is your "personal cloud". it hosts your account, stores your data repo (a signed merkle tree), handles auth, and emits changes. users can migrate their PDS without losing identity or data.

Relay aggregates firehose streams from many PDSes into one. an optimization - downstream services subscribe to one relay instead of thousands of PDSes. multiple relays can exist; anyone can run one.

AppView indexes firehose data into queryable databases. serves the application UI - timelines, search, notifications. also proxies writes back to user PDSes. this is what most people think of as "the app."

Feed Generator subscribes to firehose, applies custom selection logic, returns post URIs on request. enables algorithmic choice - the "For You" feed on bluesky runs on someone's gaming PC.

Labeler produces signed metadata about content (spam, nsfw, etc). appviews and clients subscribe to labelers they trust. enables moderation without centralized control.

data flow#

  1. user creates a record (post, like, follow) via client
  2. client sends write to appview, which forwards to user's PDS
  3. PDS commits record to repo, emits event to firehose
  4. relay aggregates, downstream services consume
  5. appviews update their indices, labelers apply labels
  6. next time someone requests that content, appview serves from index

contents#

  • identity - DIDs, handles, resolution
  • data - repos, records, collections, references
  • lexicons - schema language, namespaces
  • firehose - event streaming, jetstream
  • auth - OAuth, scopes, permission sets
  • labels - moderation, signed assertions

sources#