feat: add peer-drop — browser-based P2P file and text sharing#33
Merged
Conversation
Single-file static app using PeerJS for WebRTC data channels. Room code in URL hash for easy pairing, QR code for mobile, bidirectional file transfer with chunked progress, and text sharing. Includes infrastructure registration (tofu), homepage link, and CLAUDE.md projects table update. https://claude.ai/code/session_01VKqBtXoos5n1xj1VDL7Cb7
Security: - Fix XSS in text messages by using DOM API instead of innerHTML - Sanitize all peer-supplied transfer IDs with allowlist regex - Add 500MB file size cap to prevent memory bomb via malicious offers - Validate chunk indices to prevent out-of-bounds writes - Add clipboard API fallback for non-secure contexts UX: - Fix vertical overflow when activity feed grows (flex-start + padding) - Host recovers after disconnect (shows room code again) - Hide send section on disconnect for both peers - Filter out 0-byte files from send queue QA: - Add try/catch in processQueue so failed transfers don't freeze queue - Fix backpressure check to drain buffer before resuming - Add clipboard error handling with textarea fallback https://claude.ai/code/session_01VKqBtXoos5n1xj1VDL7Cb7
Contributor
OpenTofu PlanPlan output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.html, no build step, no server-side data handling.#FOXR) + QR code for easy phone-to-laptop pairingWhat's included
projects/peer-drop/index.htmlprojects/peer-drop/docs/PRD.mdtofu/variables.tfpeer-dropto projects setprojects/homepage/index.htmlCLAUDE.mdSecurity review completed
Test plan
https://claude.ai/code/session_01VKqBtXoos5n1xj1VDL7Cb7