Skip to content

CapSoftware/Rend

Repository files navigation

Rend

Video infrastructure, built for speed

One API call to upload. One playback URL designed to start fast.

Rend.so

Status Server Player & SDKs

What Is Rend?

Rend is the video platform for developers: one API call to upload, one playback URL that starts fast. Encoding, storage, delivery, signed playback, analytics, player packages, and SDKs are handled by one open-source stack.

Rend currently serves generated HLS from Tigris-backed origin through Rend-controlled playback URLs, so playback can start without exposing private storage URLs. The bare-metal edge path remains in the repo, but it is dormant in production until regional coverage makes it worthwhile.

Performance Goals

Rend is built around startup latency, especially the first request for a video that has not already been watched and cached everywhere.

  • Minimize time to first frame, not just server response time.
  • Generate a small opener during media processing so real frames can be served before the full HLS ladder is ready.
  • Serve generated HLS from Tigris-backed origin by default while the bare-metal edge path stays dormant until regional coverage makes it worthwhile again.
  • Keep playback credentials server-controlled: signed playback is validated before private origin artifacts are streamed, without exposing storage URLs.
  • Measure the path with readiness and benchmark scripts covering upload response time, upload-to-playable timings, playback bootstrap latency, origin TTFB, optional edge cache behavior, and telemetry visibility.

Current Shape

  • apps/site/ - Next.js app for the public site, docs, dashboard, auth, billing, and player-facing routes.
  • services/rend-api/ - Rust API/control plane for uploads, asset state, media jobs, playback bootstrap, Tigris-origin playback, optional edge registry, telemetry ingest, and billing hooks.
  • services/rend-edge/ - Rust playback edge for signed playback validation, cache warm/purge, origin-backed cache fill/coalescing, and playback telemetry flushing. This code is currently dormant in production unless REND_PLAYBACK_MODE=edge is explicitly enabled.
  • rend-media-worker - the rend-api binary running as worker media; claims queued media jobs and writes playback artifacts with ffmpeg/ffprobe.
  • packages/player/ - React/HLS player package.
  • packages/sdk/ - generated TypeScript public API client.
  • migrations/ and clickhouse/ - Postgres and ClickHouse schema.
  • compose.yml - local Postgres, Redis, MinIO, ClickHouse, API, worker, and edge stack.

The local stack currently covers upload, queued media processing, source and playback artifact storage, HLS/openers/thumbnails, signed playback bootstrap, Tigris-origin playback, optional edge cache warm/purge/coalescing, API keys, dashboard asset management, billing checks, and a generated public SDK.

Requirements

  • Bun >=1.3.6
  • Node.js >=20
  • Rust 1.93
  • Docker with Compose
  • ffmpeg and ffprobe when running the media worker outside Docker

Some smoke scripts also expect common CLI tools such as curl and jq.

Quick Start

cp .env.local.example .env.local
bun install
bun dev

bun dev validates the local env, starts the Docker backend, and runs the site. The default local URLs are:

Useful local commands:

bun run dev:site                 # site only, assuming backend is already up
bun run backend:docker:build     # rebuild local backend images
bun run backend:docker:up        # start backend stack and wait for health
bun run backend:down             # stop local stack

To run the Rust services on the host instead of the Docker service containers, keep the local dependencies running and start each service in its own terminal:

bun run backend:api
bun run backend:media-worker
bun run backend:edge

Verification

Common checks:

bun run env:local
bun run typecheck
bun run --cwd apps/site test
cargo fmt --all -- --check
cargo check --workspace
cargo test --workspace
bun run openapi:check
bun run openapi:contract
bun run openapi:sdk-test

Representative end-to-end checks:

bun run backend:docker:smoke
bun run backend:smoke:async-media
bun run backend:smoke:playback-bootstrap
bun run backend:smoke:playback-telemetry
bun run backend:smoke:delete-purge
bun run sdk:integration-smoke
bun run e2e:site-assets

See package.json for the full script list.

API And SDK

The public API contract lives at docs/openapi/rend-public-api.openapi.json. The generated TypeScript client lives in packages/sdk/.

bun run openapi:lint
bun run openapi:generate
bun run openapi:check

Environments And Deploys

For production-profile validation:

cp .env.production.example .env.production.local
bun run env:production
bun run verify:production-local

For a public V1 candidate:

bun run launch:gate

License

The Rust server workspace is AGPL-3.0-or-later. The player and SDK packages are MIT.

About

Open source video infrastructure, built for speed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors