Salah-XD / Popcorn

Popcorn is a decoupled server application written in Go which lets a group of people watch uploaded content together.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Popcorn logo-128x128

Visual Studio Code Go Redis Docker

Popcorn is live! at https://popcorntv.click

Let's say you're very far from your friends and family, but you want to watch a movie together. With Popcorn, you can create a virtual space where everyone can join, hangout and watch anything with each other! This repository features the server side of Popcorn, while the front end is presented by Popcorn-web.

Architecture

Popcorn architecture (1)

Requirements (Without Docker)

Go <1.20 or above>

Redis <5 or above>

Node <20 or above>

NPM <9 or above>

VueJS <3 or above>

Installation (With Docker)

  1. Get Livekit Host, API, Secret and RTMP Host credentials and save those in config/secrets.env. This is a one time thing.

  2. Create a docker network using the command below:

    docker network create -d bridge popcorn-network
  3. Clone this repository and run it using the command below:

    docker compose --env-file=./config/secrets.env up --build
  4. Clone Popcorn-web and run it using the command below:

    docker compose up --build
  5. Launch the nginx docker container, which'll receive both the backend and the frontend's traffic:

    // In Popcorn repository
    cd nginx/
    
    docker compose -f nginx-compose.yaml up --build 
  6. Finally, Open http://localhost and try it out!

Installation (without Docker)

  1. Get Livekit Host, API, Secret and RTMP Host credentials and save those in config/secrets.env. This is a one time thing.

  2. Clone this repository and run it using the command below (Make sure redis-server is installed):

    go mod download
    
    make load-db
    
    make local
    
    # Server is running on port 8080
  3. Clone Popcorn-web.

  4. Inside Popcorn-web repository, Set VUE_APP_SERVER_URL = http://localhost:8080 (line-1).

  5. Run the frontend using the command below:

       npm run serve -- --port 8081
  6. Finally, Open http://localhost:8081 and try it out!

About

Popcorn is a decoupled server application written in Go which lets a group of people watch uploaded content together.

License:MIT License


Languages

Language:Go 99.3%Language:Makefile 0.4%Language:Dockerfile 0.3%