DEV Community

GreenFlux
GreenFlux

Posted on

We replaced StackBlitz and CodeSandbox with a self-hosted demo runner. Here's everything that broke along the way.


Hundreds of live docs examples ran on StackBlitz and CodeSandbox embeds: the bill scaled with traffic, outages arrived as user reports, and nothing reliably pinned an example to the library version the page was documenting. This is the story of replacing them with a self-hosted runner on Cloudflare Workers: two execution tiers behind one adapter, where most examples bundle in the browser for free and only SSR frameworks like Next.js and Angular get a real dev-server container.

The result: 1,452 docs examples generated by a pipeline instead of maintained by hand, every one runnable on any of five majors or a build straight off an open PR, and share links served as prebuilt static files. The surprising part is what the migration surfaced- most of the breakage it found was already there, hidden for years behind sandbox defaults nobody could monitor.

Read the full story, including real 30-day cost numbers and the spend-ceiling design that keeps a public compute endpoint from running away.

https://handsontable.com/blog/how-we-replaced-stackblitz-and-codesandbox-with-our-own-demo-runner?utm_source=linkedin&utm_medium=social&utm_campaign=demo-runner-launch&utm_content=jp-post

Top comments (0)