App UI and static files
Add a React UI in ui/index.html, style it with built-in Tailwind CSS v4, serve static assets from ui/public/, and open the app's private URL.
An Executor app can include a private React single-page application in ui/index.html and ui/main.tsx, static or binary assets in ui/public/, and an SVG icon in ui/icon.svg. The browser UI calls the app’s own queries and mutations through createAppClient, queryReference, and mutationReference from apps/client and useAppQuery from apps/react. Private app UIs work on Local, Self-host, and Cloud.
The step that matters most: add react and react-dom to package.json, add ui/index.html and ui/main.tsx, deploy, and open the app with Open app on the app’s dashboard page.
Prerequisites and permissions: an app you can edit and deploy (Local owner, or app creator / organization admin or owner on Cloud and Self-host). On Self-host outside localhost, the operator must configure EXECUTOR_APP_UI_BASE_URL matching the dashboard protocol.
You’ll know it worked when… after deploying, opening the app’s URL loads your React page signed in as your Executor user and displays live data returned by your query.
How to use it
1. Add ui/index.html, ui/main.tsx, and styles
- Declare
reactandreact-dominpackage.json(appsexpectsreact^19.2.0). - Import server operation types with
import typeonly from../index.tsso server code is never bundled into the browser; put shared schemas in a separate file imported by both. - Tailwind CSS v4 is built in: import
./style.cssfromui/main.tsxand start it with@import "tailwindcss";. No Tailwind dependency, config file, or build script is needed. Use@themefor tokens and@source inline("...")for classes supplied only at runtime. ui/index.htmlis served for any route without a file extension, so client-side React routing works out of the box.
2. Serve static files from ui/public/ and add ui/icon.svg
- Files under
ui/public/are copied verbatim to the version and served at the app’s origin (for exampleui/public/data.jsonis served at/data.json). Binary assets (images, fonts, audio, video,.wasm,.glb) and prebuilt scripts/styles are supported with byte-range requests and content revalidation. - Add
ui/icon.svgfor the app’s icon (served at/_executor/icon.svg) used by desktop windows, launchers, and the menu bar. For desktop-window installation, menu-bar popovers (ui/menubar.html), shortcuts, and notifications, see Desktop apps.
3. Open the app’s URL
- Local: open the app in the local dashboard and click Open app. Each app opens on its own
localhostsubdomain. - Cloud: open the app in the dashboard and click Open app, or call
tools.executor.appUi.location({ path: { organization, app } })over MCP to get{ status: "ready", url: "https://<app-slug>.<org-slug>.executor.website", name, icon, menuBar }. - Self-host: click Open app or call
tools.executor.appUi.location. Self-hosted servers use the operator’sEXECUTOR_APP_UI_BASE_URLoutsidelocalhost; without it,appUi.locationreturnsstatus: "unavailable"withreason: "no_app_domain".
Deploying builds and activates the UI automatically, and active open pages reload on each new activation.
Example
{
"name": "status-board",
"private": true,
"dependencies": {
"apps": "0.0.1-beta.148",
"react": "19.3.0",
"react-dom": "19.3.0"
}
}import { defineApp, object, query, router, string } from "apps";
export const status = query(
{
description: "Return the current service status",
input: object({}),
output: string(),
},
async () => "All systems normal",
);
export default defineApp({}, { tools: router({ status }) });<!doctype html>
<html>
<head>
<title>Status Board</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>import React from "react";
import { createRoot } from "react-dom/client";
import { string } from "apps";
import { createAppClient, queryReference } from "apps/client";
import { useAppQuery } from "apps/react";
import type { status } from "../index.ts";
import "./style.css";
const client = createAppClient();
const statusAtom = client.queryAtom(queryReference<typeof status>("status"), {}, string());
function App() {
const { data, pending, error } = useAppQuery(statusAtom);
return (
<main className="p-6 font-sans">
<h1 className="text-xl font-semibold">Status Board</h1>
<p role="status">{error ?? (pending ? "Loading…" : data)}</p>
</main>
);
}
createRoot(document.getElementById("root")!).render(<App />);@import "tailwindcss";Limits
- React SPAs only: React is the only supported UI framework. Server-side rendering (SSR), React Server Components, custom bundler plugins, and public unauthenticated sharing are not supported.
- Tailwind CSS v4 directives: filesystem
@sourcepaths and JavaScript@config/@pluginfiles are not supported. - Static file bounds (
ui/public/): at most 10,000 files, 32 MB per file, and 1 GB total; paths cannot collide withindex.html,_executor/, or any compiled browser output. Sources larger than 16 MiB total must be pushed with Git (see Build an app). - Icon validation (
ui/icon.svg): must be one well-formed<svg xmlns="http://www.w3.org/2000/svg">file up to 64 KiB with noDOCTYPE,<script>,<foreignObject>,on*event attributes, or externalhref/xlink:hreflinks. - Browser authentication and framing: app UIs require an authenticated Executor browser session (MCP tokens do not grant a browser session), never put app IDs or credentials in browser code, and app responses send
Content-Security-Policy: frame-ancestors 'none'so pages cannot be embedded in an<iframe>. - Approvals from a UI: calling a tool whose approval rule asks for confirmation from an app’s web page currently fails rather than opening an approval prompt.