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] Implement `GET /xrpc/_health` endpoint (returns "OK"). 9- [x] Server Description 10 - [x] Implement `com.atproto.server.describeServer` (returns available user domains). 11- [x] XRPC Proxying 12 - [x] Implement strict forwarding for all `app.bsky.*` and `chat.bsky.*` requests to an appview. 13 - [x] Forward auth headers correctly. 14 - [x] Handle appview errors/timeouts gracefully. 15 16## Authentication & Account Management (`com.atproto.server`) 17- [x] Account Creation 18 - [x] Implement `com.atproto.server.createAccount`. 19 - [x] Validate handle format (reject invalid characters). 20 - [x] Create DID for new user (PLC directory). 21 - [x] Initialize user repository (Root commit). 22 - [x] Return access JWT and DID. 23 - [x] Create DID for new user (did:web). 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 - [x] Implement `com.atproto.server.activateAccount`. 30 - [x] Implement `com.atproto.server.checkAccountStatus`. 31 - [x] Implement `com.atproto.server.createAppPassword`. 32 - [x] Implement `com.atproto.server.createInviteCode`. 33 - [x] Implement `com.atproto.server.createInviteCodes`. 34 - [x] Implement `com.atproto.server.deactivateAccount` / `deleteAccount`. 35 - [x] Implement `com.atproto.server.getAccountInviteCodes`. 36 - [x] Implement `com.atproto.server.getServiceAuth` (Cross-service auth). 37 - [x] Implement `com.atproto.server.listAppPasswords`. 38 - [x] Implement `com.atproto.server.requestAccountDelete`. 39 - [x] Implement `com.atproto.server.requestEmailConfirmation` / `requestEmailUpdate`. 40 - [x] Implement `com.atproto.server.requestPasswordReset` / `resetPassword`. 41 - [x] Implement `com.atproto.server.reserveSigningKey`. 42 - [x] Implement `com.atproto.server.revokeAppPassword`. 43 - [x] Implement `com.atproto.server.updateEmail`. 44 - [x] Implement `com.atproto.server.confirmEmail`. 45 46## Repository Operations (`com.atproto.repo`) 47- [x] Record CRUD 48 - [x] Implement `com.atproto.repo.createRecord`. 49 - [x] Generate `rkey` (TID) if not provided. 50 - [x] Handle MST (Merkle Search Tree) insertion. 51 - [x] **Trigger Firehose Event**. 52 - [x] Implement `com.atproto.repo.putRecord`. 53 - [x] Implement `com.atproto.repo.getRecord`. 54 - [x] Implement `com.atproto.repo.deleteRecord`. 55 - [x] Implement `com.atproto.repo.listRecords`. 56 - [x] Implement `com.atproto.repo.describeRepo`. 57 - [x] Implement `com.atproto.repo.applyWrites` (Batch writes). 58 - [ ] Implement `com.atproto.repo.importRepo` (Migration). 59 - [x] Implement `com.atproto.repo.listMissingBlobs`. 60- [x] Blob Management 61 - [x] Implement `com.atproto.repo.uploadBlob`. 62 - [x] Store blob (S3). 63 - [x] return `blob` ref (CID + MimeType). 64 65## Sync & Federation (`com.atproto.sync`) 66- [x] The Firehose (WebSocket) 67 - [x] Implement `com.atproto.sync.subscribeRepos`. 68 - [x] Broadcast real-time commit events. 69 - [x] Handle cursor replay (backfill). 70- [x] Bulk Export 71 - [x] Implement `com.atproto.sync.getRepo` (Return full CAR file of repo). 72 - [x] Implement `com.atproto.sync.getBlocks` (Return specific blocks via CIDs). 73 - [x] Implement `com.atproto.sync.getLatestCommit`. 74 - [x] Implement `com.atproto.sync.getRecord` (Sync version, distinct from repo.getRecord). 75 - [x] Implement `com.atproto.sync.getRepoStatus`. 76 - [x] Implement `com.atproto.sync.listRepos`. 77 - [x] Implement `com.atproto.sync.notifyOfUpdate`. 78- [x] Blob Sync 79 - [x] Implement `com.atproto.sync.getBlob`. 80 - [x] Implement `com.atproto.sync.listBlobs`. 81- [x] Crawler Interaction 82 - [x] Implement `com.atproto.sync.requestCrawl` (Notify relays to index us). 83 84## Identity (`com.atproto.identity`) 85- [ ] Resolution 86 - [x] Implement `com.atproto.identity.resolveHandle` (Can be internal or proxy to PLC). 87 - [x] Implement `com.atproto.identity.updateHandle`. 88 - [ ] Implement `com.atproto.identity.submitPlcOperation` / `signPlcOperation` / `requestPlcOperationSignature`. 89 - [x] Implement `com.atproto.identity.getRecommendedDidCredentials`. 90 - [x] Implement `/.well-known/did.json` (Depends on supporting did:web). 91 92## Admin Management (`com.atproto.admin`) 93- [x] Implement `com.atproto.admin.deleteAccount`. 94- [x] Implement `com.atproto.admin.disableAccountInvites`. 95- [x] Implement `com.atproto.admin.disableInviteCodes`. 96- [x] Implement `com.atproto.admin.enableAccountInvites`. 97- [x] Implement `com.atproto.admin.getAccountInfo` / `getAccountInfos`. 98- [x] Implement `com.atproto.admin.getInviteCodes`. 99- [x] Implement `com.atproto.admin.getSubjectStatus`. 100- [x] Implement `com.atproto.admin.sendEmail`. 101- [x] Implement `com.atproto.admin.updateAccountEmail`. 102- [x] Implement `com.atproto.admin.updateAccountHandle`. 103- [x] Implement `com.atproto.admin.updateAccountPassword`. 104- [x] Implement `com.atproto.admin.updateSubjectStatus`. 105 106## Moderation (`com.atproto.moderation`) 107- [x] Implement `com.atproto.moderation.createReport`. 108 109## Record Schema Validation 110- [ ] Handle this generically. 111 112## Infrastructure & Core Components 113- [x] Sequencer (Event Log) 114 - [x] Implement a `Sequencer` (backed by `repo_seq` table). 115 - [x] Implement event formatting (`commit`, `handle`, `identity`, `account`). 116 - [x] Implement database polling / event emission mechanism. 117 - [x] Implement cursor-based event replay (`requestSeqRange`). 118- [x] Repo Storage & Consistency (in postgres) 119 - [x] Implement `RepoStorage` for postgres (replaces per-user SQLite). 120 - [x] Read/Write IPLD blocks to `blocks` table (global deduplication). 121 - [x] Manage Repo Root in `repos` table. 122 - [x] Implement Atomic Repo Transactions. 123 - [x] Ensure `blocks` write, `repo_root` update, `records` index update, and `sequencer` event are committed in a single transaction. 124 - [ ] Implement concurrency control (row-level locking on `repos` table) to prevent concurrent writes to the same repo. 125- [ ] DID Cache 126 - [ ] Implement caching layer for DID resolution (Redis or in-memory). 127 - [ ] Handle cache invalidation/expiry. 128- [ ] Background Jobs 129 - [ ] Implement `Crawlers` service (debounce notifications to relays). 130- [x] Notification Service 131 - [x] Queue-based notification system with database table 132 - [x] Background worker polling for pending notifications 133 - [x] Extensible sender trait for multiple channels 134 - [x] Email sender via OS sendmail/msmtp 135 - [ ] Discord bot sender 136 - [ ] Telegram bot sender 137 - [ ] Signal bot sender 138 - [x] Helper functions for common notification types (welcome, password reset, email verification, etc.) 139- [ ] Image Processing 140 - [ ] Implement image resize/formatting pipeline (for blob uploads). 141- [x] IPLD & MST 142 - [x] Implement Merkle Search Tree logic for repo signing. 143 - [x] Implement CAR (Content Addressable Archive) encoding/decoding. 144- [ ] Validation 145 - [ ] DID PLC Operations (Sign rotation keys). 146- [ ] Fix any remaining TODOs in the code, everywhere, full stop. 147