MCPcopy Create free account
hub / github.com/Jelly-Party/jelly-party-extension

github.com/Jelly-Party/jelly-party-extension @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
234 symbols 377 edges 74 files 1 documented · 0% ● updated 11d ago★ 49

Browse by type

⨍ Functions 147◇ Types & classes 87
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Jelly Party

Watch videos with friends, in sync.

Jelly Party is a browser extension and small Cloudflare Durable Object relay. Open the sidebar on a video, create a party, share the magic link, and chat while play, pause, and seek stay synchronized. There are no accounts; parties are private through their long, unguessable invite links.

Product

  • Chrome, Firefox, and Edge extension published over the existing store listings
  • Native browser sidebar/side-panel UI
  • Display name plus emoji—no avatars
  • Magic-link joining with optional per-site permissions
  • Ephemeral peer list and up to 1,000 party-history entries, cleared after 30 inactive days
  • Bidirectional HTML video play, pause, and seek synchronization
  • New protocol and backend at wss://meet.jelly-party.com; no old-client compatibility

The implementation contract is the Jelly Party 2.0 specification.

Repository

Package Responsibility
jelly-party-extension Shared sidebar UI, browser adapters, and small page video driver
jelly-party-server Cloudflare Worker and one Durable Object per party
jelly-party-lib Shared validated protocol and small cross-package utilities
jelly-party-website Website, /join handoff, support, and privacy pages

The extension background process owns the party connection and presence so closing or navigating away from the sidebar does not leave the party. A small content script runs in relevant frames to discover and control an HTML video. The components communicate through extension runtime messages. A party-scoped Durable Object validates and relays messages, keeps its latest 1,000 history entries, and clears all party data 30 days after its final peer disconnects. Rejoining before then restarts that countdown.

Development

The Nix development shell is configured to activate through nix-direnv after a one-time approval and provides the Playwright browsers. Vite+ manages Node.js, pnpm, formatting, linting, tests, builds, and project tasks through the vp CLI.

# Approve the shell once after cloning, then install dependencies
direnv allow
vp install

# Start the local Worker and website, then open temporary Chrome and Firefox profiles
vp run dev

# Explore project tasks
vp run

vp run dev installs the extension into disposable Chrome and Firefox profiles, opens both at the Blender test video, and reloads the extension when source files change. Development uses the same optional per-site permissions as store builds. Stopping and restarting the command creates clean profiles, which resets those permissions and lets the grant flow be tested repeatedly. Development targets the local website and /join route on port 5180 and the local Worker on port 8080. The website listens on all interfaces, so a Lima guest can be reached from macOS through the VM's forwarded port.

Cross-package workflows belong in Vite Task and are listed by vp run. Dependency installation generates the website's SvelteKit configuration, so static checks work before the first development server or build.

Before submitting a release to the extension stores, run:

vp run stage

This is the final release rehearsal: it runs the complete local validation suite, builds and validates the exact production archives, verifies the deployed website, join route, release version, party creation, and secure WebSocket handshake, then loads those immutable production builds into fresh temporary Chrome and Firefox profiles. It neither deploys nor hot-reloads. Close both browsers to finish the task.

See Releasing for the deploy, download, and store submission sequence.

Build configuration

All public endpoints and project/store links have validated production defaults in config/urls.ts. Every value can be overridden at build time with the corresponding variable shown in .env.example. These values are baked into the website and store archives. vp run build leaves the complete production output together in artifacts: unpacked chrome and firefox directories for manual testing, plus validated deterministic ZIPs for store submission. Building does not publish an extension or deploy a Worker or site; those remain explicit manual operations.

Production builds require HTTPS URLs and a WSS relay. Test builds are the only mode that permits explicit localhost HTTP/WS overrides.

Cloudflare deployment

One Cloudflare Worker deploys the website, /join handoff, health endpoint, WebSocket relay, and party Durable Object together. Static files bypass Worker execution; /, /health, /party/*, and /admin/* run Worker-first. Local development and Worker builds use the pinned Cloudflare Vite plugin through Vite+, preserving existing local D1 and Durable Object state. Deployment, types, and local and remote D1 migrations use the pinned cf CLI.

Deploy the application to production after validation:

vp run deploy

Production uses https://jelly-party.com for the website, https://join.jelly-party.com/join for invite handoff, and wss://meet.jelly-party.com for party WebSockets. After deployment, the task smoke-tests all three endpoints and a real secure WebSocket handshake. All three hostnames route to the same Worker deployment. The browser extension remains a separately packaged store artifact and is never published by these deploy tasks.

Private analytics

https://dashboard.jelly-party.com shows live party membership and historical usage. Cloudflare Access protects the entire hostname; configure an Allow policy for the dashboard administrators. ACCESS_TEAM_DOMAIN and ACCESS_AUD in packages/jelly-party-server/cloudflare.config.ts identify that Access application. The Worker also verifies Access signatures, issuer, audience, and expiry on every dashboard request.

Party Objects report membership on joins, leaves, video changes, and a one-minute alarm. The alarm checks the existing WebSocket heartbeat acknowledgements, so quiet viewers remain present and abandoned connections are closed. Events and the latest membership snapshot stay in a local outbox until D1 and LiveStats acknowledge delivery. Failures do not block chat or playback. This adds one alarm, one D1 checkpoint, and one LiveStats update per connected party per minute. The dashboard receives pushes and checks its connection; historical reports refresh on demand.

D1 stores party starts, participation once per peer per party, chat and playback counts, and bounded onboarding and playback outcomes. Outcomes include browser family and extension version; random command IDs associate a recipient's playback result with its attempt. Sites are reduced to public registrable domains. Usage records exclude names, peer IDs, invite IDs, video titles, full URLs, IPs, and message contents. Test and development extensions mark their traffic as test; production reports exclude it by default. Records from older clients have unknown client metadata.

The dashboard separates confirmed and uncertain membership. Open durations stop at the last membership evidence. Connected duration needs one participant and together duration needs two. Both measure connection time. The funnel follows parties started in the selected UTC dates through a second participant and five minutes together. Party details show lifetime activity and load in pages of 100 when opened. Activity counts and diagnostics use the selected dates. Browser, site, and version filters match individual diagnostic events and select whole parties for the funnel and party details.

Playback reliability counts each remote command once per recipient and shows how many parties were affected. An eventual application counts as a success, with recoveries visible. Superseded commands, unanswered commands, and clients without outcome reporting are shown separately. Invite counters describe activity within the extension's permission screen.

In Cloudflare Workers Logs, look for structured events about joins, connection and rate-limit failures, analytics delivery, and slow dashboard reports. The dashboard history endpoints also expose report duration in Server-Timing. Custom logs use bounded reasons without invite paths or personal data. vp run deploy applies D1 migrations before uploading the Worker.

Cloudflare code deployments interrupt existing party WebSockets. The extension reconnects automatically; if its retries fail, the sidebar offers Retry.

Store assets

The Chrome, Edge and Firefox listing images are rendered from the components the extension ships, not drawn by hand. The website's /press route lays out every frame at the exact size each store expects, and the capture task screenshots them:

vp run assets:store

The images land in artifacts/press/ beside the store archives, so they are build output rather than committed files: regenerate them whenever the UI changes and upload from there. Frames are captured at twice the size each store advertises; run the task with JELLY_PRESS_SCALE=1 for exact-size files where a dashboard insists on them. The screenshots use the repository's own static/sync-demo.webm clip; never put a streaming service's player or footage in a listing image. The accompanying listing text lives in docs/store-listing.md.

Quality loop

vp check          # format, lint, and type-check
vp run check:wrangler # generate binding types from cloudflare.config.ts
vp test --run     # Vitest
vp run test:analytics # real Workers/D1 analytics and Access authorization tests
vp run test:e2e   # Playwright two-peer flow
vp run test:e2e:firefox # Firefox loaded-extension acceptance flow
vp run test:e2e:production # store build against the deployed /join route
vp run smoke:production # live website, join, health, and WSS handshake
vp run stage      # full release gate, then production builds in fresh browsers
vp run build      # loadable production folders plus validated store ZIPs
vp run build:all  # every deployable build plus store archives

Both acceptance flows build a test extension whose manifest pre-grants every origin, so they cannot see the optional site permission real users hit on their first join. test:e2e:production covers that gap by driving the store build against the deployed /join route, through the grant page that replaces the invite in the same tab and asks for the destination origin. Accepting the browser's own permission dialog cannot be automated, so finish that step by hand before publishing.

The Chromium Playwright flow is the main acceptance test: it loads two real extension profiles, creates a party, joins through the shared link, exchanges chat, and synchronizes play, pause, and seek in both directions. Because Playwright cannot load Firefox WebExtensions, the Firefox task runs the same high-value flow against a native Firefox sidebar through Selenium. Add focused Vitest coverage only for logic that can fail independently.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 100
Class 69
Function 47
Interface 18

Languages

TypeScript100%

Modules by API surface

src/apps/sidebar/Vue-IFrame/Vue-IFrame.ts22 symbols
src/services/provider/providers/Controller.ts11 symbols
src/services/messaging/iFrameMessenger.ts9 symbols
src/apps/sidebar/Vue-IFrame/store/party/index.ts9 symbols
src/apps/sidebar/Sidebar.ts9 symbols
src/services/provider/providers/youtube/YouTubeCustomizer.ts8 symbols
src/services/provider/providers/vimeo/VimeoCustomizer.ts7 symbols
src/services/provider/providers/netflix/NetflixCustomizer.ts7 symbols
src/services/provider/providers/netflix/NetflixController.ts7 symbols
src/services/provider/providers/disneyplus/DisneyPlusCustomizer.ts7 symbols
src/services/provider/providers/default/DefaultCustomizer.ts7 symbols
src/services/provider/providers/amazon/AmazonCustomizer.ts7 symbols

For agents

$ claude mcp add jelly-party-extension \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page