YouTube (replica)
1 language![]() | |
| Screenshot of the YouTube replica's home page at 1920px | |
| Type | Video hosting service |
|---|---|
| Replica of | YouTube |
| Developer | David |
| Written in | Next.js, PGlite (local) / Neon (production), hand-written MP4 demuxer, fMP4 muxer, HLS packager, MSE player with its own ABR |
| Tests | 2,227 unit tests, 38 e2e specs |
| Built with | Nine research lanes, twelve build slices, five codex rounds (~72 findings) |
| Repository | ../youtube |
| Website | not deployed |
YouTube (replica) is a rebuild of YouTube's core functionality, developed in the youtube folder of the Replicates repository. It covers upload, an adaptive video player, channels, subscriptions, playlists, threaded comments, search, a recommender, watch history, a Shorts surface, and a Content ID matching system.
The uploader's browser encodes the full rendition ladder with the VideoEncoder API before upload. Consequently, the server has no transcode queue, worker pool or encoding backlog.
Overview
The replica includes a hand-written MP4 demuxer, fragmented MP4 muxer, HLS packager, and a Media Source Extensions player with its own adaptive bitrate logic, without ffmpeg.wasm, mp4box.js or hls.js. Every seed video in the replica is synthetic, generated through the same real WebCodecs encoding path used for uploads. Its interface draws 37 icon glyphs from geometry rather than imported assets.
Architecture
Content ID is implemented using Wang's landmark audio fingerprinting algorithm,[1] with a matching threshold derived empirically from 3,086 leave-one-out fingerprint pairs, yielding an estimated false-positive rate of roughly 250 in 2.5 × 10⁵ pairs. The recommender uses the approach described by Davidson et al.[2] Visual details were measured from the real site: the brand red is #f03, the home grid renders at 3 × 533px at a 1920px viewport width, and the replica's design tokens use a live --yt-sys-* namespace rather than the dead --yt-spec-* one found in YouTube's own shipped CSS.
Development
The replica is built on Next.js with PGlite for local development and Neon in production, backed by a 23-table schema. It carries 2,227 unit tests, 38 e2e specs, and was built across nine research lanes, twelve build slices, five codex rounds (~72 findings).
Reception
Client-reference leakage across the React Server Components boundary occurred five times during development. The project's 2,227 unit tests did not detect it; an AST-based static check did.
See also
References
- ^ Wang, A. “An Industrial-Strength Audio Search Algorithm.” Proceedings of the 4th International Conference on Music Information Retrieval (ISMIR), 2003.
- ^ Davidson, J. et al. “The YouTube Video Recommendation System.” Proceedings of the Fourth ACM Conference on Recommender Systems (RecSys), 2010.
- ^
youtube/README.md.
- Software replicas
- Video hosting services
.png&w=640&q=75)