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 - [ ] Implement `com.atproto.server.activateAccount`. 29 - [ ] Implement `com.atproto.server.checkAccountStatus`. 30 - [ ] Implement `com.atproto.server.confirmEmail`. 31 - [ ] Implement `com.atproto.server.createAppPassword`. 32 - [ ] Implement `com.atproto.server.createInviteCode`. 33 - [ ] Implement `com.atproto.server.createInviteCodes`. 34 - [ ] Implement `com.atproto.server.deactivateAccount` / `deleteAccount`. 35 - [ ] Implement `com.atproto.server.getAccountInviteCodes`. 36 - [ ] Implement `com.atproto.server.getServiceAuth` (Cross-service auth). 37 - [ ] Implement `com.atproto.server.listAppPasswords`. 38 - [ ] Implement `com.atproto.server.requestAccountDelete`. 39 - [ ] Implement `com.atproto.server.requestEmailConfirmation` / `requestEmailUpdate`. 40 - [ ] Implement `com.atproto.server.requestPasswordReset` / `resetPassword`. 41 - [ ] Implement `com.atproto.server.reserveSigningKey`. 42 - [ ] Implement `com.atproto.server.revokeAppPassword`. 43 - [ ] Implement `com.atproto.server.updateEmail`. 44 45## Repository Operations (`com.atproto.repo`) 46- [ ] Record CRUD 47 - [ ] Implement `com.atproto.repo.createRecord`. 48 - [ ] Validate schema against Lexicon (just structure, not complex logic). 49 - [ ] Generate `rkey` (TID) if not provided. 50 - [ ] Handle MST (Merkle Search Tree) insertion. 51 - [ ] **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 - [ ] Implement `com.atproto.repo.applyWrites` (Batch writes). 58 - [ ] Implement `com.atproto.repo.importRepo` (Migration). 59 - [ ] Implement `com.atproto.repo.listMissingBlobs`. 60- [ ] 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- [ ] The Firehose (WebSocket) 67 - [ ] Implement `com.atproto.sync.subscribeRepos`. 68 - [ ] Broadcast real-time commit events. 69 - [ ] Handle cursor replay (backfill). 70- [ ] Bulk Export 71 - [ ] Implement `com.atproto.sync.getRepo` (Return full CAR file of repo). 72 - [ ] Implement `com.atproto.sync.getBlocks` (Return specific blocks via CIDs). 73 - [ ] Implement `com.atproto.sync.getLatestCommit`. 74 - [ ] Implement `com.atproto.sync.getRecord` (Sync version, distinct from repo.getRecord). 75 - [ ] Implement `com.atproto.sync.getRepoStatus`. 76 - [ ] Implement `com.atproto.sync.listRepos`. 77 - [ ] Implement `com.atproto.sync.notifyOfUpdate`. 78- [ ] Blob Sync 79 - [ ] Implement `com.atproto.sync.getBlob`. 80 - [ ] Implement `com.atproto.sync.listBlobs`. 81- [ ] Crawler Interaction 82 - [ ] Implement `com.atproto.sync.requestCrawl` (Notify relays to index us). 83 84## Identity (`com.atproto.identity`) 85- [ ] Resolution 86 - [ ] Implement `com.atproto.identity.resolveHandle` (Can be internal or proxy to PLC). 87 - [ ] Implement `com.atproto.identity.updateHandle`. 88 - [ ] Implement `com.atproto.identity.submitPlcOperation` / `signPlcOperation` / `requestPlcOperationSignature`. 89 - [ ] 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- [ ] Implement `com.atproto.admin.deleteAccount`. 94- [ ] Implement `com.atproto.admin.disableAccountInvites`. 95- [ ] Implement `com.atproto.admin.disableInviteCodes`. 96- [ ] Implement `com.atproto.admin.enableAccountInvites`. 97- [ ] Implement `com.atproto.admin.getAccountInfo` / `getAccountInfos`. 98- [ ] Implement `com.atproto.admin.getInviteCodes`. 99- [ ] Implement `com.atproto.admin.getSubjectStatus`. 100- [ ] Implement `com.atproto.admin.sendEmail`. 101- [ ] Implement `com.atproto.admin.updateAccountEmail`. 102- [ ] Implement `com.atproto.admin.updateAccountHandle`. 103- [ ] Implement `com.atproto.admin.updateAccountPassword`. 104- [ ] Implement `com.atproto.admin.updateSubjectStatus`. 105 106## Moderation (`com.atproto.moderation`) 107- [ ] Implement `com.atproto.moderation.createReport`. 108 109## Record Schema Validation 110- [ ] Handle this generically. 111 112## Infrastructure & Core Components 113- [ ] Sequencer (Event Log) 114 - [ ] Implement a `Sequencer` (backed by `repo_seq` table? Like in ref impl). 115 - [ ] Implement event formatting (`commit`, `handle`, `identity`, `account`). 116 - [ ] Implement database polling / event emission mechanism. 117 - [ ] Implement cursor-based event replay (`requestSeqRange`). 118- [ ] Repo Storage & Consistency (in postgres) 119 - [ ] Implement `RepoStorage` for postgres (replaces per-user SQLite). 120 - [ ] Read/Write IPLD blocks to `blocks` table (global deduplication). 121 - [ ] Manage Repo Root in `repos` table. 122 - [ ] Implement Atomic Repo Transactions. 123 - [ ] 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 background queue for async tasks (crawler notifications, discord/telegram 2FA sending instead of email). 130 - [ ] Implement `Crawlers` service (debounce notifications to relays). 131- [ ] Mailer equivalent 132 - [ ] Implement code/notification sending service as a replacement for the mailer because there's no way I'm starting with email. :D 133- [ ] Image Processing 134 - [ ] Implement image resize/formatting pipeline (for blob uploads). 135- [ ] IPLD & MST 136 - [ ] Implement Merkle Search Tree logic for repo signing. 137 - [ ] Implement CAR (Content Addressable Archive) encoding/decoding. 138- [ ] Validation 139 - [ ] DID PLC Operations (Sign rotation keys). 140- [ ] Fix any remaining TODOs in the code, everywhere, full stop. 141