Node.js for inside the browser. WebContainers but free, open-source, and lightweight.
DevBox is a browser-based runtime that executes Node.js environments entirely within a web page. Unlike other solutions that rely on cloud proxies or heavy Linux kernel emulation, DevBox is a lightweight shim that maps Node.js syscalls to browser APIs.
It allows you to run full-stack frameworks like Next.js, Vite, and Svelte natively in the browser with zero hardcoded behavior.
Current State: DevBox is currently in active Beta/Testing. ETA: Soon.
Star this repository to be notified immediately upon release.
DevBox has been in stealth development for over a year.
It was born out of strict necessity. My main product is an AI Platform Generator (Scelar), and during development, it became clear that spinning up cloud-hosted Next.js servers for every single user instance would turn our profits into losses due to infrastructure costs.
We needed a way to move that compute entirely to the client without sacrificing the ability to run standard Node.js tooling. DevBox was the solution: a runtime that allows full-stack applications to run purely in the browser, eliminating server costs.
Recently, other browser-based implementations (like AlmostNode) have surfaced. While the goal is similar, the architecture is different.
Many alternatives rely on mocking and hardcoding specific internal paths just to make popular frameworks like Vite or Next.js work. While this gets a "Hello World" running, it often creates a fragile environment where less common packages fail because the runtime isn't actually behaving like Node.js—it's just pretending to for specific scenarios.
DevBox is different. We prioritize a complete Node.js environment emulation. We don't patch Next.js to make it work; we fix the runtime so Next.js just works naturally.
- 🚫 Not a Linux Clone: We don't emulate a full OS kernel. We emulate the Node.js runtime. This results in a significantly smaller bundle size (~small KB) and faster boot times.
- 🌐 Native Browser Execution: Everything runs client-side using Service Workers and standard JavaScript. No server-side compute required.
- 💻 Full Terminal Access: Includes a fully functional terminal environment hooked directly into the virtual file system.
- ⚡ Framework Agnostic: No hardcoded logic for specific frameworks.
- ✅ Next.js
- ✅ Vite
- ✅ SvelteKit
- ✅ React / Vue
- 🔒 Secure & Sandboxed: Runs safely within the browser's security model.
- 🦕 100% TypeScript: Written in modern TypeScript for type safety and easy contribution.
- 🆓 MIT Licensed: Truly open source. Build your own cloud IDEs, playgrounds, or tutorials without proprietary lock-in.
DevBox creates a virtualized file system and mocks the Node.js built-in modules (fs, http, path, net, etc.) inside a Service Worker.
When you run npm install or npm run dev inside DevBox:
- Network: Requests are intercepted and routed through the virtual file system.
- Execution: JavaScript is executed directly by the browser's engine.
- IO: Terminal output and file changes are streamed instantly to the UI.
API subject to change before v1.0 release.
import { DevBox } from '@devbox/core';
// 1. Initialize the Virtual Machine
const vm = await DevBox.boot();
// 2. Mount files to the virtual file system
await vm.fs.writeFile('package.json', JSON.stringify({
scripts: { dev: "vite" },
dependencies: { vite: "latest" }
}));
await vm.fs.writeFile('index.html', '<h1>Hello from DevBox!</h1>');
// 3. Spawn a terminal process
const process = await vm.spawn('npm', ['install']);
process.stdout.on('data', (data) => {
console.log(data); // Pipe this to xterm.js
});
// 4. Start the dev server
process.on('exit', async () => {
await vm.spawn('npm', ['run', 'dev']);
});- Virtual File System implementation
- Node.js API shims (fs, path, events)
- HTTP Server emulation via Service Worker
- Stabilize
child_processspawning - Optimize dependency resolution caching
- Public Release (Soon)
We are currently finalizing the core architecture. The repository is locked for commits until the public beta release.
If you are interested in shaping the future of browser-based development, please Watch this repo to jump in as soon as we open up!
- Creator & Lead Maintainer
DevBox is open-source software licensed under the MIT License.