The app sandbox: what a model-written app can and can't do
When you ask Anticode for a game, a calculator, a tracker or another interactive tool, the model writes the whole program as one HTML document. That code is untrusted, so it only ever runs in a strict sandbox with no network of any kind. Anything that would need a server is simulated with sample data and labelled. The app can save to the visitor's own browser, and its forms reach you through Anticode.
Why the sandbox exists
Code written by a model can do anything code can do: read what visitors type, send it somewhere, load a script from a stranger's server, pop up a fake login. Reviewing every line by hand isn't realistic for the people who most want an AI builder. A sandboxed AI app builder takes a different approach. Instead of trusting the code, it limits what any code could do, so even a mistake or a bad instruction can't send data off the page.
How the sandbox is built
- A sandboxed frame. The app runs inside a frame with an opaque origin: no cookies, no access to the page around it and no way to navigate the top window; links it opens go to a new tab.
- A policy that allows no network. The Content-Security-Policy permits no outgoing connections, frames or form submissions, and images and media only from inside the page or files you uploaded. Google Fonts is the one outside source allowed.
- Device features off. Camera, microphone, location, payment and similar browser features are switched off for the app.
- Served apart. Apps run from Anticode's sites host, never from the builder's own address.
- Checked before anyone sees it. A code gate checks the app before it's shown or published, and one automatic repair pass sends anything it catches back to the model; see the app code gate.
- Only Anticode's code is published. Publishing names a build, and the server reads that build's stored code instead of accepting code from the browser.
What an app can still do
- Run entirely in the browser
- Games, calculators, editors, timers, quizzes, trackers, generative art, charts: anything that needs only the visitor's device.
- Remember things on this device
- The app's saved data (scores, habits, settings) is kept in the visitor's own browser. The sandbox can't hold storage itself, so a small runner on the page keeps it for the app under its own name. Nothing is sent to Anticode or anyone else.
- Send forms to you
- Contact, enquiry, booking and newsletter forms in an app reach you through Anticode's form pipeline, with the same checks and limits as a page's forms. In the builder's preview, nothing leaves the page. See forms from apps.
- Show content you manage
- Things you keep up to date, like a menu or a list of work, come from the project's CMS collections, read-only.
What it can't do, and what you'll see instead
| You ask for | Inside the sandbox |
|---|---|
| User accounts and logins | Simulated on this device; there are no real accounts |
| Multiplayer or chat between people | A computer opponent or a simulated conversation, labelled |
| Live prices, weather or stock data | Realistic sample data, labelled "Demo data" |
| Payments or a checkout | A simulated flow; no money moves |
| AI features inside the app | Simulated with local logic |
| Scripts or images from other sites | Not loaded; Google Fonts only |
The model is told to label these openly, so a visitor knows when figures are samples. Leave those labels in place: removing them would make a simulation look like a real service.
When the Next.js export is the better fit
If the thing you need is real accounts, shared data between visitors, a database or calls to other services, the sandbox will always be in the way, by design. The Next.js export turns an app build into a standard project with Postgres, server routes, sign-in and roles, where a developer can add those safely. A prototype built in the sandbox is still a fast way to settle what the interface should be before that work starts.
Other limits
- Saved data stays on one device. A visitor who switches from phone to laptop starts fresh, and clearing browser data clears the app's saves.
- One document. An app is a single HTML file of a limited size, so very large programs or asset-heavy games don't fit.
- Not the visual editor. Apps are changed by asking in words, or pointing at an element and asking.
Questions people ask
Can my app call an API?
No. Apps have no network access. Data from outside is simulated and labelled. For real API calls, export to Next.js.
Do visitors' saves survive when I republish?
Yes. Saved data is kept under the app's address in each visitor's browser, so it outlives republishing.
Can I add my own photos to an app?
Yes. Photos and videos you upload with a build or change are allowed by the app's policy and placed by the model.
Is an app safe to publish if I don't read the code?
The sandbox and the code gate are there so you don't have to trust the code. You should still check the words and facts on screen are yours.