TikTok on Rails
summary
Builds a local TikTok clone in Rails and demonstrates concrete pieces that work: FFmpeg for async transcoding into HLS (TS and M3U8 chunks), Active Storage to hold uploads, Stimulus + IntersectionObserver for autoplay, and Turbo Streams for status updates. Processes thousands of local videos, records per-view seconds into video_interactions, uses Scenic materialized views and a decay-weighted affinity score to rank feeds, and notes scaling limits and production alternatives.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:56FFmpeg and Active Storage setup
- 5:44Basic models and controllers
- 7:08Video upload and transcoding
- 9:55Initial video feed
- 12:50Video controls and UI
- 13:53Turbo Streams for processing
- 15:43Feed algorithm design
- 27:23Testing feed algorithm
- 28:48Scaling and future steps
- 30:54Q&A








