+59
README.md
+59
README.md
···
1
+
# pds.js
2
+
3
+
A 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
+
## Quick Start
8
+
9
+
```bash
10
+
npm install
11
+
12
+
# Create local dev config
13
+
cp .env.example .dev.vars
14
+
# Edit .dev.vars with your values
15
+
16
+
# Run locally
17
+
npm run dev
18
+
```
19
+
20
+
## Configuration
21
+
22
+
For local development, create `.dev.vars`:
23
+
24
+
```
25
+
PDS_PASSWORD=your-password
26
+
JWT_SECRET=your-secret
27
+
RELAY_HOST=https://bsky.network # optional
28
+
```
29
+
30
+
For production, use Cloudflare secrets:
31
+
32
+
```bash
33
+
wrangler secret put PDS_PASSWORD
34
+
wrangler secret put JWT_SECRET
35
+
wrangler secret put RELAY_HOST # optional
36
+
```
37
+
38
+
## Testing
39
+
40
+
```bash
41
+
npm test # Unit tests
42
+
npm run test:e2e # E2E tests (starts local server)
43
+
```
44
+
45
+
## Deploy
46
+
47
+
```bash
48
+
wrangler deploy
49
+
```
50
+
51
+
## Initialize
52
+
53
+
After deployment, run the setup script to register with PLC and initialize:
54
+
55
+
```bash
56
+
npm run setup -- --pds https://your-pds.workers.dev
57
+
```
58
+
59
+
This generates keys, registers your DID with the PLC directory, initializes the PDS, and saves credentials. Handle defaults to the worker hostname.
+2
-2
package-lock.json
+2
-2
package-lock.json