How 3000studios.vip Runs on Cloudflare Pages, and the Deploy Lesson We Learned
3000studios.vip is a music, books, podcast and game site run by one studio, so it has to be fast, cheap to run and easy to change. It runs on Cloudflare Pages: a static app served from the edge, plus a small set of edge functions for the parts that need a server. This is how it fits together, and what we learned when part of it quietly stopped deploying.
The front end: a static app built with Vite
The site is a React single-page app built with Vite. Each page is loaded on demand, so a visitor on the home page does not download the code for the admin dashboard or the video vault. The build produces plain files, and Cloudflare Pages serves them from data centres close to each visitor.
Styles are plain CSS with shared variables for colour and spacing, and fluid type sizes that scale with the screen. There is no CSS-in-JS runtime to download, which keeps the first paint fast on phones.
Deploys from Git
Every change goes through a pull request. When it merges into main, Cloudflare Pages builds the site and swaps the new version in all at once, so visitors never see half of an update. Every pull request also gets its own preview address, which is where changes are checked before they reach the live site.
Edge functions for what needs a server
A single-page app has one weakness: until the JavaScript runs, every page is the same empty shell. Search engines and link previews often see that shell. To fix it, an edge function runs in front of every page request and injects that page's real title, description, structured data and body text into the HTML before it leaves the server.
The same layer handles the parts of the site that need private logic: the live stream access gate, the on-air flag that turns the live page on, signed playback for the broadcast, the live chat room, song requests and the music proxy that streams tracks from storage.
D1 and R2 for data and media
Small pieces of state, such as whether the studio is live and who may watch a private stream, are stored in Cloudflare D1, a SQL database that runs next to the functions. Full-length audio is stored in R2, Cloudflare's object storage, and streamed through a function so the site controls exactly which files are reachable.
Live video with WebRTC
Most live streams on the web use HLS, which delivers video in chunks and usually runs several seconds behind real life. The 3000 Studios live stage uses Cloudflare Stream with WebRTC ingest and playback instead, which keeps the delay to around a second, short enough for a real conversation with the chat. The broadcast studio lives inside the owner dashboard and sends video straight from a phone or laptop.
The lesson: a build that failed without failing
In October the edge functions were moved to a new folder so Cloudflare would pick them up. Three of the files were deleted instead of moved, and another file still imported one of them. From then on the functions could not be built, but the site itself still deployed, so the problem was easy to miss: pages loaded, while every server route quietly fell back to the 404 page.
The fix was to restore the missing files and make sure the functions folder is found from the project root that Cloudflare actually builds from. The bigger lesson is to test what you deploy, not just whether it deployed. A green deploy only means the build finished. A simple request to one API route after each deploy would have caught this on the first day.
What keeps it fast and cheap
The whole site runs on Cloudflare's free tier. Most requests are static files served from cache, the functions are small and short-lived, and media streams from object storage without a separate server. For an independent studio, that means the site can grow with the catalogue without a hosting bill that grows with it.