Turn your phone into a Windows remote control—no cloud, no accounts

Your phone can already stream movies to your TV, so why can’t it pause the one playing on your laptop without you leaving the bed? A new open-source tool called LapDeck does exactly that—no cloud, no accounts, just one npm start on Windows and a quick QR scan from your phone.
Built in a weekend, designed for real use
LapDeck starts with a single Node.js process on the laptop and a progressive web app on the phone. The agent serves the PWA, opens a WebSocket for commands, and streams the screen as MJPEG over your own Wi-Fi. The protocol is deliberately dumb JSON envelopes so a future Android client or CLI script can speak it in an afternoon. Windows-specific features like volume, brightness and power are isolated in their own folder, making a macOS or Linux port a matter of swapping that layer rather than rewriting everything.
The tricks that make it feel native
Mobile keyboards lie about what you typed. Instead of listening to individual key codes—Android reports every tap as keyCode 229—LapDeck keeps a hidden input, diffs its value against the last known state, and sends clean insertions to the laptop. Swipe-type a sentence and the laptop receives one coherent paste. For live screen view, WebRTC would be “correct,” but LapDeck uses MJPEG instead: screenshots captured with nut.js, resized and JPEG-encoded with sharp, pushed as multipart/x-mixed-replace. A simple <img> tag renders frames natively; quality presets adjust fps, width and JPEG quality. To hide the stream’s inherent lag, the phone overlays its own cursor so your finger moves instantly while the real cursor catches up underneath.
Security without the ceremony
Giving a web page the power to inject input and shut down your laptop deserves skepticism. LapDeck requires a 256-bit random token generated on first run and embedded in the QR link; scanning once stores it on the phone. Every WebSocket command and the MJPEG stream must present the token; comparison is constant-time and the socket drops if authentication isn’t completed within three seconds. Feature switches are enforced server-side, so if you disable screen view, the agent refuses the stream even if the phone still has the token.
Why it matters
LapDeck shows how far you can get with plain JavaScript, one protocol, and careful attention to real-world mobile quirks. It removes the friction of cloud-dependent remote tools while still feeling responsive and secure. For developers tired of multi-account setups and for users who just want a quick, local bridge between devices, this is a lightweight alternative that proves simplicity can beat complexity.
Source: DEV Community. AI-assisted editorial synthesis — TechnoExpress.

