this repo has no description
1# PDS Implementation TODOs 2 3Lewis' corrected big boy todofile 4 5## Server Infrastructure & Proxying 6- [x] Health Check 7 - [x] Implement `GET /health` endpoint (returns "OK"). 8- [x] Server Description 9 - [x] Implement `com.atproto.server.describeServer` (returns available user domains). 10- [x] XRPC Proxying 11 - [x] Implement strict forwarding for all `app.bsky.*` and `chat.bsky.*` requests to an appview. 12 - [x] Forward auth headers correctly. 13 - [x] Handle appview errors/timeouts gracefully. 14 15## Authentication & Account Management (`com.atproto.server`) 16- [x] Account Creation 17 - [x] Implement `com.atproto.server.createAccount`. 18 - [x] Validate handle format (reject invalid characters). 19 - [x] Create DID for new user (PLC directory). 20 - [x] Initialize user repository (Root commit). 21 - [x] Return access JWT and DID. 22 - [x] Create DID for new user (did:web). 23 - [ ] Implement all TODOs regarding did:webs. 24- [x] Session Management 25 - [x] Implement `com.atproto.server.createSession` (Login). 26 - [x] Implement `com.atproto.server.getSession`. 27 - [x] Implement `com.atproto.server.refreshSession`. 28 - [x] Implement `com.atproto.server.deleteSession` (Logout). 29 - [ ] Implement `com.atproto.server.activateAccount`. 30 - [ ] Implement `com.atproto.server.checkAccountStatus`. 31 - [ ] Implement `com.atproto.server.confirmEmail`. 32 - [ ] Implement `com.atproto.server.createAppPassword`. 33 - [ ] Implement `com.atproto.server.createInviteCode`. 34 - [ ] Implement `com.atproto.server.createInviteCodes`. 35 - [ ] Implement `com.atproto.server.deactivateAccount` / `deleteAccount`. 36 - [ ] Implement `com.atproto.server.getAccountInviteCodes`. 37 - [ ] Implement `com.atproto.server.getServiceAuth` (Cross-service auth). 38 - [ ] Implement `com.atproto.server.listAppPasswords`. 39 - [ ] Implement `com.atproto.server.requestAccountDelete`. 40 - [ ] Implement `com.atproto.server.requestEmailConfirmation` / `requestEmailUpdate`. 41 - [ ] Implement `com.atproto.server.requestPasswordReset` / `resetPassword`. 42 - [ ] Implement `com.atproto.server.reserveSigningKey`. 43 - [ ] Implement `com.atproto.server.revokeAppPassword`. 44 - [ ] Implement `com.atproto.server.updateEmail`. 45 46## Repository Operations (`com.atproto.repo`) 47- [ ] Record CRUD 48 - [ ] Implement `com.atproto.repo.createRecord`. 49 - [ ] Validate schema against Lexicon (just structure, not complex logic). 50 - [ ] Generate `rkey` (TID) if not provided. 51 - [ ] Handle MST (Merkle Search Tree) insertion. 52 - [ ] **Trigger Firehose Event**. 53 - [x] Implement `com.atproto.repo.putRecord`. 54 - [x] Implement `com.atproto.repo.getRecord`. 55 - [x] Implement `com.atproto.repo.deleteRecord`. 56 - [x] Implement `com.atproto.repo.listRecords`. 57 - [x] Implement `com.atproto.repo.describeRepo`. 58 - [ ] Implement `com.atproto.repo.applyWrites` (Batch writes). 59 - [ ] Implement `com.atproto.repo.importRepo` (Migration). 60 - [ ] Implement `com.atproto.repo.listMissingBlobs`. 61- [ ] Blob Management 62 - [x] Implement `com.atproto.repo.uploadBlob`. 63 - [x] Store blob (S3). 64 - [x] return `blob` ref (CID + MimeType). 65 66## Sync & Federation (`com.atproto.sync`) 67- [ ] The Firehose (WebSocket) 68 - [ ] Implement `com.atproto.sync.subscribeRepos`. 69 - [ ] Broadcast real-time commit events. 70 - [ ] Handle cursor replay (backfill). 71- [ ] Bulk Export 72 - [ ] Implement `com.atproto.sync.getRepo` (Return full CAR file of repo). 73 - [ ] Implement `com.atproto.sync.getBlocks` (Return specific blocks via CIDs). 74 - [ ] Implement `com.atproto.sync.getLatestCommit`. 75 - [ ] Implement `com.atproto.sync.getRecord` (Sync version, distinct from repo.getRecord). 76 - [ ] Implement `com.atproto.sync.getRepoStatus`. 77 - [ ] Implement `com.atproto.sync.listRepos`. 78 - [ ] Implement `com.atproto.sync.notifyOfUpdate`. 79- [ ] Blob Sync 80 - [ ] Implement `com.atproto.sync.getBlob`. 81 - [ ] Implement `com.atproto.sync.listBlobs`. 82- [ ] Crawler Interaction 83 - [ ] Implement `com.atproto.sync.requestCrawl` (Notify relays to index us). 84 85## Identity (`com.atproto.identity`) 86- [ ] Resolution 87 - [ ] Implement `com.atproto.identity.resolveHandle` (Can be internal or proxy to PLC). 88 - [ ] Implement `com.atproto.identity.updateHandle`. 89 - [ ] Implement `com.atproto.identity.submitPlcOperation` / `signPlcOperation` / `requestPlcOperationSignature`. 90 - [ ] Implement `com.atproto.identity.getRecommendedDidCredentials`. 91 - [x] Implement `/.well-known/did.json` (Depends on supporting did:web). 92 93## Admin Management (`com.atproto.admin`) 94- [ ] Implement `com.atproto.admin.deleteAccount`. 95- [ ] Implement `com.atproto.admin.disableAccountInvites`. 96- [ ] Implement `com.atproto.admin.disableInviteCodes`. 97- [ ] Implement `com.atproto.admin.enableAccountInvites`. 98- [ ] Implement `com.atproto.admin.getAccountInfo` / `getAccountInfos`. 99- [ ] Implement `com.atproto.admin.getInviteCodes`. 100- [ ] Implement `com.atproto.admin.getSubjectStatus`. 101- [ ] Implement `com.atproto.admin.sendEmail`. 102- [ ] Implement `com.atproto.admin.updateAccountEmail`. 103- [ ] Implement `com.atproto.admin.updateAccountHandle`. 104- [ ] Implement `com.atproto.admin.updateAccountPassword`. 105- [ ] Implement `com.atproto.admin.updateSubjectStatus`. 106 107## Moderation (`com.atproto.moderation`) 108- [ ] Implement `com.atproto.moderation.createReport`. 109 110## Record Schema Validation 111- [ ] Handle this generically. 112 113## Infrastructure & Core Components 114- [ ] Sequencer (Event Log) 115 - [ ] Implement a `Sequencer` (backed by `repo_seq` table? Like in ref impl). 116 - [ ] Implement event formatting (`commit`, `handle`, `identity`, `account`). 117 - [ ] Implement database polling / event emission mechanism. 118 - [ ] Implement cursor-based event replay (`requestSeqRange`). 119- [ ] Repo Storage & Consistency (in postgres) 120 - [ ] Implement `RepoStorage` for postgres (replaces per-user SQLite). 121 - [ ] Read/Write IPLD blocks to `blocks` table (global deduplication). 122 - [ ] Manage Repo Root in `repos` table. 123 - [ ] Implement Atomic Repo Transactions. 124 - [ ] Ensure `blocks` write, `repo_root` update, `records` index update, and `sequencer` event are committed in a single transaction. 125 - [ ] Implement concurrency control (row-level locking on `repos` table) to prevent concurrent writes to the same repo. 126- [ ] DID Cache 127 - [ ] Implement caching layer for DID resolution (Redis or in-memory). 128 - [ ] Handle cache invalidation/expiry. 129- [ ] Background Jobs 130 - [ ] Implement background queue for async tasks (crawler notifications, discord/telegram 2FA sending instead of email). 131 - [ ] Implement `Crawlers` service (debounce notifications to relays). 132- [ ] Mailer equivalent 133 - [ ] Implement code/notification sending service as a replacement for the mailer because there's no way I'm starting with email. :D 134- [ ] Image Processing 135 - [ ] Implement image resize/formatting pipeline (for blob uploads). 136- [ ] IPLD & MST 137 - [ ] Implement Merkle Search Tree logic for repo signing. 138 - [ ] Implement CAR (Content Addressable Archive) encoding/decoding. 139- [ ] Validation 140 - [ ] DID PLC Operations (Sign rotation keys). 141