It helps the algorithm and motivates me to add more enterprise features!
OTT Box is a premium streaming platform that brings the cinema experience to your screen. Built with cutting-edge Next.js 16 and powered by TMDB API, it delivers a rich, immersive viewing experience with auto-playing trailers, dynamic content discovery, and a sleek Netflix-inspired interface.
- π Zero-Click QR Login - Real-time Netflix-style WebSocket auth from mobile to desktop.
- π Premium Emailing - Automated, custom-branded Welcome & Magic Link emails.
- π‘οΈ Secure Magic Links - Advanced database checks to prevent ghost account creation.
- π¬ Shorts/Reels Feed - Shorts/Reels-style vertical video feed for immersive trailer discovery.
- π‘οΈ Smart Watchlist - Protected watchlist with authentication and easy management.
- π± PWA Support - Installable as a native app on all devices.
- π Touch Interactions - Swipe, scroll, and long-press gestures optimization.
- π₯ Auto-Playing Trailers - Cinematic hero section with YouTube video backgrounds
- π± Fully Responsive - Seamless experience across all devices
- π Premium UI/UX - Netflix-style design with glassmorphism effects
- π Smart Search - Real-time content discovery across movies and TV shows
- π¬ Dynamic Categories - Trending, Top Rated, Series, and Genre-based browsing
- β‘ Lightning Fast - Server-Side Rendering with Next.js App Router
- π¨ Rich Animations - Smooth transitions and interactive hover effects
- πΊ Video Player - Integrated streaming capabilities
- π Multi-Content Support - Movies, TV Series, Seasons, and Episodes
- βοΈ Next.js 16 - Latest App Router with React Server Components
- π¨ React 19 - Server Components & Concurrent Features
- π TypeScript - Full type safety throughout the application
- ποΈ Supabase - Backend as a Service for user management
- π¬ TMDB API - The Movie Database for content metadata
- π Authentication - Secure user authentication with Supabase
- π¨ Vanilla CSS - Custom design system with CSS Modules
- β¨ Glassmorphism - Modern frosted glass UI effects
- πΉ Lucide React - Beautiful, consistent iconography
- π Smooth Animations - CSS transitions and transforms
- πΉ Video.js - Professional video player integration
- π₯ YouTube Embed - Trailer playback in hero section
- πΌοΈ Next/Image - Optimized image loading and caching
Our architecture is designed to handle real-time concurrency, secure authentication, and edge-deployed frontend delivery.
This diagram presents the platform at an architectural level, focused on service responsibilities and runtime boundaries:
- Edge-first frontend delivery: Next.js 16 SSR/RSC is deployed on Vercel Edge for low-latency global rendering, static asset optimization, and CDN-assisted distribution.
- Client intelligence at the edge: Desktop browser and PWA/mobile clients maintain local capabilities (service worker, cache, playback state) to reduce round trips and improve UX continuity.
- Real-time trust path: Zero-click QR login bridges desktop and mobile through Supabase Auth + Realtime channels, enabling secure cross-device session initiation.
- Core data domains: User profiles, watchlist state, playback tracking, and search analytics are modeled as first-class backend domains for personalization and observability.
- External provider integration: TMDB powers metadata discovery, YouTube powers trailer/media surfaces, and SMTP/Nodemailer handles transactional communication.
This diagram explains how requests, auth events, and realtime signals move across layers in production:
- Layered topology: Client Edge -> Delivery (Vercel CDN) -> Application (Next.js App Router + API routes) -> Backend (Supabase services).
- Zero-click auth choreography: Desktop generates QR token, mobile scans and authenticates, backend validates and publishes session state, desktop completes login without manual credential entry.
- API surface separation: Dedicated routes for auth, analytics tracking, notifications/email, and search/view logging isolate concerns and simplify scaling.
- Data and event pipelines: Realtime streams handle instant state updates while relational tables persist durable entities like users, watchlist, and search logs.
- Media + metadata routing: Catalog intelligence (TMDB) and trailer delivery (YouTube) are integrated as upstream systems behind the application layer.
- Node.js (v18 or higher)
- NPM or Yarn package manager
- Supabase account (free tier available)
- TMDB API key (free registration)
# 1. Clone the repository
git clone https://github.com/SonuPaikrao/ottbox.git
# 2. Navigate to project directory
cd ott-box
# 3. Install dependencies
npm install
# 4. Setup environment variables
# Create .env.local file and add:
# NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# 5. Start development server
npm run dev
# 6. Open in browser
# Visit http://localhost:3000Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
### **Authentication Setup (Important)**
To enable Google Sign-In:
1. Go to **Authentication > Providers** in Supabase Dashboard.
2. Enable **Google**.
3. **In Google Cloud Console**:
- Create Credentials > OAuth Client ID.
- **Application Type**: Select **Web application** (NOT Chrome Extension).
- **Name**: "OttBox Web" or similar.
4. Add **Authorized redirect URIs** in Google Cloud:
- `https://wkfynjofytyfpvimlfno.supabase.co/auth/v1/callback`
### **Production & Vercel Setup**
When deploying to Vercel:
1. Go to **Supabase Dashboard > Authentication > URL Configuration**.
2. **Site URL**: Set this to your production URL (e.g., `https://ott-box-weld.vercel.app`).
3. **Redirect URLs**: Add the following:
- `https://ott-box-weld.vercel.app/**`
- `http://localhost:3000/**`
**Note**: You do NOT need to change anything in Google Cloud Console if you are using the Supabase Callback URL correctly. Just ensure Supabase allows your Vercel domain.
- π¨ Dark Cinema Palette - Deep blacks (#0a0a0a), rich purples, and vibrant accents
- π Hero Section - Full-screen video background with auto-playing trailers
- π Micro-Interactions - Hover effects, scale transforms, and smooth transitions
- π± Responsive Grid - Adaptive layouts for all screen sizes
- π Blur Effects - Strategic use of backdrop filters for depth
- π¨ Display Font - Bold, cinematic headings
- π Body Font - Clean, readable sans-serif
- π― Hierarchy - Clear visual distinction between content types
ottbox/
βββ π public/ # Static assets, PWA files, architecture maps
β βββ πΊοΈ System_Architecture_Map.png
β βββ πΊοΈ System_Connectivity_Map.png
β βββ π¬ ott-banner.png
β βββ π manifest.json
β βββ βοΈ sw.js / workbox-*.js
β βββ π¨ icons/, svg/jpg/png assets
βββ π src/
β βββ π app/ # App Router: pages + route handlers
β β βββ π page.tsx # Home
β β βββ π api/ # REST endpoints (auth, track, logs, notifications)
β β βββ π¬ movies/, πΊ series/, π₯ trending/
β β βββ π search/, ποΈ shorts/, β€οΈ watchlist/
β β βββ π title/[id]/, βΆοΈ watch/[id]/
β β βββ π auth/callback/, π± qr/
β β βββ π¨ layout.tsx, globals.css, loading/error boundaries
β βββ π components/ # Feature-organized UI modules
β β βββ Home/, Navbar/, Player/, Search/
β β βββ Title/, Shared/, Shorts/, Skeletons/, Analytics/
β β βββ NotificationPopup.tsx
β βββ π context/ # Global state providers
β β βββ AuthContext.tsx
β β βββ WatchlistContext.tsx
β β βββ HistoryContext.tsx
β β βββ ToastContext.tsx
β βββ π lib/ # Integrations and utility services
β β βββ api.ts, tracker.tsx
β β βββ supabase.ts, supabase-browser.ts, supabase-admin.ts
β β βββ email.ts, email-templates.ts
β βββ π types/ # Project type declarations
βββ π package.json # Scripts and dependencies
βββ π next.config.ts # Next.js runtime config
βββ π tsconfig.json # TypeScript config
βββ π vercel.json # Deployment config
βββ π eslint.config.mjs # Lint rules
βββ π *.sql # Supabase setup/migration scripts
βββ π .env # Local environment variables
βββ π README.md
- Full-screen video background with YouTube trailers
- Auto-rotation between trending content
- Smooth fade transitions between videos and images
- CTAs for "Play Now" and "More Info"
- Horizontally scrollable movie/series cards
- Categories: Trending Today, Top Rated, TV Series, By Genre
- Lazy loading for optimal performance
- Hover effects with scale and elevation
- Real-time search across all content
- Genre-based filtering
- Advanced discovery with sort options
- Responsive grid layouts
- Custom video player interface
- Episode selection for TV series
- Playback controls and settings
- Fullscreen support
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy to production
vercel --prodAdd the following environment variables in Vercel Dashboard:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
Connect your repository to Vercel for automatic deployments on every push.
- Daily trending movies and TV shows
- Real-time updates from TMDB
- Personalized recommendations
- Highest-rated films across all time
- Curated collections
- Award-winning content
- Popular series with season tracking
- Episode-by-episode viewing
- Binge-worthy collections
- Action & Adventure
- Comedy & Drama
- Sci-Fi & Fantasy
- Horror & Thriller
- Romance & Animation
We welcome contributions! Please follow these steps:
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature) - πΎ Commit your changes (
git commit -m 'Add amazing feature') - π€ Push to the branch (
git push origin feature/amazing-feature) - π Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π¬ TMDB - For providing comprehensive movie and TV data
- ποΈ Supabase - For backend infrastructure
- βοΈ Next.js Team - For an amazing framework
- π¨ Design Inspiration - Netflix, Disney+, and other streaming platforms


