HyperTube is a modern, high-performance, containerized microservices web application designed for discovering, searching, and streaming movies directly from torrents. The platform integrates instant video transcoding (including dual-stream capabilities: standard and 144p downscaled streams) and features a fully-featured user management system with multi-provider OAuth, multilingual support, and interactive social features like comments and viewing history.
HyperTube is designed using a robust microservices architecture orchestrated with Docker Compose, with a secure NGINX Reverse Proxy acting as the single entry point.
┌──────────────────────┐
│ Web Browser │
└──────────┬───────────┘
│ (Ports 80 / 443 HTTPS)
▼
┌──────────────────────┐
│ NGINX Reverse Proxy │
└──────────┬───────────┘
│
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ React App │ │ Rails Auth │ │ Django Movie │
│ (Frontend) │ │ (Backend) │ │ (Backend) │
└──────────────┘ └──────┬───────┘ └──────┬───────┘
│ │
└──────────┬───────────┘
▼
┌──────────────┐
│ PostgreSQL │
│ (Database) │
└──────────────┘
- Frontend (React Router & TailwindCSS): Located under
/frontend/my-react-app. It handles user interface, language translations (English/French), state management, profiles, search filters, and video streaming players. Runs on port3000internally. - Auth Service (Ruby on Rails API): Located under
/auth. Handles authentication, JWT creation/verification, user profiles, email dispatching (using Mailers for password resets), and multi-provider OAuth (42 Intra, Google, and GitHub). Runs on port8001internally. - Movie Service (Django REST Framework): Located under
/movies. Handles searching the TMDb and YTS APIs, initializing background torrent downloads sequentially using libtorrent, tracking active downloads, and streaming/transcoding media files on-the-fly (with dynamic 144p transcoding via FFmpeg). Runs on port8000internally. - Database (PostgreSQL 18): Managed through an initialization schema
/init.sqlwhich provisions databases for both Rails and Django applications. - Nginx Reverse Proxy: Located at the root
/nginx.conf. Redirects all HTTP traffic to HTTPS, serves SSL/TLS protocols securely, handles internal auth subrequests to guard protected video APIs, and directs client routes dynamically.
- Secure Sign In / Sign Up: Full username and password credentials flow protected by secure bcrypt hashing.
- JWT Token-Based Authentication: Clean cookie-based JWT token exchange between Rails and React.
- Interactive OAuth2 Sign-In: One-click integration with:
- Google OAuth
- GitHub OAuth
- 42 Intra
- Mailers & Password Recovery: Secure "forgot password" workflows that generate self-signed reset tokens and send notification emails.
- Account Settings: Modify user details (first name, last name, username, profile picture URL, language preference) or update email and password securely.
- TMDb Integration: Browse trending popular movies, fetch rich descriptions, movie backdrops, and cast metadata (top 5 actors with profile images).
- YTS Torrent Indexing: Seamless integration searching high-quality torrents.
- Fuzzy Search Sorting: Results are dynamically sorted using string matching algorithms (difflib matching) against your search query.
- Sequential Torrent Downloader: Integrated background torrent worker in Python using
libtorrentallowing you to start watching movies without waiting for the full download to complete. - Dual Quality Stream (Default & 144p):
- When a movie is requested, Django spawns a background thread to download the target file.
- Once download progress exceeds 5%, an asynchronous FFmpeg transcoding pipeline initiates to downscale the live file into a separate, lightweight
144pstream format. - The frontend dynamically lets users switch between default and
144pquality streams.
- HTTP Range Requests Support: Full support for standard browser range-request-seeking, enabling users to jump forward or backward smoothly.
- Real-time Comments Section: Share opinions directly on the watch page of any indexed movie identifier.
- Viewing History Tracker: Automatically logs watched movies inside the user's secure account space.
- Fully Translated UI: Toggle seamlessly between English (
en) and French (fr) translations instantly.
Create a .env file in the root directory to populate configuration settings before building.
# Database Credentials
POSTGRES_USER=postgres_user_here
POSTGRES_PASSWORD=postgres_password_here
POSTGRES_DB=postgres_db_here
DB_BACKEND_USER=movies_user
DB_BACKEND_NAME=movies_production
DB_MOVIES_BACKEND_PASSWORD=movies_password_here
# API Keys
tmdb_api_key=your_tmdb_api_key_here
# Google OAuth Configuration
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# GitHub OAuth Configuration
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# 42 Intra Configuration
FORTYTWO_CLIENT_ID=your_fortytwo_client_id
FORTYTWO_CLIENT_SECRET=your_fortytwo_client_secret
# Google SMTP Credentials (Mailers)
GOOGLE_SMTP_USERNAME=your_gmail_address
GOOGLE_SMTP_PASSWORD=your_app_password- Docker and Docker Compose installed on your host system.
- SSL Certificates (
fullchain.pemandprivkey.pem) mapped inside the./certsfolder to secure the NGINX HTTPS proxy server.
-
Verify directory structure & SSL certs: Make sure your certificates are placed in the root folder structure:
./certs/fullchain.pem ./certs/privkey.pem
-
Boot the services: Run the following command to download, build, and run all services in detached mode:
docker-compose up --build -d
-
Accessing the App: Open your browser and navigate to:
https://localhost(Nginx automatically manages port443secure connection).
A utility script reset.sh is provided in the repository to completely clean down and reset all running docker containers, images, and mapped databases:
./reset.sh├── auth/ # Rails authentication & OAuth microservice
│ ├── app/ # Controllers, Mailers, Models, and Views
│ ├── db/ # DB schemas & migrations
│ └── Dockerfile # Rails container setup
├── movies/ # Django Torrent indexer & stream microservice
│ ├── movies/ # Core Django setup & settings
│ ├── search/ # TMDb index & search controllers
│ ├── stream/ # Libtorrent downloader, FFmpeg transcoder & streaming views
│ └── Dockerfile # Django container setup
├── frontend/ # React single-page frontend application
│ ├── my-react-app/ # React Router implementation
│ │ ├── app/ # Styles, components, languages & route pages
│ │ └── package.json # Frontend NPM configurations
│ └── Dockerfile # Frontend container setup
├── certs/ # Mapped folder for SSL fullchain & private key
├── nginx.conf # Nginx HTTP/HTTPS redirection and microservice routing
├── docker-compose.yaml # Full orchestration file for all components
├── init.sql # Initial database and user permissions script
└── reset.sh # Complete project reset script
This project is engineered as an educational cinematic streaming prototype. All rights reserved.