Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

qzhao19/LynxScreen

Open more actions menu

Repository files navigation

LynxScreen

Latest Release: v1.0.0

LynxScreen: The open-source cross-platform screen sharing

1. Overview

LynxScreen is an open-source, cross-platform desktop application for peer-to-peer screen sharing, built with Electron and Svelte. It enables real-time screen sharing between two peers using WebRTC — no server required. Connection signaling is handled entirely through compact lynxscreen:// URLs exchanged out-of-band (e.g., via chat or email).

Figure 1

Figure 1: LynxScreen main interface showing the connection setup screen.

2. Architecture & Features

Architecture

LynxScreen follows a layered Facade pattern for WebRTC:

┌─────────────────────────────────────────────┐
│              Svelte Stores                  │ 
│         (reactive UI state)                 │
├─────────────────────────────────────────────┤
│          ConnectionManager                  │  Orchestrator: phases, locking, URL encode/decode
├─────────────────────────────────────────────┤
│            WebRTCService                    │  Facade: unified API
├──────────┬──────────────┬───────────────────┤
│ PeerConn │ DataChannel  │  MediaStream      │  Sub-services
│ Service  │ Service      │  Service          │
├──────────┴──────────────┴───────────────────┤
│           Browser WebRTC APIs               │  RTCPeerConnection, getUserMedia, getDisplayMedia
└─────────────────────────────────────────────┘
  • MediaStreamService — Acquires and manages audio/display streams
  • PeerConnectionService — Wraps RTCPeerConnection (SDP, ICE, tracks)
  • DataChannelService — Manages cursor position and ping data channels
  • WebRTCService — Facade exposing a single API surface to the session layer
  • ConnectionManager — Orchestrates the full connection lifecycle (init → offer → answer → connect → disconnect)

Tech Stack

Layer Technology
Desktop Runtime Electron 39
UI Framework Svelte 5
Build Tool Vite 7 + vite-plugin-electron
Packaging electron-builder
Testing Vitest + jsdom
Logging electron-log

Core Features

  • Serverless P2P — Peers connect directly via WebRTC. SDP offer/answer is encoded into compact lynxscreen:// URLs exchanged out-of-band (chat, email, etc.).

  • Real-Time Performance — Leverages WebRTC technology for low-latency screen sharing. As a serverless solution, Enable microphone on connect cannot be toggled during an active session if not configured at connection start.

  • No Account Required — Simple setup with no sign-up, login, or account creation required. Just exchange URLs to establish a connection.

  • No Server Storage — No data is ever stored on any server. Only a direct peer-to-peer connection exists between you and the screen sharing participant.

  • Cross-Platform — Builds for macOS (.dmg), Windows (.exe), and Linux (.AppImage / .deb).

3. Getting Started

Prerequisites

  • Node.js v24.13.0+ (see .node-version)
  • npm (comes with Node.js)
  • macOS / Windows / Linux for development and packaging

Connectivity

This app uses public STUN servers (e.g., stun:stun.l.google.com:19302) by default to establish direct peer-to-peer connections. For the best experience, both peers should be on the same local network or behind STUN-compatible NAT.

You can optionally add your own TURN server in the app settings for improved connectivity across restrictive networks.

Installation

# Clone the repository
git clone https://github.com/qzhao19/LynxScreen.git
cd LynxScreen

# Install dependencies
npm install

# Start development (Vite dev server + Electron)
npm run dev

The app opens automatically. Vite provides hot module replacement for the Svelte renderer; the main/preload processes rebuild on save.

4. NPM Scripts & Build Commands

Command Description
npm run dev Start dev server + Electron with HMR
npm run build Build renderer to dist/ and main/preload to dist-electron/
npm test Run unit tests (excludes e2e)
npm run test:e2e Run end-to-end tests
npm run test:all Run all tests
npm run test:coverage Run unit tests with V8 coverage report
npm run lint Run ESLint
npm run electron:pack Build and package into a directory for local testing (no installer)
npm run electron:build:mac Build macOS .dmg + .zip (universal)
npm run electron:build:win Build Windows .exe (NSIS, x64 + arm64)
npm run electron:build:linux Build Linux .AppImage + .deb (x64)
npm run electron:build:linux:arm64 Build Linux ARM64 targets: .deb, .flatpak, and .AppImage
npm run electron:build:linux:debug Build Linux .deb for debugging

Output goes to the release/ directory. See electron-builder.yml for full packaging configuration.

# Or target a specific platform
npm run electron:build:mac
npm run electron:build:win
npm run electron:build:linux

5. Testing

# Unit tests
npm test

# E2E tests (full P2P connection flow with mocked WebRTC)
npm run test:e2e

# Coverage report
npm run test:coverage

Tests are located in tests/:

  • tests/unittests/ — Unit tests for each service and utility
  • tests/e2e/ — End-to-end P2P connection flow tests

6. License

This project is licensed under the MIT License - see the LICENSE file for details.

About

LynxScreen: The open-source cross-platform screen sharing

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.