Home

Awesome

AT Protocol Reference Implementation (TypeScript)

Welcome friends!

This repository contains Bluesky's reference implementation of AT Protocol, and of the app.bsky microblogging application service backend.

What is in here?

TypeScript Packages:

PackageDocsNPM
@atproto/api: client libraryREADMENPM
@atproto/common-web: shared code and helpers which can run in web browsersREADMENPM
@atproto/common: shared code and helpers which doesn't work in web browsersREADMENPM
@atproto/crypto: cryptographic signing and key serializationREADMENPM
@atproto/identity: DID and handle resolutionREADMENPM
@atproto/lexicon: schema definition languageREADMENPM
@atproto/repo: data storage structure, including MSTREADMENPM
@atproto/syntax: string parsers for identifiersREADMENPM
@atproto/xrpc: client-side HTTP API helpersREADMENPM
@atproto/xrpc-server: server-side HTTP API helpersREADMENPM

TypeScript Services:

Lexicons: for both the com.atproto.* and app.bsky.* are canonically versioned in this repo, for now, under ./lexicons/. These are JSON files in the Lexicon schema definition language, similar to JSON Schema or OpenAPI.

Interoperability Test Data: the language-neutral test files in ./interop-test-files/ may be useful for other protocol implementations to ensure that they follow the specification correctly

The source code for the Bluesky Social client app (for web and mobile) can be found at bluesky-social/social-app.

Go programming language source code is in bluesky-social/indigo, including the BGS implementation.

Developer Quickstart

We recommend nvm for managing Node.js installs. This project requires Node.js version 18. pnpm is used to manage the workspace of multiple packages. You can install it with npm install --global pnpm.

There is a Makefile which can help with basic development tasks:

# use existing nvm to install node 18 and pnpm
make nvm-setup

# pull dependencies and build all local packages
make deps
make build

# run the tests, using Docker services as needed
make test

# run a local PDS and AppView with fake test accounts and data
# (this requires a global installation of `jq` and `docker`)
make run-dev-env

# show all other commands
make help

About AT Protocol

The Authenticated Transfer Protocol ("ATP" or "atproto") is a decentralized social media protocol, developed by Bluesky PBC. Learn more at:

The Bluesky Social application encompasses a set of schemas and APIs built in the overall AT Protocol framework. The namespace for these "Lexicons" is app.bsky.*.

Contributions

While we do accept contributions, we prioritize high quality issues and pull requests. Adhering to the below guidelines will ensure a more timely review.

Rules:

Guidelines:

Remember, we serve a wide community of users. Our day-to-day involves us constantly asking "which top priority is our top priority." If you submit well-written PRs that solve problems concisely, that's an awesome contribution. Otherwise, as much as we'd love to accept your ideas and contributions, we really don't have the bandwidth.

Are you a developer interested in building on atproto?

Bluesky is an open social network built on the AT Protocol, a flexible technology that will never lock developers out of the ecosystems that they help build. With atproto, third-party can be as seamless as first-party through custom feeds, federated services, clients, and more.

Security disclosures

If you discover any security issues, please send an email to security@bsky.app. The email is automatically CCed to the entire team, and we'll respond promptly. See SECURITY.md for more info.

License

This project is dual-licensed under MIT and Apache 2.0 terms:

Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.