The web host for development
How Seed Exact runs in a browser through Exact's web host, the commands for it, what the project uses it for, and what a passing web run cannot prove.

Exact can run the same app in a browser. Its web target turns the plan into one ES module over a small runtime that drives the real DOM, and runs app.ts in the browser's own engine (host/web-js). Seed Exact declares the web host in app.json and uses it as a fast development and test loop. It is not a shipped product: the mobile app ships only to iOS.

Commands

Command

What it does

bun exact.mjs web

The dev loop. Serves the app on http://127.0.0.1:8765/ (the first free port up to 8864 if taken) and reloads the page on every save. Runs in the foreground until Ctrl-C. --port <n> chooses the port, --lan binds every interface so a phone on the network can open it

bun exact.mjs web-build

Builds the web app once into target/web-dist. About a second when nothing changed. --out dist makes a release build

bun exact.mjs serve [<dir>]

Serves a built site as a static host would, default target/web-dist, port PORT or 8765

bun exact.mjs test web [files]

Runs the Contract tests in headless Chrome. Each test gets a fresh page on 127.0.0.1 at a port derived from its own store's name (20000 to 47999)

bun exact.mjs agent web --storage s1 <op>…

Drives the app by hand. A web drive with no --storage has no app storage and keeps no secrets

bun exact.mjs verify

The full check on web at 390x844 and 1280x900, light and dark, plus a relaunch

bun run build and bun run start in package.json are web-build --out dist and serve dist. The root shortcut is pnpm mobile:web. Flags and ports are from Exact's help texts. test, agent and verify build and serve their own copy, so they do not need the dev loop running.

What the project uses it for

    The edit loop. A saved Contract or TypeScript edit is in the page in about a tenth of a second, against minutes for a first native build.

    Fast Contract tests. test web runs the same *.test.contract files as iOS, see Contract UI tests. Tests that need local services use the test server on 127.0.0.1:4790, which Exact starts for the run.

    Layout checks at two widths through verify, see Verify and visual checks.

    Screenshots. DESIGN.md asks each package to save finished screens in light and dark on both web and iOS, see Review evidence.

    The real vault drive. .tests/real-vault/drive.ts web runs the actual app in a browser against a real vault server, see Real vault compatibility suite.

What it cannot prove

Not proved on web

Why

Where it is proved

The 100 ms turn budget

"The browser keeps no such budget" (reference). A loop that would be refused on a phone runs to completion

iOS, at real data sizes

Native presentation

The web draws the browser's DOM and CSS. On iOS the navigation bars, the tab bar, sheets and list rows are UIKit's own

verify ios, see Simulators and devices

Redirect grant checks

Native hosts check "each redirect target against the source's net.fetch grants before contacting it. The web lets the browser follow and checks only the final response URL" (reference)

iOS

Grant isolation in general

"Exact API grants do not sandbox page code." CORS can also hide a response that iOS would read

iOS, see Grants and capabilities

Keychain behaviour

Secrets live in localStorage on the web, the Keychain on iOS

iOS

App Transport Security

A browser refuses ws: from an https: page except to loopback. iOS refuses http: beyond the local network

iOS

Hermes differences

Hardened prototypes, missing Intl parts and engine limits appear only on Hermes, see The data module runtime

iOS, and crypto.test.contract run on iOS

Deep links from other apps

hm:// links arrive through the native protocol_handlers registration

iOS, see Deep links and URL handling

The rule that follows: the web host is for speed, and a change is done only after the iOS run. This is why the pipeline in From user workflow to TestFlight asks for simulator evidence.

Workarounds the web build needs

    exactTime during prerender. Exact's web build renders pages ahead of time, and that server render "installs no reserved exactTime answer", so the build would fail once the app has any TypeScript source. Two sources therefore answer exactTime with zeros as a fallback. "Browser and native hosts answer exactTime themselves before the data module is asked, so this is reached only by that prerender" (read/sources.ts L17-L20, L35-L36, agents/sources.ts L140-L142).

    Stale build after web-build. With this pin, exact.mjs web-build can record a temporary .exact/backend-origin and remove it at exit, which makes an immediately following scripted open reject the build as stale. The real vault harness calls Exact's lower-level builder instead (README).

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
Linked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentThe web host for developmentThe web host for developm…
Citations 0Children & links 15

Loading child documents…

Connections show where other documents or comments link to this document.

Related documents

Loading connections…