Sign inSign up

rasooll/popkorn

By rasooll

•Updated 6 months ago

Watch videos together, in perfect sync — no account, no install, just a browser.

Image
0

429

rasooll/popkorn repository overview

ā šŸæ Popkorn

Watch videos together, in perfect sync.

⁠What it does

Popkorn lets multiple people watch the same video in sync inside a shared room — no account, no install, just a browser. Supports both local video files and direct streaming URLs.

  • Real-time play / pause / seek sync with latency compensation
  • Local files stay on your machine — nothing is uploaded
  • Host controls who can drive playback
  • Live chat and ping display per member

⁠Running with Docker

The easiest way to deploy Popkorn is with the pre-built image from Docker Hub.

docker run -d \
  --name popkorn \
  --restart unless-stopped \
  -p 3001:3001 \
  -e CORS_ORIGIN=https://your-domain.com \
  rasooll/popkorn:latest

Or with Docker Compose — create a docker-compose.yml:

services:
  app:
    image: rasooll/popkorn:latest
    restart: unless-stopped
    ports:
      - "3001:3001"
    environment:
      CORS_ORIGIN: "https://your-domain.com"

Then run:

docker compose up -d

Once running, open http://your-server:3001 in your browser.

⁠Environment variables
VariableDefaultDescription
PORT3001Port the server listens on
CORS_ORIGINhttp://localhost:3001Allowed origin for Socket.io (set to your domain)

⁠Requirements (local development)

  • mise⁠ — used to manage the Node.js version

⁠Setup

# 1. Clone and enter the project
git clone https://github.com/rasooll/popkorn
cd popkorn

# 2. Trust the mise config and install Node 22
mise trust
mise install

# 3. Install all dependencies
mise run install

⁠Available tasks

CommandDescription
mise run installInstall all npm dependencies (root, client, server)
mise run devStart client and server in development mode
mise run testRun all unit tests
mise run test:watchRun tests in watch mode
mise run docker:setupCreate the buildx builder (run once before pushing)
mise run docker-push <tag>Build and push multi-platform image to Docker Hub

⁠Running in dev

mise run dev

This starts both servers concurrently:

ServiceURL
Frontend (Vite)http://localhost:5173⁠
Backend (Express + Socket.io)http://localhost:3001⁠

The Vite dev server proxies /socket.io to port 3001 automatically — no manual CORS config needed.

To verify the backend is up:

curl http://localhost:3001/health
# {"status":"ok"}

⁠Building and publishing a Docker image

# First time only — create the multi-platform buildx builder
mise run docker:setup

# Build for linux/amd64 + linux/arm64 and push to Docker Hub
mise run docker-push v1.0.0

⁠Tests

mise run test

66 tests across client and server using Vitest⁠.

PackageFrameworkCoverage
serverVitestroomManager — all room lifecycle, state mutations
clientVitest + Testing Libraryfingerprint, RoomLobby, SourceSelector

⁠Project structure

popkorn/
ā”œā”€ā”€ .mise.toml           Node 22 + task definitions
ā”œā”€ā”€ .mise/tasks/         File-based mise tasks (docker-push)
ā”œā”€ā”€ Dockerfile           Multi-stage production build
ā”œā”€ā”€ docker-compose.yml   Production compose file
ā”œā”€ā”€ client/              React + Vite + TypeScript frontend
│   └── src/
│       ā”œā”€ā”€ components/
│       ā”œā”€ā”€ hooks/
│       ā”œā”€ā”€ lib/
│       └── types/       ← all shared types live here
└── server/              Node.js + Express + Socket.io backend
    └── src/

Tag summary

Content type

Image

Digest

sha256:fa4822954…

Size

56.8 MB

Last updated

6 months ago

docker pull rasooll/popkorn