Skip to content

jamalsoueidan/streamrecorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

607 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamRecorder

Architecture

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                                 Internet / Users                                    │
│                              (Browser accessing app)                                │
└────────────────────────────────────┬────────────────────────────────────────────────┘
                                     │
           ┌─────────────────────────┼─────────────────────────┐
           │                         │                         │
   ┌───────▼───────────┐    ┌───────▼───────────┐    ┌────────▼────────┐
   │     Frontend      │    │     Backend       │    │   S3 Storage    │
   │     xxxx.com      │    │  strapi.xxx.com   │    │   cdn.xxx.com   │
   │                   │    │                   │    │                 │
   │ ┌───────────────┐ │    │ ┌───────────────┐ │    │ ┌─────────────┐ │
   │ │   Next.js     │◄├────┼─┤    Strapi     │ │    │ │  Recordings │ │
   │ └───────┬───────┘ │    │ └───────┬───────┘ │    │ │  Thumbnails │ │
   └─────────┼─────────┘    └─────────┼─────────┘    │ └─────────────┘ │
             │                        │              └────────▲────────┘
             │                        │                       │
             └────────────┬───────────┘                       │
                          │                                   │
                 ┌────────▼────────┐                          │
                 │   PostgreSQL    │                          │
                 │    Database     │                          │
                 └─────────────────┘                          │
                                                              │
                                                              │ Upload recordings
                             ┌────────────────┐               │
                             │ Workflow Queue │               │
                             │  (Automation)  │               │
                             └───────┬────────┘               │
                                     │                        │
                                     │ Dispatches             │
                   ┌─────────────────┼─────────────────┐      │
                   │                 │                 │      │
          ┌────────▼───────┐ ┌───────▼───────┐ ┌──────▼──────┴┐
          │   Worker 1     │ │   Worker 2    │ │   Worker N   │
          │ ┌────────────┐ │ │ ┌───────────┐ │ │ ┌──────────┐ │
          │ │  TikTok    │ │ │ │  TikTok   │ │ │ │  Twitch  │ │
          │ │  Recorder  │ │ │ │  Recorder │ │ │ │  Recorder│ │
          │ └─────┬──────┘ │ │ └─────┬─────┘ │ │ └────┬─────┘ │
          └───────┼────────┘ └───────┼───────┘ └──────┼───────┘
                  │                  │                │
                  └──────────────────┼────────────────┘
                                     │
                            ┌────────▼────────┐
                            │      Redis      │
                            │    Job Queue    │
                            └─────────────────┘

Deployment Environment (Coolify)

  1. PostgreSQL Database - Data storage
  2. Strapi Backend - API server
  3. Next.js Frontend - Web server

Strapi Backend - Setup & Deployment Guide

1. Database Setup (Local)

# Connect to PostgreSQL
psql -U postgres

# Create database
CREATE DATABASE strapi;
\q

2. Environment Variables (.env)

Create .env file in /backend:

# Database

# Server
HOST=0.0.0.0
PORT=1337

# Secrets
APP_KEYS=
API_TOKEN_SALT=
ADMIN_JWT_SECRET=
TRANSFER_TOKEN_SALT=
ENCRYPTION_KEY=

# Database
DATABASE_CLIENT=postgres
DATABASE_HOST=127.0.0.1
DATABASE_PORT=5432
DATABASE_NAME=strapi
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=
DATABASE_SSL=false
DATABASE_FILENAME=
JWT_SECRET=

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET=
AWS_BUCKET_URL=
AWS_ENDPOINT=

GITHUB_WEBHOOK_SECRET=

3. Start Strapi

Deploy

Frontend (Next.js) - Setup & Deployment Guide

1. Environment Variables (.env.local)

Create .env.local file in /frontend:

NEXT_PUBLIC_STRAPI_URL=http://localhost:1337
NEXT_PUBLIC_S3_URL=https://domain.com/bucket

Note: NEXT_PUBLIC_* variables are exposed to browser (safe for public URLs).

GitHub Changelog Setup

  1. Generate a secret key and add it to your Strapi .env file:

       GITHUB_WEBHOOK_SECRET=your-secret-here
  2. Go to your GitHub repo → Settings → Webhooks → Add webhook

  3. Configure the webhook:

    • Payload URL: https://your-domain.com/api/change-log/github-webhook
    • Content type: application/json
    • Secret: Same value as GITHUB_WEBHOOK_SECRET
    • Events: Select "Let me select individual events" → check only Releases
  4. Click "Add webhook"

Now when you publish a release on GitHub, the version and changelog body will automatically be saved to Strapi.

Deploy

About

Stream Recording for TikTok, Twitch, Kick, YouTube, AfreecaTV, and Pandalive. Just add your live streams, and they'll be automatically captured and saved for you to watch anytime.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors