Giter Site home page Giter Site logo

creek's Introduction

Creek

Creek is a Livestreaming/VOD platform powered by Cloudflare Stream, Pages, and Workers. It is intended for high-skill, low-budget teams who are looking for an alternative to YouTube/Vimeo/Restream/Facebook.

Features

MVP/1.0

  • Livestreaming with Cloudflare Stream backend
  • Re-broadcasting to YouTube/Vimeo/Facebook
  • Stream scheduling (Pushes new stream events to YouTube/Vimeo/Facebook if in use)
  • Multi-user authentication

2.0

  • Video uploads (w/o livestream)
  • "Channel" overview (With playlists and sorting)
  • Stream toolkit (Utilities for integrating with BitFocus Companion, OBS, etc. - Same idea as Hologram)
  • Integration with ChurchOnlinePlatform(?)

3.0

  • Chat aggregation
  • SaaS offering (Billing dashboard, managed backend, etc.)

Development

This project is built on Next.js, designed to run on Cloudflare Pages and utilize Cloudflare Pages Functions (Beta). Getting started is fairly simple... until you go to set up Auth0.

0. Requirements and Dependencies

  • Development scripts only work in Linux environments (and WSL, of course).
  • Requires free Auth0 (Development and deployment) and Cloudflare (Deployment) accounts.
  • To install dependencies: npm install
  • Setup script to provision Auth0 and Cloudflare coming soon

1. Configuring Environment

Copy contents of .env.example to .env.local and set accordingly:

Key Value Note
NEXT_PUBLIC_AUTH0_DOMAIN example.us.auth0.com
NEXT_PUBLIC_AUTH0_FRONTEND_CLIENT_ID Will define in Frontend Settings
NEXT_PUBLIC_AUTH0_FRONTEND_SCOPE Will define in API Settings
NEXT_PUBLIC_AUTH0_FRONTEND_AUDIENCE Will define in API Settings
WORKER_AUTH0_DOMAIN ${NEXT_PUBLIC_AUTH0_DOMAIN} Using a reference requires using dotenv, will be set manually when deployed
WORKER_AUTH0_FRONTEND_AUDIENCE ${NEXT_PUBLIC_AUTH0_FRONTEND_AUDIENCE} Using a reference requires using dotenv, will be set manually when deployed
WORKER_AUTH0_BACKEND_ID Will define in Backend Settings
WORKER_AUTH0_BACKEND_SECRET Will define in Backend Settings

2. Setting up Authentication

  1. Create an Auth0 Account and Tenant
  2. Create a frontend (single page) application (See below for settings)
  3. Create a backend (machine-to-machine) application (See below for settings)
  4. Create an API (See below for settings)

Frontend Settings

The settings are all required. The values provided as examples for these should be changed as-needed and are for development configurations only.

Setup
Property Value
Name MyApp
Settings
Property Value
Allowed Callback URLs http://localhost:3000, http://localhost:8788
Allowed Logout URLs http://localhost:3000, http://localhost:8788
Allowed Web Origins http://localhost:3000, http://localhost:8788
Allowed Origins (CORS) http://localhost:3000, http://localhost:8788
.env.local
Key Value
NEXT_PUBLIC_AUTH0_FRONTEND_CLIENT_ID Your SPA application Client ID

Backend Settings

The settings are all required. The values provided as examples for these should be changed as-needed and are for development configurations only.

Setup
Property Value
Name MyBackend
APIs
Property Value Permissions
Auth0 Management API Authorized read:users, read:user_idp_tokens
.env.local
Key Value
WORKER_AUTH0_BACKEND_ID Your machine-to-machine Client ID
WORKER_AUTH0_BACKEND_SECRET Your machine-to-machine Client Secret

API Settings

Setup
Property Value Note
Name MyAPI
Identifier https://myapp.com/api Normally your API endpoint, does not have to be publicly available or even a URL
Signing Algorithm RS256
Settings
Property Value
RBAC Settings: Enable RBAC true
RBAC Settings: Add Permissions in the Access Token true
Permissions

Add a scope(s) as needed. Requires at least one scope by default.

Machine to Machine Applications

Enable your backend and grant permissions as needed. // TODO: Determine if this is necessary

.env.local
Key Value
NEXT_PUBLIC_AUTH0_FRONTEND_SCOPE The scopes you created in Permissions
NEXT_PUBLIC_AUTH0_FRONTEND_AUDIENCE The identifier you configured in Setup

3. Running in Development Mode

Development has hot-reloading enabled. Next.js runs on port 3000 Wrangler (CF Workers) runs on port 8788, proxying requests to Next to render the frontend.

  • The full stack: npm run dev
  • Just the frontend: npm run frontend

creek's People

Contributors

cs-5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.