How it works
- A Node.js runtime in a Web Worker:
fs,http,child_process,worker_threadsand the rest, in TypeScript. The Rust tools that dev servers use (SWC, rolldown, esbuild, Tailwind's oxide) run on their WebAssembly builds. - The project's own dev server: the dev script runs as written, through a small shell (so
concurrently "vite" "node server"works too). - A service worker gives each app its own origin in the tab and hands its requests to the servers in the runtime.
In Sandburg itself, a host process installs packages with npm and compiles modules for the runtime; Playwright then checks the running app. These pages replay the host's answers from static files, recorded when the site was built. Everything else happens in your browser.
These demos need a recent Chrome, Edge or Firefox; Safari and browsers on iOS use a stricter isolation mode (see ADR 0021) and are less tested. They download 5–60 MB.