Skip to content

A fire YouTube clone built with Next.js, tRPC, and AI magic β€” stream, upload, and vibe with the ultimate video experience. πŸš€πŸŽ₯πŸ”₯πŸ”΄

License

Notifications You must be signed in to change notification settings

BernieTv/YouTube-Clone

Repository files navigation

πŸ“Ί YouTube Clone

A powerful and user-friendly YouTube clone built with the latest web technologies! πŸš€πŸŽ₯ This project lets you upload, stream, and manage videos effortlessly while providing AI-powered tools, an engaging community, and a seamless viewing experience. 🌟


πŸ› οΈ Tech Stack

Here are the technologies that power this YouTube clone:

  • Backend:

    • ⚑ tRPC - Type-safe APIs for seamless communication.
    • πŸ“¦ Drizzle ORM - Modern ORM for PostgreSQL.
    • ⚑ Upstash Redis - Serverless Redis for caching and real-time data.
  • Frontend:

    • ⚑ Next.js 15 - The React framework for production.
    • 🎨 Shadcn UI - Accessible and reusable components.
    • πŸ“ TailwindCSS - Utility-first styling.
  • Authentication:

    • πŸ” Secure authentication system.
  • Video Processing & AI Features:

    • 🎬 Mux - Real-time video processing & streaming.
    • πŸ“ AI-powered automatic video transcription.
    • πŸ–ΌοΈ Smart thumbnail generation.
    • πŸ€– AI-generated video titles & descriptions.
  • Database & Caching:

    • πŸ—„οΈ PostgreSQL - Reliable relational database.
    • ⚑ Upstash Redis - High-performance caching and background jobs.
  • Content & User Features:

    • πŸ“Š Creator Studio with analytics & insights.
    • πŸ—‚οΈ Custom playlist management.
    • πŸ”„ Multiple content feeds.
    • πŸ“± Fully responsive design.
    • πŸ’¬ Interactive comment system.
    • πŸ‘ Like & subscription system.
    • 🎯 Watch history tracking.

🌟 Features

  • πŸŽ₯ Advanced video player with quality controls.
  • 🎬 Real-time video processing & adaptive streaming.
  • πŸ“ Automatic video transcription powered by AI.
  • πŸ–ΌοΈ AI-driven thumbnail generation.
  • πŸ€– Smart title & description generator.
  • πŸ“Š Creator Studio with detailed video metrics.
  • πŸ—‚οΈ Personalized playlists & video organization.
  • πŸ”„ Dynamic content feeds for trending & recommended videos.
  • πŸ’¬ Interactive comments & engagement tools.
  • πŸ‘ Like & subscription system to follow favorite creators.
  • 🎯 Watch history tracking for seamless viewing experience.
  • πŸ” Secure authentication with session management.
  • πŸ“¦ Modular and scalable codebase.
  • πŸš€ Optimized for speed & scalability with Next.js 15 & React 19.
  • ⚑ Fast caching and real-time data handling with Upstash Redis.

πŸ›‘οΈ Prerequisites

Before you get started, ensure you have the following installed:

  • Node.js (v18 or higher) 🟒
  • Bun ⚑ (for ultra-fast runtime & package management)
  • Clerk (for authentication) πŸ”
  • A Mux account for video streaming πŸŽ₯
  • A PostgreSQL database πŸ—„οΈ
  • An Upstash Redis instance for caching & real-time processing ⚑

πŸš€ Getting Started

1️⃣ Clone the Repository

$ git clone https://github.com/BernieTv/YouTube-Clone.git
$ cd YouTube-Clone

2️⃣ Install Dependencies

bun install

3️⃣ Set Up Environment Variables

Create a .env file in the root folder and add the following:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
CLERK_SIGNING_SECRET=

DATABASE_URL=

UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=

MUX_TOKEN_ID=
MUX_TOKEN_SECRET=
MUX_WEBHOOK_SECRET=

UPLOADTHING_TOKEN=

QSTASH_TOKEN=
UPSTASH_WORKFLOW_URL=
QSTASH_CURRENT_SIGNING_KEY=
QSTASH_NEXT_SIGNING_KEY=

OPENAI_API_KEY=

NEXT_PUBLIC_APP_URL=http://localhost:3000

4️⃣ Run the Development Server

bun run start

πŸ“š Documentation


πŸ“„ License

This project is licensed under the MIT License. πŸ“


✨ Demo

Check out the live demo here: YouTube Clone Demo πŸŽ₯

About

A fire YouTube clone built with Next.js, tRPC, and AI magic β€” stream, upload, and vibe with the ultimate video experience. πŸš€πŸŽ₯πŸ”₯πŸ”΄

Topics

Resources

License

Stars

Watchers

Forks

Languages