this repo has no description
1# pds.js
2
3A zero-dependency AT Protocol Personal Data Server written in JavaScript, running on Cloudflare Workers with Durable Objects.
4
5> ⚠️ **Work in progress** - This is experimental. You probably shouldn't use this yet.
6
7## Status
8
9- [x] Repo operations (createRecord, getRecord, putRecord, deleteRecord, applyWrites, listRecords)
10- [x] Sync endpoints (getRepo, getRecord, subscribeRepos, listRepos, getLatestCommit)
11- [x] Auth (createSession, getSession)
12- [x] Handle resolution (resolveHandle)
13- [x] AppView proxy (app.bsky.* forwarding with service auth)
14- [x] Relay notification (requestCrawl)
15- [x] Multi-user (each DID gets isolated storage, no self-service signup)
16- [ ] Blob storage (uploadBlob, getBlob, listBlobs)
17- [ ] refreshSession
18- [ ] OAuth
19- [ ] Account management (createAccount, deleteAccount)
20- [ ] App passwords
21- [ ] Email verification
22- [ ] Invite codes
23- [ ] Admin/moderation
24- [ ] Rate limiting
25
26## Prerequisites
27
28- Node.js 18+
29- [shfmt](https://github.com/mvdan/sh) (optional, for `npm run format`)
30 ```bash
31 brew install shfmt
32 ```
33
34## Quick Start
35
36```bash
37npm install
38
39# Create local dev config
40cp .env.example .dev.vars
41# Edit .dev.vars with your values
42
43# Run locally
44npm run dev
45```
46
47## Configuration
48
49For local development, create `.dev.vars`:
50
51```
52PDS_PASSWORD=your-password
53JWT_SECRET=your-secret
54RELAY_HOST=https://bsky.network # optional
55```
56
57For production, use Cloudflare secrets:
58
59```bash
60wrangler secret put PDS_PASSWORD
61wrangler secret put JWT_SECRET
62wrangler secret put RELAY_HOST # optional
63```
64
65## Testing
66
67```bash
68npm test # Unit tests
69npm run test:e2e # E2E tests (starts local server)
70```
71
72## Deploy
73
74```bash
75wrangler deploy
76```
77
78## Initialize
79
80After deployment, run the setup script to register with PLC and initialize:
81
82```bash
83npm run setup -- --pds https://your-pds.workers.dev
84```
85
86This generates keys, registers your DID with the PLC directory, initializes the PDS, and saves credentials. Handle defaults to the worker hostname.