this repo has no description
1# Lewis' BS PDS Sandbox
2
3When I'm actually done then yeah let's make this into a proper official-looking repo perhaps under an official-looking account or something.
4
5This project implements a Personal Data Server (PDS) implementation for the AT Protocol.
6
7Uses PostgreSQL instead of SQLite, S3-compatible blob storage, and aims to be a complete drop-in replacement for Bluesky's reference PDS implementation.
8
9In fact I aim to also implement a plugin system soon, so that we can add things onto our own PDSes on top of the default BS.
10
11I'm also taking ideas on what other PDSes lack, such as an on-PDS webpage that users can access to manage their records and preferences.
12
13:3
14
15# Running locally
16
17The reader will need rust installed locally.
18
19I personally run the postgres db, and an S3-compatible object store with podman compose up db objsto -d.
20
21Run the PDS directly:
22
23 just run
24
25Configuration is via environment variables:
26
27 DATABASE_URL postgres connection string
28 S3_BUCKET blob storage bucket name
29 S3_ENDPOINT S3 endpoint URL (for MinIO etc)
30 AWS_ACCESS_KEY_ID S3 credentials
31 AWS_SECRET_ACCESS_KEY
32 AWS_REGION
33 PDS_HOSTNAME public hostname of this PDS
34 APPVIEW_URL appview to proxy unimplemented endpoints to
35 RELAYS comma-separated list of relay WebSocket URLs
36
37Optional email stuff:
38
39 MAIL_FROM_ADDRESS sender address (enables email notifications)
40 MAIL_FROM_NAME sender name (default: BSPDS)
41 SENDMAIL_PATH path to sendmail binary
42
43Development
44
45 just shows available commands
46 just test run tests (spins up postgres and minio via testcontainers)
47 just lint clippy + fmt check
48 just db-reset drop and recreate local database
49
50The test suite uses testcontainers so you don't need to set up anything manually for running tests.
51
52## What's implemented
53
54Most of the com.atproto.* namespace is done. Server endpoints, repo operations, sync, identity, admin, moderation. The firehose websocket works. OAuth is not done yet.
55
56See TODO.md for the full breakdown of what's done and what's left.
57
58Structure
59
60 src/
61 main.rs server entrypoint
62 lib.rs router setup
63 state.rs app state (db pool, stores)
64 api/ XRPC handlers organized by namespace
65 auth/ JWT handling
66 repo/ postgres block store
67 storage/ S3 blob storage
68 sync/ firehose, relay clients
69 notifications/ email service
70 tests/ integration tests
71 migrations/ sqlx migrations
72
73License
74
75idk