LAN Transfer Portable
Cross-platform desktop app that bridges local networks with a web-based file transfer UI, no setup required.
A bare-bones LAN file transfer tool that runs as a native Electron app on Windows, bundling an Express server and React frontend with real-time WebSocket communication for instant file transfers across a local network.
- Electron
- Express.js
- React 19
- WebSocket (ws)
- Vite
- Tailwind CSS
- React Icons
- Pako (compression)
- QR Code.React
- React Router
- Node.js
- Windows Registry (winreg)
LAN Transfer Portable is built as an Electron wrapper around a Node.js Express server paired with a React frontend. The app boots an embedded web server on any available network interface, then exposes that server to other devices on the same LAN. File transfers are coordinated via WebSocket messages—when you add files and select recipients, the app chunks them, compresses chunks with pako, sends them over WebSocket, and reconstructs them in the browser or on disk.
The backend (server.js, 745 lines) handles network adapter enumeration (filtering virtual interfaces like WSL and Docker), settings persistence, and a chunked file protocol with acknowledgments. The frontend (2963 lines across 14 JSX components) manages the entire transfer UX: drag-drop file staging, live QR codes for sharing, image thumbnails with a lightbox viewer, transfer progress bars, and one-click downloads. In Electron mode, an IPC bridge lets the app save files directly to the user's Downloads folder without prompts.
Performance tuning drove many choices: image previews use async decode to avoid blocking, blob URLs are cached in refs, thumbnails animate using brightness filters instead of opacity, and the lightbox limits visible thumbnails to 15 at a time. The app also maintains persistent client IDs (via sessionStorage) across page reloads and hot module reloads, and gracefully handles server shutdowns by notifying all connected clients.
- Embedded Express server on demand—boots on app start, auto-discovers network interfaces, filters virtual adapters (WSL, Docker, Hyper-V).
- WebSocket-driven chunked file protocol with compression (pako) and real-time progress updates; supports selective recipient targeting or broadcast to all clients.
- Native Electron integration—save directly to Downloads folder, copy connection URLs to clipboard, graceful shutdown, loading spinner during startup.
- Image preview gallery with async decode and lightbox viewer (keyboard navigation, thumbnail strip, lazy loading); click-to-preview in transfer list.
- Drag-and-drop file staging, QR code generation for mobile, responsive Tailwind UI, network adapter settings page (Electron only) to enable/disable interfaces.