Skip to main content

What is Watch N Chill?

Watch N Chill is a real-time YouTube watch party application that lets you watch videos together with friends and family, no matter where they are. Built with Next.js, Socket.IO, and Redis, it provides synchronized playback, live chat, and powerful host controls for the ultimate collaborative viewing experience. Watch N Chill Hero Light

Why Watch N Chill?

Whether you’re hosting a movie night with friends across the country, watching tutorials with your study group, or sharing your favorite content with family, Watch N Chill makes it easy:
  • Perfect Synchronization - Everyone stays in sync automatically with periodic sync checks
  • No Account Required - Create or join a room instantly with just a display name
  • Simple Room Sharing - Share a short 6-character room code to invite anyone
  • Host Controls - Hosts can control playback for everyone and promote guests to co-hosts
  • Real-time Chat - Discuss what you’re watching with live messaging and typing indicators

Key Features

Synchronized Playback

Host controls play, pause, and seek. All guests stay perfectly in sync using periodic sync checks, ensuring everyone watches together.

YouTube Support

Paste any YouTube or youtu.be URL. Only the host can change the video to prevent disruptions.

Room System

Create rooms with short 6-character IDs. Join as host with a host token or as a guest with a validated display name. Rooms auto-cleanup after 24 hours.

Real-time Chat

Live chat per room with typing indicators. Messages are persisted in Redis with the last 20 messages always available.

Host Tools

Promote guests to host for collaborative control. Automatic room closing when all hosts leave to prevent abandoned rooms.

Polished UI

Beautiful room layout with video player, user list, sidebar chat, and fullscreen chat overlay. Light/dark mode support.

Tech Stack

Watch N Chill is built with modern, production-ready technologies: Frontend
  • Next.js 16 with App Router
  • React 19 with TypeScript
  • Socket.IO Client for real-time events
  • Tailwind CSS v4 for styling
  • Zod for schema validation
Backend
  • Custom Next.js server with Socket.IO integration
  • Redis (local or Upstash) for room and chat persistence
  • Zod-validated Socket.IO payloads
  • Rate limiting and connection management
Infrastructure
  • Docker and Docker Compose for deployments
  • Health check endpoints for monitoring
  • Automatic room cleanup with TTL

Architecture Overview

Watch N Chill uses a custom server architecture that combines Next.js with Socket.IO:
// server.ts - Custom Next.js + Socket.IO server
const httpServer = createServer(async (req, res) => {
  // Health check endpoint
  if (req.url === '/health') {
    res.statusCode = 200;
    res.end("heart beating");
    return;
  }
  
  // Next.js request handling
  const parsedUrl = parse(req.url!, true);
  await handle(req, res, parsedUrl);
});

// Initialize Socket.IO at /api/socket/io
initSocketIO(httpServer);
The custom server approach allows Socket.IO and Next.js to share the same HTTP server, enabling real-time features while maintaining all Next.js benefits.

How It Works

1

Create or Join a Room

Users can create a new room (becoming the host) or join an existing room using a 6-character room code. The Socket.IO connection is established via the SocketProvider.
2

Real-time Synchronization

Socket.IO handlers manage room state, video playback, and chat messages. All events are validated with Zod schemas before processing.
3

Redis Persistence

Room data, user information, and chat history are stored in Redis with automatic TTL (24 hours). The last 20 messages per room are always available.
4

Automatic Cleanup

When all users leave or the TTL expires, rooms are automatically cleaned up. Host promotion ensures rooms always have a leader.

What’s Next?

Quickstart

Get Watch N Chill running locally in minutes

Features

Explore all features in depth

Deployment

Deploy to production with Docker

API Reference

Socket.IO events and payloads

Build docs developers (and LLMs) love