How arka79/dropwire works
Dropwire is a browser-to-browser file-sharing application: devices create or join temporary rooms, discover one another through a Socket.IO signaling service, establish WebRTC connections, then send files directly between peers. The signaling server brokers room state and connection handshakes; file bytes travel over the peer data channel. The graph follows the room UI through session coordination, signaling, peer setup, and transfer handling, with room storage and transfer controls as separate stages. Some features are documented but their implementation was not sampled; those branches use README evidence or are left unconnected where wiring is unknown.
Main entry points: room-screen.tsx Room screen · session.ts Room session · server.ts Signaling service · transfer.ts Transfer engine
Components 20
Web entry
- Landing page
components/landing/landing.tsx - Room route
app/room/[roomId]/page.tsx
Room experience
- Room screen
components/room/room-screen.tsx - Room sharing
components/landing/room-dialogs.tsx - Participants
components/room/participants.tsx - File selection
components/room/drop-zone.tsx - Transfer controls
components/transfer/transfer-row.tsx
Session coordination
- Session hook
hooks/use-room-session.ts - Room session
lib/room/session.ts - Device identity
lib/identity.ts
Room signaling
- Signaling client
lib/signaling/socket.ts - Signaling service
server/signaling/server.ts - Room state
server/signaling/rooms.ts - Signaling config
server/signaling/config.ts
Peer transfer
- WebRTC peer link
lib/webrtc/peer.ts - Transfer engine
lib/webrtc/transfer.ts - Chunk framing
lib/webrtc/chunks.ts - Incoming offers
components/transfer/incoming-panel.tsx
Other components
- Device user
- Other devices
Connections 24
- Device user → Landing page: opens app
- Landing page → Room sharing: opens room dialogs
components/landing/landing.tsx - Room sharing → Room session: creates room
components/landing/room-dialogs.tsx - Room sharing → Signaling client: requests signaling
components/landing/room-dialogs.tsx - Device user → Room route: opens room link
- Room route → Room screen: renders screen
app/room/[roomId]/page.tsx - Room screen → Session hook: starts session hook
components/room/room-screen.tsx - Session hook → Room session: creates session
hooks/use-room-session.ts - Room session → Device identity: loads identity
lib/room/session.ts - Room session → Signaling client: joins and signals
lib/room/session.ts - Signaling client → Signaling service: sends room events
- Signaling service → Room state: reads and updates rooms
server/signaling/server.ts - Signaling service → Signaling config: uses settings
server/signaling/server.ts - Signaling service → Signaling client: relays handshakes
- Room session → WebRTC peer link: creates peer links
lib/room/session.ts - WebRTC peer link → Other devices: connects directly or relayed
- Room session → Transfer engine: manages transfers
lib/room/session.ts - Transfer engine → Other devices: sends file bytes
- Transfer engine → Chunk framing: frames file chunks
lib/webrtc/transfer.ts - Room screen → File selection: accepts selected files
components/room/room-screen.tsx - Room screen → Participants: shows room peers
components/room/room-screen.tsx - Room screen → Transfer controls: shows transfer state
components/room/room-screen.tsx - Room screen → Incoming offers: shows incoming offers
components/room/room-screen.tsx - Incoming offers → Transfer engine: accepts or rejects offers
components/transfer/incoming-panel.tsx