Tech stack for a video streaming platform (2026)
Creator video platform, designed by StackPrism from one sentence: 13 components, a reason for each, and the live checks that watch them.
The stack
Next.js
Cloudflare
PostgreSQL
Redis
Clerk
Stripe
Sentry
“A video platform where creators upload long videos and viewers stream them on the web and on TV apps, with adaptive quality, subtitles, view analytics and paid channel subscriptions.”
Their answers on the constraints step
- Expected scale
- 10k+ users
- Where users are
- Global
Make it yours. Open this stack in the editor to check its health, harden it and hand it to your coding agent. No sign-up, nothing to generate.
Start from this stackSelect a component to see what it does and what it connects to, or pick one above to see what breaks if it goes down. Pinch or use the buttons to zoom.
Why this stack
Creators upload through the Next.js app and the Core Content API, and a background worker keeps the original file in Cloudflare R2 and sends it to Cloudflare Stream, which encodes it for adaptive quality. Viewers on the web and on TV apps ask the Playback Session API for a stream: it checks their subscription, which Stripe’s webhooks keep current, uses Redis for fast session checks and hands back a signed link served from Cloudflare’s CDN, close to viewers around the world. The APIs and the worker run on Railway, Clerk handles accounts and Sentry reports errors.
Why each piece
All 13 components on the diagram: what each one does, what it talks to, and what stops if it goes down.
TV Apps
Roku and TV clients. Calls Playback Session API and Cloudflare CDN (streams).
Nothing else on the diagram depends on it.
Next.js App
Viewer and creator UI. Calls Core Content API, Clerk (auth), Cloudflare CDN (delivers) and Sentry (errors).
Nothing else on the diagram depends on it.
Playback Session API
In Backend Services
Streaming and access. Calls Cloudflare CDN (signs), PostgreSQL (reads) and Redis (reads). Called by TV Apps and Stripe (webhooks).
If it goes down, 1 of 12 components stops working.
Core Content API
In Backend Services
Content and uploads. Calls Clerk (verifies) and PostgreSQL (writes). Called by Next.js App.
If it goes down, 1 of 12 components stops working.
Background Worker
In Railway
Async processing. Calls PostgreSQL (updates), Cloudflare R2 (stores) and Cloudflare Stream (processes).
Nothing else on the diagram depends on it.
Cloudflare CDN
Video delivery. Called by Next.js App (delivers), TV Apps (streams) and Playback Session API (signs).
If it goes down, 3 of 12 components degrade.
Cloudflare R2
In Data & Storage
Source video storage. Called by Background Worker (stores).
If it goes down, 1 of 12 components degrades.
PostgreSQL
In Data & Storage
Application system of record. Called by Background Worker (updates), Core Content API (writes) and Playback Session API (reads).
If it goes down, 5 of 12 components stop working.
Redis
In Data & Storage
Session and hot cache. Called by Playback Session API (reads).
If it goes down, 1 of 12 components degrades.
Cloudflare Stream
In External Services
Video transcoding. Called by Background Worker (processes).
If it goes down, 1 of 12 components degrades.
Clerk
In External Services
Authentication provider. Called by Next.js App (auth) and Core Content API (verifies).
If it goes down, 2 of 12 components stop working.
Stripe
In External Services
Subscriptions and billing. Calls Playback Session API (webhooks).
If it goes down, 1 of 12 components degrades.
Sentry
Error tracking. Called by Next.js App (errors) and Backend Services (errors).
If it goes down, 3 of 12 components degrade.
When this stack fits
- Viewers are worldwide and playback has to start quickly everywhere.
- You’d rather pay for encoding and delivery than run them.
- Paid channels, where access is checked on every playback, not only at sign-up.
When to pick something else
- You need live streaming too: plan for it from the start, because this diagram covers uploaded video only.
- Short clips in a feed: a simpler upload-and-play video API may be enough.
What you need to build this
13 components across 8 areas of the stack.
Build it with your AI agent
Hand the stack to Claude Code, Codex, Cursor or any coding agent as a brief: how it connects, install steps and a build plan.
Frontend2
- Docs
Next.js App
viewer and creator UI
npm install next
TV Apps
Roku and TV clients
Backend & APIs4
Core Content API
content and uploads
Playback Session API
streaming and access
Background Worker
async processing
- Docs
Cloudflare Stream
video transcoding
Data1
- Docs
PostgreSQL
application system of record
Cache & queues1
- Docs
Redis
session and hot cache
Auth1
- Docs
Clerk
authentication provider
npm install @clerk/nextjs
Payments1
- Docs
Stripe
subscriptions and billing
npm install stripe
Observability1
- Docs
Sentry
error tracking
npm install @sentry/nextjs
Install
npm install next @clerk/nextjs stripe @sentry/nextjs
SDKs only. Pick your own database driver or ORM.