Skip to content

DrChat/bluepds

Repository files navigation

Bluesky PDS

         __                         __
        /\ \__                     /\ \__
    __  \ \ ,_\  _____   _ __   ___\ \ ,_\   ___
  /'__'\ \ \ \/ /\ '__'\/\''__\/ __'\ \ \/  / __'\
 /\ \L\.\_\ \ \_\ \ \L\ \ \ \//\ \L\ \ \ \_/\ \L\ \
 \ \__/.\_\\ \__\\ \ ,__/\ \_\\ \____/\ \__\ \____/
  \/__/\/_/ \/__/ \ \ \/  \/_/ \/___/  \/__/\/___/
                   \ \_\
                    \/_/

This is an implementation of an ATProto PDS using Axum and Azure app services.

This PDS implementation uses a SQLite database to store private account information and file storage to store canonical user data.

Warning

This PDS is undergoing heavy development. Do NOT use this to host your primary account or any important data!

Quick Start

cargo run

Code map

* migrations/   - SQLite database migrations
* src/
  * endpoints/  - ATProto API endpoints
  * auth.rs     - Authentication primitives
  * config.rs   - Application configuration
  * did.rs      - Decentralized Identifier helpers
  * error.rs    - Axum error helpers
  * firehose.rs - ATProto firehose producer
  * main.rs     - Main entrypoint
  * plc.rs      - Functionality to access the Public Ledger of Credentials
  * storage.rs  - Helpers to access user repository storage

To-do

  • Service proxying
  • UG /xrpc/_health (undocumented, but impl by reference PDS)
  • com.atproto.identity
    • AP /xrpc/com.atproto.identity.updateHandle
    • AP /xrpc/com.atproto.identity.requestPlcOperationSignature
    • AP /xrpc/com.atproto.identity.signPlcOperation
    • UG /xrpc/com.atproto.identity.resolveHandle
  • com.atproto.server
    • UG /xrpc/com.atproto.server.describeServer
    • UP /xrpc/com.atproto.server.createAccount
    • AP /xrpc/com.atproto.server.createInviteCode
    • UP /xrpc/com.atproto.server.createSession
    • AG /xrpc/com.atproto.server.getServiceAuth
    • AG /xrpc/com.atproto.server.getSession
  • com.atproto.repo
    • AP /xrpc/com.atproto.repo.applyWrites
    • AP /xrpc/com.atproto.repo.createRecord
    • AP /xrpc/com.atproto.repo.putRecord
    • AP /xrpc/com.atproto.repo.deleteRecord
    • UG /xrpc/com.atproto.repo.describeRepo
    • UG /xrpc/com.atproto.repo.getRecord
    • UG /xrpc/com.atproto.repo.listRecords
    • AP /xrpc/com.atproto.repo.uploadBlob
  • com.atproto.sync
    • UG /xrpc/com.atproto.sync.getBlob
    • UG /xrpc/com.atproto.sync.getBlocks
    • UG /xrpc/com.atproto.sync.getLatestCommit
    • UG /xrpc/com.atproto.sync.getRecord
    • UG /xrpc/com.atproto.sync.getRepoStatus
    • UG /xrpc/com.atproto.sync.getRepo
    • UG /xrpc/com.atproto.sync.listBlobs
    • UG /xrpc/com.atproto.sync.listRepos
    • UG /xrpc/com.atproto.sync.subscribeRepos

Quick Deployment (Azure CLI)

az group create --name "webapp" --location southcentralus
az deployment group create --resource-group "webapp" --template-file .\deployment.bicep --parameters webAppName=testapp

az acr login --name <insert name of ACR resource here>
docker build -t <ACR>.azurecr.io/testapp:latest .
docker push <ACR>.azurecr.io/testapp:latest

About

Alternative Bluesky PDS implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages