Skip to content

About

A Pear-native Nutflix: peer-to-peer video installed and updated from a pear:// link; HyperDHT with nutflix-pear seeders, WebRTC with browsers and nfxd.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

nutflix-runtime

A Pear-native Nutflix: a peer-to-peer video app that lives on the Pear network. It is installed from a pear:// link and updates itself from that same link. There is no download server.

Status: pre-alpha. The worker, the renderer and both shells are in the tree. CI packages the Pear v3 app on five targets, launches it, installs it with pear install and plays a video in it. Nothing is released yet: there is no production pear:// link. The design is in ADR 0001, the spikes behind it are in docs/spikes/, and the release runbook is docs/release.md.

What it is for

  • Watch free NFX videos seeded by nutflix-pear desktop apps, over HyperDHT (NFX-12) natively in the app's Bare worker.
  • Trade video with web browsers and nutflixd (nfxd before its 0.1.5) over WebRTC, signaled over Nostr (NFX-10 §6). This runs in the app's Chromium window, and is the same player as the web client.
  • Play videos only nutflixd serves (nfxd before its 0.1.5), from the HTTPS origins its beacons name, through that same player in the window (with WebRTC on or off; off means no peer connection). Those hosts see the viewer's IP address and which videos it plays, as any seeder does; Settings says so. The Bare worker stays HyperDHT-only. Shape (a)'s main refuses https: to private IP literals and to localhost and .local names, redirects included, so a relay on a LAN or tailnet IP literal or a .local name gets no NIP-11 search hints (its wss: still works).
  • Fall back to HyperDHT alone where the runtime has no WebRTC, WebAssembly or Media Source Extensions.
  • Seed what it plays, and publish new videos from the app.

Paid videos (Cashu, pay/1) are not in scope for the first version.

How it ships

  • Pear v3: pear install pear://<key>. Updates come over the Pear network from the same link. Each release needs a pear multisig quorum, and the app applies an update only when a SovTech-signed Nostr release notice names it. Pear 3.7.0 stops with ENOENT if the folder it installs into is missing, so make it first:

    mkdir -p ~/Applications                              # macOS
    mkdir -p ~/.local/bin ~/.local/share/applications    # Linux
  • Pre-v3 Pear (pear run pear://…): unsandboxed legacy software, not released, under the conditions in ADR 0001's amendment. Holepunch removed pear run in Pear v3. Prefer pear install. See shells/pear-v2.

Relationship to nutflix-pear

This repository reuses nutflix-pear's packages (@sovit/core, @sovit/ui, @sovit/seeder) through a pinned git submodule rather than copying them, so the wire formats stay byte-compatible with deployed seeders.

Layout

  • vendor/nutflix-pear: nutflix-pear, a git submodule pinned to one commit. Its core, seeder and ui packages are npm workspaces here, built from source.
  • packages/worker: the Bare worker, the data plane. Its protocol is in its README.
  • packages/renderer: the Chromium renderer, nutflix-pear's UI over a worker pipe. See its README.
  • shells/pear-v3: the Pear v3 desktop shell: a hardened Electron main, the worker started through pear-runtime, packaged on five targets (updates off). See its README.
  • shells/pear-v2: the pinned pear run shell, unsandboxed legacy software on Pear v2.6.5 with its own dependency pins. See its README.

Clone with git clone --recurse-submodules, or run git submodule update --init after a plain clone. npm ci, npm run build, npm run lint and npm test work as in nutflix-pear. The tests run in CI (.github/workflows/ci.yml).

Licence

AGPL-3.0-or-later. See LICENSE.

About

A Pear-native Nutflix: peer-to-peer video installed and updated from a pear:// link; HyperDHT with nutflix-pear seeders, WebRTC with browsers and nfxd.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages