Skip to content

Cloudflare Infrastructure

Our Cloudflare infrastructure powers real-time communication and automated video processing using Workers and Durable Objects.

Overview

We use two main Cloudflare services:

Architecture

graph TD
    A[LiveKit Server] -->|Webhook| B[Upload Worker]
    B --> C[R2 Storage]
    B --> D[YouTube]
    B --> E[Google Sheets]
    B --> F[Slack]

    G[Go Backend] -->|API Call| H[WebSocket Worker]
    I[Web/Mobile Clients] -->|WebSocket| H
    H --> J[Durable Objects]
    J -->|Messages| I

What Each Component Does

Upload Worker - Receives recording completion webhooks from LiveKit - Retrieves video files from R2 storage - Uploads videos to YouTube - Updates tracking in Google Sheets and Slack

WebSocket Worker with Durable Objects - Maintains persistent connections with clients - Routes messages between backend and clients - Isolates each organization in separate Durable Objects - Handles authentication via JWT tokens

Quick Start

Requirements: - Node.js (≥22) - pnpm package manager - Cloudflare account

Basic Commands:

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Deploy to production
pnpm deploy

Learn More

External Resources