# Xyvenra Studio by Ouroboros: multi-file early access

Xyvenra Studio by Ouroboros builds small, browser-run web apps from a prompt using a provider API key supplied by the signed-in user. Supported providers are OpenAI, OpenRouter, Groq, Together AI, DeepSeek, Mistral, Google Gemini, and Anthropic Claude. Anthropic uses its Messages API; other providers use their compatible chat-completions APIs. The provider bills the user directly; Xyvenra does not store the key.

## What it does

- Generates or revises complete `index.html`, `styles.css`, and `app.js` source files.
- Lets the user select and edit source files, add or remove supported text files, and refreshes the preview as HTML, CSS, and JavaScript change.
- In the source editor, Tab inserts two spaces at the caret or indents all selected lines; Shift+Tab removes up to two leading spaces or one tab from selected lines (or from the current line when there is no selection). Selection and caret positions are retained, and edits go through the textarea edit operation so browser undo remains available.
- Shows every project `.html` or `.htm` page in a preview-page selector and lets users inspect the same source at **Fit**, **Mobile (390 px)**, **Tablet (768 px)**, and **Desktop (1280 px)** CSS viewport widths. These presets change only the iframe width; they do not emulate a device, browser chrome, operating system, touch hardware, or network conditions. Local CSS and classic JavaScript references are resolved relative to the selected page and inlined into its isolated preview. Local SVG images in HTML `img`/`source` `src` or `srcset` attributes and CSS `url()` references are sanitized and embedded, including references from nested pages and stylesheets. The SVG sanitizer removes scripts, foreign content, event handlers, external references, inline styles, and unsupported SVG elements or attributes. A preview embeds up to 1,000,000 characters of SVG data; additional references and missing or unsafe files remain blocked. Other local image and binary formats are not supported. The preview displays one page at a time. Links to another local HTML page send a narrowly scoped navigation message from the sandbox to Studio, which selects that page in the preview; links to a fragment on the current page continue to use normal browser navigation. The parent accepts only messages from the active preview frame and only paths present in the project page list. Choose the page selector to inspect a page directly.
- Searches literal text across all project source files and can replace every match, with optional case-sensitive matching and a per-file match list. Replacements update the current preview but remain unsaved until the user saves the project.
- Runs the page in an iframe sandbox with a restrictive content policy that blocks network access. Generated code is not executed on Xyvenra servers.
- Downloads project source as a ZIP.
- Downloads a standalone HTML build that compiles supported linked HTML pages, local CSS, classic JavaScript, and referenced local assets into one file for static hosting. Multi-page navigation is handled within that document. The original source ZIP remains available for continued editing. Framework builds and JavaScript modules are not bundled; remote URLs and external service behavior remain external.
- Lets users stop a generation request; the browser and provider request are aborted, and the current project remains unchanged when the result is incomplete. Provider billing may include usage accrued before cancellation reaches the provider.
- Imports a project ZIP with one `index.html` and up to 19 supported companion source files. Imports are inspected in the browser, reject unsafe paths and oversized archives, skip non-source files, and never publish automatically. Framework sources such as JSX, TypeScript, Vue, or Svelte are not converted; export a built static site ZIP where available, or keep the original framework project in Xyvenra Code.
- Imports a **built static-site ZIP for Cloud review**. Run your own framework build or static export on your computer, ZIP its output folder, optionally enter that folder name (such as `dist`), and choose **Import built site for Cloud review**. Studio inspects and compiles the ZIP in the browser and transfers the result to Cloud only after a confirmation. Cloud asks before loading it into the editor; its network-blocked sandbox preview is available before saving or publishing. See [the built-site import guide](./xyvenra-studio-static-build.md).
- Saves up to 10 projects in browser storage. Private cross-device source sync is optional and requires explicit user opt-in; the quota is 10 projects and 1.5 MB per account.
- Supports Ctrl+S on Windows/Linux and Command+S on macOS to run the same **Save project** action as the library button. The shortcut is handled only after Studio is ready, when a saved project or non-empty editor content exists, and while generation, sync, import, export, and model loading are idle. It saves in the browser and syncs privately only when the user has enabled sync; API keys are excluded. When the shortcut is not eligible, the browser's normal save behavior is left alone.
- Tracks unsaved project name, prompt, provider/model selection, and source-file changes against the last locally saved snapshot. It warns before same-tab navigation, refresh, or close, and asks before switching projects, starting a new one, or replacing content with a ZIP/GitHub import. An untouched blank project does not produce a warning. The browser controls the wording and display of its leave/refresh prompt. Successful local saves clear the warning immediately; an optional cloud-sync failure does not undo a local save. API keys are never part of the compared or saved project snapshot.
- Compiles supported linked HTML pages and their local CSS and classic JavaScript into one static site for Xyvenra Cloud, including internal page navigation. The finished site must fit Cloud's 180 KB early access limit. Missing local links/assets and unsupported module scripts are rejected before handoff. Built-site ZIP import uses the same Cloud static-site compiler and safety bounds.

The generator accepts a bounded set of text file extensions, up to 20 files and 220 KB of source per project. Studio does not run build tools, install packages, execute server code, convert framework source, or create a deployable framework project. Built-site ZIP import accepts up to 12 MB compressed / 8 MB expanded, 100 archive entries, 10 HTML pages, and the 180 KB compiled-site cap. It embeds supported local HTML, CSS, classic JavaScript, and assets into one HTML document. JavaScript module scripts (including common Vite outputs), WASM-based or server-dependent applications, missing files, and unsupported assets/scripts are not converted. Remote services and remote assets are blocked in the Cloud preview by its content policy. Collaboration and team workspaces are not implemented. The standalone HTML download and Studio-source Cloud handoff use the source-project compiler; built-site import uses the static-archive compiler. If Cloud rejects a larger or unsupported build, reduce it to a small static export or host it elsewhere.

## Private sync

When enabled, project names, prompts, source files, provider names, and model names are stored in the authenticated account's owner-only table. Provider API keys are excluded. Database Row Level Security restricts rows to the owner, and a database trigger enforces the per-account project and storage quotas. Disable sync to stop future uploads; existing cloud copies remain until the user deletes them while signed in.

## Generation API

`POST /api/studio/generate` requires a signed-in session and same-origin request. It forwards the user-provided key and bounded prompt/project snapshot to the selected provider's chat-completions endpoint and streams the provider response. Xyvenra does not persist provider keys or source snapshots in this API route. The browser parses and validates the final project JSON before it replaces the current source.

`GET` and `PUT /api/studio/projects` require a signed-in same-origin request. `DELETE /api/studio/projects/:projectId` deletes only the authenticated user's saved project under RLS. JSON file paths are restricted to safe relative paths and supported text extensions; binary content, traversal paths, oversized files, and incomplete `index.html` documents are rejected.

This is an early access app builder, not full parity with Emergent or a framework-based coding environment.
