Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I Built a Low-Latency, Local-First PC Remote with React Native and Electron

Have you ever been lying on the couch watching a movie on your PC, only to realize you need to get up just to adjust the volume or skip an intro? For years, I used classic remote apps like Unified Remote or Remote Mouse. But over time, they either became bloated, loaded with ads, or locked simple features behind paid subscriptions. More importantly, many modern tools route commands through…

The author built a low-latency, local-first PC remote control using React Native for mobile and Electron for desktop receivers. The project is built as a TypeScript monorepo with separate apps for mobile and receiver components. The shared protocol package ensures both client and server are using the same TypeScript interfaces and Zod validation schemas.

To achieve low latency, the author chose WebSockets over local LAN communication. WebSockets provide a lightweight, fast, and reliable connection within the same Wi-Fi subnet, reducing round-trip times to as low as 3ms. Traditional UDP or WebRTC solutions were deemed too complex and unnecessary for their use case.

For secure and frictionless device pairing, the author implemented a QR code-based authentication system. The Windows receiver generates an IP address, an ephemeral token, and a QR code containing these details. The mobile client scans the QR code and connects directly to the local IP address, completing the pairing process within seconds.

To optimize touchpad latency and movement handling, the mobile app calculates relative deltas (dx, dy) rather than sending absolute coordinates. This delta batching technique reduces network congestion and packet queueing latency while maintaining sub-10ms response times on the Windows side using native Win32 input APIs.

Beyond mouse control, the application also supports LAN file drop, clipboard synchronization, and custom macros. The local-first architecture eliminates cloud dependencies, reducing maintenance overhead and costs for the user.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Kubernetes Networking Was Easy — Until Production Got Real

When I first started managing microservices at scale, Kubernetes felt like magic — until it didn’t. Pods restarted, requests vanished into the void, and tracing cross-namespace traffic became a…

  • Kubernetes networking initially straightforward but complex in production with 150+ services.
  • Service mesh like Istio adds traffic splitting, routing logic, and zero-trust networking.

More from Friday 4 September →