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