···11-# references
11+# pds ecosystem references
22+33+ZDS is built with a small set of PDS implementations and adjacent projects in
44+mind. This file records what each one is useful for so future work can start
55+from known prior art instead of rediscovering it.
66+77+## primary references
88+99+### official Bluesky PDS
1010+1111+Links:
1212+[legacy repo](https://github.com/bluesky-social/pds),
1313+[atproto package](https://github.com/bluesky-social/atproto/tree/main/packages/pds)
1414+1515+Use it as the compatibility floor. If an endpoint, repo write, sync frame,
1616+invite-code rule, app-password route, account status field, or OAuth behavior is
1717+implemented by the official PDS, ZDS should usually match it unless there is a
1818+documented reason not to.
1919+2020+Strengths:
2121+2222+- broad client compatibility with bsky.app and ecosystem OAuth clients
2323+- SQLite-backed account, invite, token, repo, blob, and identity state
2424+- record preparation behavior for known and unknown lexicons
2525+- sync and firehose frame shape, including inductive Sync 1.1 fields
2626+- operational conventions around crawlers, email, app passwords, and admin APIs
2727+2828+Use it especially for:
2929+3030+- XRPC response shape and error codes
3131+- app-password and invite-code behavior
3232+- DID/PLC migration and recommended credentials
3333+- repo import/export and block storage expectations
3434+- conformance tests and bug triage
3535+3636+### Tranquil
3737+3838+Link: [tranquil.farm/tranquil-pds](https://tangled.org/tranquil.farm/tranquil-pds)
3939+4040+Use it as the maturity reference. Tranquil is more ambitious than the official
4141+PDS in places, but it tends to separate concerns cleanly and has already solved
4242+many problems ZDS wants to grow into.
4343+4444+Strengths:
4545+4646+- clean store boundaries and storage-specific benchmark targets
4747+- strong validation and conformance posture
4848+- passkey/WebAuthn login support
4949+- richer account security model: sessions, app passwords, token lifecycle, and
5050+ audit-friendly account state
5151+- delegation-oriented subject/actor/controller distinctions
5252+- good instinct for keeping appview behavior outside the PDS
25333-## implementation references
5454+Use it especially for:
45555-- [Tranquil PDS](https://tangled.org/tranquil.farm/tranquil-pds): broad
66- community PDS reference, strong validation and storage separation.
77-- [Pegasus](https://tangled.org/futur.blue/pegasus): compact architectural
88- reference with clear protocol module
99- boundaries.
1010-- [Bluesky PDS](https://github.com/bluesky-social/pds): compatibility oracle
1111- for endpoint behavior, record preparation, sync shape, and operational
1212- expectations.
1313-- [Bluesky atproto PDS package](https://github.com/bluesky-social/atproto/tree/main/packages/pds):
1414- implementation source for the published reference PDS package.
1515-- [pds.js](https://tangled.org/chadtmiller.com/pds.js): compact endpoint and
1616- architecture reference.
1717-- [Cocoon](https://github.com/haileyok/cocoon): additional PDS implementation
1818- context.
1919-- [PDS Gatekeeper](https://tangled.org/pds.dad/pds-gatekeeper): operational
2020- policy sidecar reference for captcha-gated account creation, 2FA, and
2121- migration-only createAccount deployments.
5656+- account-plane hardening
5757+- passkey UX and credential storage semantics
5858+- OAuth refresh/revocation edge cases
5959+- benchmark design and metastore comparisons
6060+- delegation groundwork
6161+6262+### Pegasus
6363+6464+Link: [futur.blue/pegasus](https://tangled.org/futur.blue/pegasus)
6565+6666+Use it as a compact architecture reference. Pegasus is useful when ZDS needs a
6767+smaller codebase to compare module boundaries, protocol routing, and generic PDS
6868+shape without inheriting the full complexity of the official implementation.
22692323-## test and app references
7070+Strengths:
24712525-- [atproto-smoke](https://tangled.org/alice.mosphere.at/atproto-smoke):
2626- browser-oriented compatibility testing.
2727-- pollz: Zig + SvelteKit ATProto app using OAuth, SQLite, Jetstream, and PDS
7272+- readable PDS organization
7373+- clear protocol module boundaries
7474+- useful contrast against both Tranquil's broader architecture and the official
7575+ PDS's production-oriented codebase
7676+7777+Use it especially for:
7878+7979+- sanity-checking whether a ZDS module boundary is understandable
8080+- comparing minimal PDS surface area
8181+- avoiding overfitting to bsky-specific client pressure
8282+8383+## secondary and adjacent references
8484+8585+### Cocoon
8686+8787+Link: [haileyok/cocoon](https://github.com/haileyok/cocoon)
8888+8989+Cocoon is useful additional PDS context, especially for seeing a different
9090+implementation's tradeoffs around repo/account organization. Treat it as
9191+informative rather than normative.
9292+9393+### distributed-pds
9494+9595+Link: [willdot.net/distributed-pds](https://tangled.org/willdot.net/distributed-pds)
9696+9797+This is useful for thinking about future account delegation and distributed PDS
9898+shape. It should influence abstractions only after the official PDS and
9999+Tranquil have been checked, because it is more experimental.
100100+101101+### pds.js
102102+103103+Link: [chadtmiller.com/pds.js](https://tangled.org/chadtmiller.com/pds.js)
104104+105105+Useful as a compact endpoint reference and a quick way to compare how a smaller
106106+implementation handles basic routing and PDS behaviors.
107107+108108+### pds-message-poc
109109+110110+Link: [zzstoatzz.io/pds-message-poc](https://tangled.org/zzstoatzz.io/pds-message-poc)
111111+112112+Useful for custom records and PDS-to-PDS behavior. This is app-adjacent context,
113113+not a substitute for PDS conformance.
114114+115115+### PDS Gatekeeper
116116+117117+Link: [pds.dad/pds-gatekeeper](https://tangled.org/pds.dad/pds-gatekeeper)
118118+119119+Useful operational policy prior art for captcha-gated account creation, 2FA, and
120120+migration-only account creation. It can inform boundary policy, but it does not
121121+replace invite-code accounting inside the PDS.
122122+123123+### PDS Moover
124124+125125+Link: [pds.dad/pds-moover](https://tangled.org/pds.dad/pds-moover)
126126+127127+Useful for migration behavior and PLC rotation-key handling as observed by real
128128+PDS moves. When migration behavior is confusing, check this alongside the
129129+official PDS before assuming what key material should be stored or exposed.
130130+131131+## test and workload references
132132+133133+- [alice.mosphere.at/atproto-smoke](https://tangled.org/alice.mosphere.at/atproto-smoke):
134134+ browser-oriented PDS compatibility tests.
135135+- [zzstoatzz.io/atproto-bench](https://tangled.org/zzstoatzz.io/atproto-bench):
136136+ benchmark rigor and methodology reference.
137137+- `pollz`: Zig + SvelteKit ATProto app using OAuth, SQLite, Jetstream, and PDS
28138 writes.
2929-- [pds-message-poc](https://tangled.org/zzstoatzz.io/pds-message-poc):
3030- custom-record and PDS-to-PDS behavior reference.
3131-- pds.js and atproto-smoke helped identify which endpoint failures are client
3232- visible versus appview/proxy visible.
139139+- `plyr.fm`, `streamplace`, `pds.ls`, and bsky.app are useful live client probes
140140+ because they exercise OAuth, scope handling, repo writes, blobs, appview proxy
141141+ routes, and client expectations differently.
142142+143143+## reference hierarchy
144144+145145+When references disagree, use this order:
146146+147147+1. atproto specs and lexicons
148148+2. official Bluesky PDS behavior
149149+3. Tranquil for richer mature behavior and implementation shape
150150+4. Pegasus or other compact implementations for readability checks
151151+5. experimental or app-adjacent references for ideas only
152152+153153+Any intentional ZDS divergence from the first three should be documented near
154154+the code or in the relevant docs page.
3315534156## lessons kept in code
35157···48170 live at the PDS boundary or a reverse proxy boundary; pds-gatekeeper is useful
49171 prior art for that layer, not a substitute for invite-code accounting.
50172- Passkeys are Tranquil-derived, not reference-PDS-derived: store credential
5151- IDs, public keys, counters, names, and timestamps, and verify WebAuthn
173173+ IDs, public keys, counters, names, and timestamps, and verify WebAuthN
52174 assertions before authorizing OAuth requests.
175175+- Account-plane security should be storage-backed. Sessions, refresh rotation,
176176+ app passwords, OAuth grants, passkeys, and revocation are not merely JWT
177177+ formatting concerns.
178178+- Delegation-ready code should keep subject, actor, and controller identities
179179+ distinct even before user-facing account delegation exists.
531805454-## Tranquil comparison
181181+## active comparison work
5518256183ZDS should stay close to Tranquil's design where it has already solved a PDS
57184problem cleanly:
···61188- keep appview behavior behind `atproto-proxy`
62189- validate known records before writes are accepted
63190- report latency percentiles for storage operations
191191+- keep account security surfaces durable and inspectable
6419265193See [benchmarks](../bench/README.md) for the active performance comparison
66194work.