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 - [ ] Implement Read-After-Write (RAW) consistency (Local Overlay) for proxied requests (merge local unindexed records). 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 - [ ] 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 - [ ] 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 - [ ] Implement `com.atproto.repo.putRecord`. 54 - [ ] Implement `com.atproto.repo.getRecord`. 55 - [ ] Implement `com.atproto.repo.deleteRecord`. 56 - [ ] Implement `com.atproto.repo.listRecords`. 57 - [ ] 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 - [ ] Implement `com.atproto.repo.uploadBlob`. 63 - [ ] Store blob (S3). 64 - [ ] 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 - [ ] 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- [ ] `app.bsky.feed.post` 112- [ ] `app.bsky.feed.like` 113- [ ] `app.bsky.feed.repost` 114- [ ] `app.bsky.graph.follow` 115- [ ] `app.bsky.graph.block` 116- [ ] `app.bsky.actor.profile` 117- [ ] Other app(view) validation too!!! 118 119## Infrastructure & Core Components 120- [ ] Sequencer (Event Log) 121 - [ ] Implement a `Sequencer` (backed by `repo_seq` table? Like in ref impl). 122 - [ ] Implement event formatting (`commit`, `handle`, `identity`, `account`). 123 - [ ] Implement database polling / event emission mechanism. 124 - [ ] Implement cursor-based event replay (`requestSeqRange`). 125- [ ] Repo Storage & Consistency (in postgres) 126 - [ ] Implement `RepoStorage` for postgres (replaces per-user SQLite). 127 - [ ] Read/Write IPLD blocks to `blocks` table (global deduplication). 128 - [ ] Manage Repo Root in `repos` table. 129 - [ ] Implement Atomic Repo Transactions. 130 - [ ] Ensure `blocks` write, `repo_root` update, `records` index update, and `sequencer` event are committed in a single transaction. 131 - [ ] Implement concurrency control (row-level locking on `repos` table) to prevent concurrent writes to the same repo. 132- [ ] DID Cache 133 - [ ] Implement caching layer for DID resolution (Redis or in-memory). 134 - [ ] Handle cache invalidation/expiry. 135- [ ] Background Jobs 136 - [ ] Implement background queue for async tasks (crawler notifications, discord/telegram 2FA sending instead of email). 137 - [ ] Implement `Crawlers` service (debounce notifications to relays). 138- [ ] Mailer equivalent 139 - [ ] Implement code/notification sending service as a replacement for the mailer because there's no way I'm starting with email. :D 140- [ ] Image Processing 141 - [ ] Implement image resize/formatting pipeline (for blob uploads). 142- [ ] IPLD & MST 143 - [ ] Implement Merkle Search Tree logic for repo signing. 144 - [ ] Implement CAR (Content Addressable Archive) encoding/decoding. 145- [ ] Validation 146 - [ ] DID PLC Operations (Sign rotation keys). 147