SANDBOX
A personal library of AI-generated mini-apps that run in the browser. Drop in JSX, TSX or HTML and it runs in a sandboxed iframe; npm imports are fetched from a CDN allowlist and cached offline. No backend.
2026SoloReactTypeScriptViteTailwindDexieIndexedDB
AI tools generate a lot of small, single-file apps. SANDBOX is a place to keep them and run them. Paste code, drop a file, or paste a URL; JSX is transpiled in the browser with Babel, React and Tailwind are preloaded, and any imported npm package is fetched from a CDN and cached in IndexedDB so the next run works offline. Single user, no accounts, everything stays in your browser.
Security
The runtime executes arbitrary AI-generated JavaScript, so the mitigations are layered so that a compromise of one does not reach the user's library.
- Separate origin for the runtime. The iframe shell is served from a different origin than the app. Same-origin policy structurally prevents artifact code from touching the app's IndexedDB, storage or DOM.
sandbox="allow-scripts"withoutallow-same-origin. The iframe gets an opaque origin, so it cannot reach storage on the runtime origin either.- Validated
postMessage. Outbound messages use a concretetargetOrigin; inbound messages are trusted byevent.sourceidentity, since a sandboxed iframe'sevent.originis"null". - CSP on the runtime origin.
default-src 'none',connect-srcrestricted to the CDN allowlist,frame-ancestorsrestricted to the app. - Nothing secret on the runtime origin. It serves static shell HTML only.
referrerpolicy="no-referrer"on the iframe, so an artifact cannot learn which artifact is running.- Enforced CDN allowlist: jsdelivr, unpkg, cdnjs. Network access is a user toggle in Settings.