LoomCode AI

Docs · Deployment

Preview, share, export and deploy

How long LoomCode previews run, how share links work, exactly what each export ZIP contains, and how to host each framework permanently for real users.

Updated Nov 24, 2026First published Nov 22, 202610 min read

A LoomCode preview is a temporary cloud sandbox, not a website. It runs for about 10 minutes, can be extended to at most 24 hours with a share link, and is then deleted. To keep an app, download it and deploy it to a host you control. This page explains each stage and ends with a checklist for anything that will face real users.

StageHow long it lastsWho can open itUse it for
Preview in the builderAbout 10 minutes (about 30 for Nuxt/Vue)Anyone with the sandbox URLChecking the result while you iterate
Share link30 minutes up to 24 hours, chosen by youAnyone with the linkA quick review by a colleague or client
Export (ZIP)Permanent, on your machineYouKeeping the code, running it locally
Your own deploymentAs long as you run itWhoever you allowReal use

Previews

When generation finishes, the server starts an E2B sandbox from the template for your framework, installs any extra packages, writes the files and returns a URL on *.e2b.app. The preview header shows roughly how many minutes are left, then "Sandbox stopped".

  • Web templates (React, Next.js, Vue/Nuxt, Streamlit, Gradio, PHP, Laravel) get a URL.
  • The Python template runs your code once as a Jupyter cell and returns output and charts. There is no URL, so it cannot be shared or deployed as a site.
  • Each follow-up prompt starts a fresh sandbox. Earlier sandboxes keep running until their own timer ends.
  • Data that an app stores inside the sandbox is deleted with the sandbox. An app with a connected Supabase database can write to that database.

Share preview in the builder header keeps the current sandbox running for 30 minutes, 1, 3, 6 or 24 hours and gives you a link. A few rules apply:

  • Only previews you created. The server checks that the sandbox was started by the same signed-in user (or, when sign-in is off, the same IP address) before extending it.
  • Public to anyone with the link. There is no password. Do not share previews that contain anything private.
  • Short links need a KV store. If the deployment has a KV store configured, you get a short link like /s/<id>. Otherwise you get the raw *.e2b.app URL.
  • Expiry. After the chosen time the sandbox is deleted. A /s/<id> link then shows a "This preview has expired" page. The default limit is 20 share links per rolling 24 hours.
  • Not available after the sandbox stops. If the preview already stopped, you see "This preview has already stopped. Generate it again to share it."

Share links are for reviews. If someone needs the app next week, deploy it.

Export

Open the Code tab in the builder to browse and download generated files. Use Workspace → Projects to save the generated source and reopen it later. Run a preview from a saved project to recreate its framework scaffold.

Generated files (.zip)

Available at any time, even after the sandbox has stopped. Built in your browser from the generated project. It contains:

  • The files the model wrote, at their project paths (for example app.py, or app/page.tsx and app/components/...).
  • README.md with the project title and description, the framework, the sandbox runtime and package versions, the model name and id, the generation time, any extra dependencies, the file list, numbered steps to run it locally, a short "Before real users" note, and your last prompt. If the model itself wrote a README.md, the model's file is kept instead.
  • loomcode.json, a manifest with the generator, template id, model id, generation time, extra dependencies and file list.

It does not include the framework scaffold that the sandbox template provides (for example package.json, the Next.js layout and the shadcn/ui components, or the default Laravel application). The README's run steps recreate that scaffold:

FrameworkWhat the README tells you to run
ReactCreate a React TypeScript project with Vite, copy the files in, then run npm install and npm run dev
Next.jsnpx create-next-app@14.2.20 with TypeScript, Tailwind and the App Router, copy the files in, add any shadcn/ui components the code imports, npm run dev
Vue/Nuxtnpx nuxi@latest init, add the Tailwind module, copy the files in, npm run dev
Streamlitpip install streamlit pandas numpy plotly, streamlit run app.py
Gradiopip install gradio==4.44.1 pandas numpy plotly, python app.py
Pythonpip install pandas matplotlib plotly seaborn, run the script
PHPphp -S localhost:8000 (after composer require for any extra packages)
Laravelcomposer create-project laravel/laravel:^12.0, copy the files in, create database/database.sqlite, php artisan migrate --seed, php artisan serve

Full project from sandbox

Available only while the sandbox is still running, and only for sandboxes you created. The server packages the whole project directory from the sandbox into loomcode-project.zip. This includes the template's scaffold and configuration (for example package.json, lock files, config files, the default Laravel application) together with the generated files.

It deliberately excludes:

  • Installed dependencies and build output: node_modules, vendor, .next, .nuxt, .output, __pycache__, package caches.
  • Version control and tool state: .git, .cache, .config, .local, Jupyter and shell history files.
  • Local databases: *.sqlite and *.sqlite3 files.
  • Secrets: .env, .env.local, .env.*.local, .env.production, .env.development and .env.testing. Template files such as .env.example are kept.
  • Sandbox-only files: e2b.Dockerfile, e2b.toml and template start scripts; Laravel storage/framework, storage/logs and bootstrap/cache.

After unzipping, install dependencies for your framework and configure environment variables. If the sandbox has stopped, start a fresh preview from the source and export again. Full exports are limited to 25 MB.

Single files

In the Code tab, select any file to copy it or download it on its own.

Push to GitHub

  1. On GitHub, create a private repository initialized with a README. In Account → Integrations, connect GitHub and select that repository when installing the LoomCode GitHub App.
  2. With a preview running, open Publish. Enter owner/repository and choose Push source. The full project goes to a dedicated loomcode/… branch.
  3. Open Review and merge to inspect the changes and merge them into your default branch. Save the project in Workspace → Projects to retain the branch link for your next push. If someone edits that branch directly, reconcile the changes in GitHub before publishing again.

Connect Supabase

  1. Create or open a Supabase project. Copy the project URL and the publishable key from Connect.
  2. With React or Next.js selected in LoomCode, open Workspace → Database and choose Check and connect. Ask LoomCode to build the screens and database operations you need.
  3. Review any generated SQL in supabase/migrations/ before applying it in the Supabase SQL Editor. Use a test database to verify that a user can read and write their own records and that access to other users' records is denied.
  4. Set the two variables shown in Workspace on your hosting provider. React uses VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY. Next.js uses NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY. Exports include an .env.example with placeholders. Use Supabase row-level security policies for permissions.

Host it permanently

Start from the full-project export to keep the framework scaffold. For React, Next.js or Nuxt, use Import into Vercel to connect the GitHub repository and configure its environment variables. Once you connect Vercel in Account → Integrations, enter that Vercel project name in Publish and choose Deploy branch preview. Review and merge the branch when you want Vercel to build it as production. You can add a custom domain in Vercel's project settings and save the live URL in LoomCode. Vercel Git deployments

Next.js

Run npm install, then npm run build and npm start on any Node.js host, or connect the repository to a platform with Next.js support such as Vercel or Netlify. The sandbox ran Next.js 14.2.20 on Node 21.7.3; pin the same major versions until you have tested an upgrade. The sandbox has no database, so anything the app "saves" lives in memory. Official guide: Deploying Next.js.

React

The React template uses Vite. In a full project export, run npm install and npm run build, then serve the static dist/ folder. Archives from the retired Create React App template build to build/ instead.

Vue / Nuxt

The sandbox ran Nuxt 4 with Tailwind v3 through @nuxtjs/tailwindcss. npm run build produces .output/; run it on a Node host with node .output/server/index.mjs, or use nuxi generate for a static site if the app has no server routes. Official guide: Nuxt deployment.

Streamlit

Push app.py and a requirements.txt to a GitHub repository and deploy it on Streamlit Community Cloud, or run streamlit run app.py on any server with Python. The sandbox used Streamlit 1.49.1 and Python 3.9.23; pin versions in requirements.txt. Official guide: Streamlit Community Cloud.

Gradio

Create a Hugging Face Space with the Gradio SDK and add app.py plus a requirements.txt, or run python app.py on any Python server. The sandbox used Gradio 4.44.1 on CPU, so pin that version or test against a newer one. Official guide: Gradio Spaces.

PHP

Any host that runs PHP 8.2 or newer with the PDO SQLite driver can serve a plain PHP app. Keep the SQLite file outside the public web root, make sure the web server can write to it, and turn off error display in production. If the app needs MySQL, provision a database server; the sandbox had the driver but no MySQL server.

Laravel

Follow Laravel's deployment guide: run composer install --no-dev, create a .env and run php artisan key:generate, point the web server at public/, run php artisan migrate --force, and cache configuration and routes. Managed services in the style of Laravel Forge, or any server with PHP 8.2+ and a web server, work. The sandbox used Laravel 12.27.0 with SQLite; switch to a server database if several people will write at once. Official guide: Laravel deployment.

Python (code interpreter)

The Python template produces a script and its output, not a web app. Run it locally or in a notebook. If you want a shareable interface, ask for the same analysis as a Streamlit app.

Before real users

Generated code is a starting point. Before anyone depends on it:

  • Read the code. Make sure you understand every file you are shipping, including anything the model added that you did not ask for.
  • Add tests for the paths that matter (forms, calculations, permissions) and run them in CI.
  • Move secrets to environment variables. No API keys, passwords or tokens in source files. Rotate anything that was ever pasted into a prompt.
  • Add authentication and authorization if the app shows or changes anyone's data. Demo forms and sample logins from a prompt are not access control.
  • Use durable storage. Replace in-memory arrays and sandbox SQLite files with a real database, and set up backups.
  • Validate input on the server and escape output, even where the generated UI already validates.
  • Pin dependencies with a lock file (package-lock.json, composer.lock, requirements.txt with versions) and review them for known vulnerabilities.
  • Add monitoring. Error reporting, uptime checks and logs you can search, without logging personal data you do not need.
  • Plan a rollback. Deploy from Git with versioned releases so you can return to the last working version quickly.
  • Check legal basics for your audience: privacy notice, cookie consent where required, terms, accessibility.
Open the builder