High-Throughput Real-Time Media & Video Pipeline Engine combining Next.js 14, Go Gateway, and a Rust Media Compute Kernel.
Architecture • Key Capabilities • Directory Layout • Quickstart
StreamForge is an enterprise-grade distributed media processing pipeline designed to handle high-frequency video uploads, audio waveform extraction, smart frame thumbnailing, and dynamic watermarking with sub-millisecond execution guarantees.
Engineered with the bleeding-edge modern triumvirate:
- Next.js 14 (App Router & WebSockets): Real-time Creator Studio UI with live progress streaming, interactive audio waveform renderers, and instant media player previews.
- Go Gateway & Worker Coordinator: High-concurrency job scheduler leveraging Goroutines, worker thread pools, WebSocket pub/sub broadcasting, and atomic state machines.
- Rust Media Kernel: High-performance, zero-garbage-collection native compute engine executing heavy frame manipulations, perceptual hashing, and byte-level audio sampling.
flowchart TD
User["Client / Creator Studio (Next.js 14)"] -->|"Upload and Live Telemetry"| Gateway["Go Gateway and Task Coordinator"]
Gateway -->|"IPC Subprocess Dispatch"| Kernel["Rust Media Compute Kernel"]
Gateway --> Storage[("Local / S3 Storage Engine")]
Gateway --> DB[("Task State Store")]
subgraph RustOps["Rust Media Kernel Pipeline"]
T1["Audio Waveform Vector Analyzer"]
T2["Smart Animated WebP Extractor"]
T3["Watermark and Amplitude Normalizer"]
end
Kernel --> RustOps
- Deterministic Non-Blocking Processing: Go Goroutine pool decouples HTTP uploads from background processing pipelines.
- Sub-Millisecond Waveform Extraction: Native Rust byte parser calculates RMS audio amplitudes directly from media streams.
- Live WebSocket Telemetry: Real-time job progress (0% -> 100%) streamed frame-by-frame directly to the Next.js UI.
- Memory Safety & Zero Leaks: Rust kernel guarantees zero buffer overflows and predictable deterministic RAM consumption.
StreamForge/
├── apps/
│ └── web/ # Next.js 14 Creator Studio (App Router)
│ ├── app/ # Dashboard, Media Upload, Real-Time Player
│ ├── components/ # Waveform Visualizer, Dropzone, Progress Bar
│ └── package.json
├── services/
│ ├── gateway/ # Go High-Concurrency API & WebSocket Hub
│ │ ├── cmd/server/ # Entrypoint (main.go)
│ │ ├── internal/api/ # HTTP Handlers (Upload, Status, Stream)
│ │ ├── internal/queue/ # Worker Pool & Dispatcher
│ │ ├── internal/ws/ # WebSocket Client Hub
│ │ └── go.mod
│ └── engine-rust/ # Rust Native Compute Kernel
│ ├── Cargo.toml
│ ├── src/main.rs # CLI & Native Worker Entrypoint
│ └── src/pipeline/ # Waveform, Thumbnail, Watermark Pipelines
├── .github/
│ └── workflows/ci.yml # Matrix CI for Go, Rust, and Next.js
├── docker-compose.yml
└── README.md
- Go 1.22+
- Rust 1.75+ (Cargo)
- Node.js 18+ (pnpm / npm)
cd services/gateway
go run cmd/server/main.gocd services/engine-rust
cargo run -- --helpcd apps/web
npm install
npm run devDistributed under the MIT License. Built by Prachi Zala.