The Problem Users need a single pasteboard that works across Windows, macOS, and Linux without installing a separate server or exposing data to third‑party clouds. Copying text, images, or files on one machine and pasting them on another currently requires proprietary sync services or manual transfer workflows.

What This Does CrossPaste provides a server‑less, end‑to‑end encrypted pasteboard that syncs over LAN. Key components and their responsibilities:

  • Core networkingapp/src/commonMain/kotlin/com/crosspaste/net/PasteClient.kt and app/src/commonMain/kotlin/com/crosspaste/net/PasteServer.kt implement the client‑server protocol that moves pasteboard items between devices.
  • Pairing & routingapp/src/commonMain/kotlin/com/crosspaste/net/routing/PairingV3Routing.kt and app/src/commonMain/kotlin/com/crosspaste/net/routing/SyncRouting.kt handle v3 pairing, session management, and sync pushes/pulls.
  • Rich content handlingapp/src/commonMain/kotlin/com/crosspaste/paste/PasteboardMonitor.kt watches the local clipboard; app/src/commonMain/kotlin/com/crosspaste/image/OCRModule.kt extracts text from images locally, avoiding any network transfer.
  • UI layers – The desktop UI is built with Compose Multiplatform (app/src/commonMain/kotlin/com/crosspaste/app/AppWindowManager.kt); the web sidepanel lives in web/src/sidepanel/App.tsx and web/src/sidepanel/index.html; the CLI entry point is cli/src/cliNativeMain/kotlin/com/crosspaste/cli/Main.kt.
  • Encryption – Asymmetric keys are generated and stored per device; the crypto logic resides in app/src/commonMain/kotlin/com/crosspaste/net/plugin/ClientEncryptPlugin.kt and ServerEncryptPluginFactory.kt.

How It Is Wired Execution starts at the CLI (cli/src/cliNativeMain/kotlin/com/crosspaste/cli/Main.kt) or the desktop Compose entry (app/src/commonMain/kotlin/com/crosspaste/app/AppWindowManager.kt). The CLI invokes Main.kt which bootstrap the Kotlin/Native runtime and launches the UI. User actions in the UI flow through AppWindowManager.ktPasteboardMonitor.ktPasteClient.kt, which contacts the paired peer via the routing layer (PairingV3Routing.kt). Sync updates travel through SyncRouting.kt and are persisted to the local SQLite database (Sqlite badge in README). The web sidepanel (web/src/shared/core/index.ts) communicates with the same backend over WebSocket (web/src/sidepanel/App.tsx), enabling browser‑to‑device clipboard sync. OCR runs entirely in-process (image/OCRModule.kt) and writes extracted text back into the pasteboard without leaving the device.

How To Use It

  • Clone the repository verbatim:
  git clone https://github.com/moses-y/crosspaste-desktop
  • Build & run (first run downloads JetBrains Runtime and Gradle deps):
  cd crosspaste-desktop
  ./gradlew app:run

No environment variables or secret keys are required for basic LAN sync; the app generates its own key pair on first launch.

Real‑World Use A user copies a markdown snippet on a MacBook; the snippet appears instantly on a Windows desktop’s sidepanel and can be pasted into any editor. To retrieve a historic clip, the CLI command crosspaste search --query "error message" (exposed by cli/src/cliNativeMain/kotlin/com/crosspaste/cli/Main.kt) queries the local SQLite store and prints matching entries. The Chrome extension (web/src/sidepanel/index.html) mirrors the system clipboard, so a URL copied from a browser on one machine is paste‑able on any other device running CrossPaste.

Code Health & Issues

  • 271 test files exist across the project; CI runs on every push (.github/workflows/ci.yml).
  • 27 documentation files are present; a full changelog and license (LICENSE – AGPL‑3.0) are available.
  • Dependabot is enabled (.github/dependabot.yml), keeping web/package.json and Gradle files up to date.
  • No structural red flags were detected; the repo includes a .gitignore, CLAUDE.md, and standard CI configs.

The Bottom Line CrossPaste delivers a functional, cross‑platform pasteboard with end‑to‑end encryption and no central server, making it suitable for privacy‑conscious teams that need seamless clipboard sharing across desktops and browsers. The codebase is well‑structured with clear entry points and a solid test suite, but the learning curve is moderate because the pairing and routing logic span multiple Kotlin modules. It is a solid choice for organizations that value data locality and are comfortable with a Kotlin/Compose‑based desktop client.