diff --git a/README.md b/README.md new file mode 100644 index 0000000..0023137 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# pds.js + +A zero-dependency AT Protocol Personal Data Server written in JavaScript, running on Cloudflare Workers with Durable Objects. + +> ⚠️ **Work in progress** - This is experimental. You probably shouldn't use this yet. + +## Quick Start + +```bash +npm install + +# Create local dev config +cp .env.example .dev.vars +# Edit .dev.vars with your values + +# Run locally +npm run dev +``` + +## Configuration + +For local development, create `.dev.vars`: + +``` +PDS_PASSWORD=your-password +JWT_SECRET=your-secret +RELAY_HOST=https://bsky.network # optional +``` + +For production, use Cloudflare secrets: + +```bash +wrangler secret put PDS_PASSWORD +wrangler secret put JWT_SECRET +wrangler secret put RELAY_HOST # optional +``` + +## Testing + +```bash +npm test # Unit tests +npm run test:e2e # E2E tests (starts local server) +``` + +## Deploy + +```bash +wrangler deploy +``` + +## Initialize + +After deployment, run the setup script to register with PLC and initialize: + +```bash +npm run setup -- --pds https://your-pds.workers.dev +``` + +This generates keys, registers your DID with the PLC directory, initializes the PDS, and saves credentials. Handle defaults to the worker hostname. diff --git a/package-lock.json b/package-lock.json index e008a22..791555a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "cloudflare-pds", + "name": "pds.js", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "cloudflare-pds", + "name": "pds.js", "version": "0.1.0", "devDependencies": { "wrangler": "^4.54.0" diff --git a/package.json b/package.json index 65d9bd4..7a6d2f2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cloudflare-pds", + "name": "pds.js", "version": "0.1.0", "private": true, "type": "module",