Skip to content

TypeScript ยท Go

In progress

StreamForge

Course and video hosting with adaptive HLS delivery, on free tiers

All three services scaffolded and implemented in part

Overview

A personal course and video hosting platform: a creator-style catalogue with adaptive HLS delivery, designed to run within free tiers. Upload a master video, a Go and FFmpeg worker transcodes it into a 360p/720p/1080p HLS ladder, the segments land in object storage, and an hls.js player streams them behind JWT auth and enrollment checks.

The architecture is shaped by one hard constraint: Cloudflare Workers cannot run FFmpeg, with no native binaries and strict CPU limits. So transcoding lives off-platform in Docker while everything else stays Cloudflare-native.

Stack

Frontend
Astro + hls.js on Cloudflare Pages
API
TypeScript + Hono on Cloudflare Workers
Database
D1 (SQLite) with Drizzle ORM
Object storage
R2 over the S3 API; MinIO locally
Transcoder
Go + FFmpeg in Docker

Decisions Worth Explaining

  • Transcoding lives off Cloudflare

    Workers cannot execute FFmpeg. Rather than bend the whole design around that, the transcoder is a separate Go service that polls for jobs and writes the ladder back to object storage.

  • HLS rather than progressive download

    A segment ladder lets the player adapt to the viewer connection, and signed playlist URLs keep the media gated without proxying bytes through the API.

  • Free tier as a design constraint, not an afterthought

    R2 charges no egress, which is what makes video hosting viable at zero cost; the component choices follow from that.

What Is Not Done

  • Not deployed; the transcoder has only run locally in Docker.
  • No test suite.
  • Enrollment and auth flows are specified more completely than they are implemented.