Tool

GoKlip

Real-time cross-device text sharing with room codes, QR access, and VS Code integration.

GoKlip

The problem

While working across multiple devices, moving small pieces of text between them is surprisingly cumbersome.

Whether it was passing a terminal command from a development laptop to a test machine, copying a test URL to a phone, or transferring a quick code snippet, the existing options were clunky:

  • Emailing myself links or text snippets.
  • Pasting sensitive notes into messaging apps.
  • Opening heavy cloud documents just to move three lines of code.

None of these workflows were designed for quick, ephemeral text transfer. They required too many clicks, left permanent clutter in message histories, and interrupted focus.

Why I built it

I built GoKlip because I wanted a simple shared text buffer that I could open on another device without unnecessary friction.

The idea was straightforward: generate a short room code, open that room on another device or inside my code editor, and share text in real time. Once the transfer is done, the room expires automatically.

It started as a personal tool to speed up my day-to-day workflow across machines, and I later structured and released it as an open-source project.

The product

GoKlip provides a minimal, real-time shared clipboard that works across web browsers, mobile devices, and developer tools:

  • Create a Room: Generate a temporary clipboard with a short room code.
  • Join from Any Device: Connect via short code or by scanning an on-screen QR code on mobile.
  • Real-Time Synchronization: Text updates are broadcast to the connected clients in the room through Socket.io.
  • Plain Text and Markdown: Toggle between raw editing and rendered Markdown for formatted notes.
  • VS Code Extension: Read from and write to shared rooms directly from inside the editor.
Express/
VS Code Extension API

Key product decisions

Short room codes and QR joining

Typing long URLs on mobile devices creates friction. GoKlip generates short alphanumeric codes for easy keyboard entry and provides a QR code for instant mobile camera access.

Responsive, distraction-free interface

The interface focuses entirely on the text buffer. It includes live character counts, connection indicators, and keyboard shortcuts for copying and clearing text.

Ephemeral clipboard lifecycle

Shared text buffers are rarely meant to be permanent. Clipboards automatically clean up after a period of inactivity, keeping the database light and preventing stale text from lingering indefinitely.

Editor-first integration

Because a significant portion of text transfers involve code snippets, building a dedicated VS Code extension allowed syncing selected text directly from the editor without switching windows.

Engineering decisions

Real-time room synchronization

The backend uses Socket.io to manage WebSocket connections and room-based event broadcasting. When a connected client updates the text buffer, the server broadcasts the change specifically to other active clients in that room.

Persistent storage with automatic TTL

Clipboards are stored in MongoDB using Mongoose schemas with Time-To-Live (TTL) indexing. This allows room content to persist beyond a browser refresh while providing automatic cleanup of inactive rooms.

Server-side validation

The Express backend validates payload sizes, room code formats, and incoming socket events to prevent malformed data from affecting connected clients.

Dual-client architecture

The backend exposes both WebSocket events and REST endpoints. This allows the web application (React + Vite) and the VS Code extension (TypeScript) to share the same underlying room infrastructure and data validation.

Open-source journey

When preparing GoKlip for public release, I focused on cleaning the codebase into a transparent, maintainable open-source project:

  • Refactoring & Modularity: Separating backend socket handlers from HTTP controllers and clarifying React component responsibilities.
  • Codebase Cleanliness: Removing experimental code paths and standardizing state management across web and extension clients.
  • Developer Documentation: Writing comprehensive setup instructions, environment variable guides, and contribution guidelines in the public repository.
  • Validation & Reliability: Strengthening input validation and handling connection lifecycle across the web and extension clients.

Current state

GoKlip is active across three surfaces:

What I learned

  • Real-time systems are about state discipline: Real-time systems require careful state synchronization when multiple clients can update the same data.
  • Different clients demand different ergonomics: Designing for a mobile browser requires large touch targets and QR access, while designing for a code editor requires minimal keystrokes and non-intrusive UI.
  • Open-source preparation improves design: Cleaning up a project for external developers forces cleaner abstractions, better naming, and clearer separation of concerns.