Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Git
.git
.gitignore

# IDE
.vs
.vscode
.idea
*.user
*.suo

# Build outputs
**/bin
**/obj
**/dist
**/node_modules

# Test outputs
**/TestResults
**/coverage

# Docker data (don't include local data in builds)
docker-data
docker-logs

# Documentation
*.md
!README.md

# Misc
*.log
.DS_Store
Thumbs.db

# Facebook Automation (not needed for main app)
FacebookAutomation

# CDP Test App (not needed for main app)
CDPTestApp

87 changes: 87 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# =============================================================================
# Thrive Stream Controller - Environment Configuration
# =============================================================================
#
# SETUP INSTRUCTIONS:
# 1. Copy this file to `.env` in the same directory
# 2. Fill in your actual values below
# 3. NEVER commit the `.env` file to source control
#
# To use: docker-compose up -d
# =============================================================================

# -----------------------------------------------------------------------------
# OBS WebSocket Configuration
# -----------------------------------------------------------------------------
# The container connects to OBS running on your host machine.
# Default OBS WebSocket port is 4455.

# OBS WebSocket URL (use host.docker.internal to reach host from container)
OBS__WebSocketUrl=ws://host.docker.internal:4455

# OBS WebSocket password (leave empty if OBS has no password set)
# Find this in OBS: Tools → WebSocket Server Settings
OBS__Password=

# -----------------------------------------------------------------------------
# YouTube OAuth Configuration
# -----------------------------------------------------------------------------
# Get these from Google Cloud Console:
# https://console.cloud.google.com/apis/credentials
#
# 1. Create a project (or select existing)
# 2. Enable "YouTube Data API v3"
# 3. Create OAuth 2.0 credentials (Web application type)
# 4. Add authorized redirect URI: http://localhost:8080/api/auth/youtube/callback

# YouTube OAuth Client ID (ends with .apps.googleusercontent.com)
YouTube__ClientId=

# YouTube OAuth Client Secret
YouTube__ClientSecret=

# OAuth Redirect URI (update port if you change the app port)
YouTube__RedirectUri=http://localhost:8080/api/auth/youtube/callback

# -----------------------------------------------------------------------------
# Facebook Live Producer URL
# -----------------------------------------------------------------------------
# This is the URL volunteers will be directed to for the manual "Go Live" step.
#
# To find your Page's Live Producer URL:
# 1. Go to your Facebook Page
# 2. Click "Live Video" or go to facebook.com/live/producer
# 3. Select your Page
# 4. Copy the URL from your browser
#
# Example: https://www.facebook.com/live/producer?ref=OBS

Facebook__LiveProducerUrl=https://www.facebook.com/live/producer

# -----------------------------------------------------------------------------
# Application Settings
# -----------------------------------------------------------------------------

# Environment (Production, Development)
ASPNETCORE_ENVIRONMENT=Production

# Database connection string (SQLite - stored in mounted volume)
ConnectionStrings__DefaultConnection=Data Source=/app/data/thrivestream.db

# =============================================================================
# NOTES:
# =============================================================================
#
# Double underscores (__) represent nested configuration in .NET.
# For example: YouTube__ClientId maps to { "YouTube": { "ClientId": "..." } }
#
# After first run, you'll need to authorize YouTube in the app:
# 1. Open http://localhost:8080 in your browser
# 2. Go to Settings
# 3. Click "Connect YouTube Account"
# 4. Complete the OAuth flow
#
# The refresh token is stored encrypted in the database, so you only need
# to authorize once (unless you revoke access).
# =============================================================================

78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches: [master, dev]
pull_request:
branches: [master]

jobs:
build-ui:
name: Build UI
runs-on: ubuntu-latest
defaults:
run:
working-directory: UI

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: UI/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

build-api:
name: Build & Test API
runs-on: ubuntu-latest
defaults:
run:
working-directory: API

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal

docker-build:
name: Docker Build Verification
runs-on: ubuntu-latest
needs: [build-ui, build-api]

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: thrive-stream-controller:ci-test
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
sbom: false

Loading