@happyvertical/smrt-app-shell
A smrt app that builds and runs one owner’s own smrt app from versioned definitions, with owner approvals, drafts, and an assistant.
What it gives you
A smrt app that builds and runs one owner’s own smrt app from versioned definitions, with owner approvals, drafts, and an assistant.
- 01The owner changes the app through builder operations: models, fields, code methods, and recipes
- 02A risky change becomes an approval that only the signed-in owner decides
- 03Every change is a version, and the owner can undo to an earlier version
- 04A draft copy holds changes until the owner previews and publishes them
One owner, one policy
The shell checks the owner role on every route and builder operation. A token, header, or body never grants that role. The /mcp route and the assistant share one policy. A non-owner receives no tools.
Risky changes wait for approval
A risky builder command, a record deletion, a REST DELETE, and an undo that converts a field type create an Approval. The change runs only after the owner decides in the interface. No tool decides an approval, and the assistant cannot approve its own request.
Draft, preview, publish
startDraft opens a copy of the app. While a draft is open, the live structure is frozen and live records keep working. previewPublish shows the change, and publishDraft is always an approval pinned to that preview. discardDraft drops the draft.
Data and runtime layout
The shell uses the local profile of smrt-app-runtime. The shell database holds users, sessions, the app, its versions, and approvals. The owner’s app keeps its own database and snapshots in the data root. PORT and SMRT_DATA_DIR set the port and folder.
The assistant and the engine
The assistant uses the same tool policy as /mcp. It runs on an API key, a ChatGPT sign-in preview, or a local agent command-line tool. The engine entry exports AppHost, which runs the owner’s app in a worker thread with migrations and a sandbox for code methods.
Package UI
No UI layer to carry
This package stays focused on models, runtime behavior, or tooling. Build its interface with smrt-ui, or use a related domain package that exposes a /svelte entry point.
Intentionally headless
Package previews
No playground module yet
This package does not currently export a ./playground module. Its component names and import path remain available in the Components tab.
Intentionally not registered
Generated interface
REST
The exact route set comes from each model's @smrt({ api }) policy
and the application manifest—not from a second controller definition.
The shell models expose only custom operations. They have no generated list, get, create, update, or delete route.
Generated interface
MCP
AI tools are generated from the methods you explicitly include. Their inputs are validated against the same model metadata used by REST and CLI.
The shell models expose only custom operations. They have no generated list, get, create, update, or delete route.
Browser-native agent interface
WebMCP
The generated web definitions carry the same tool names, descriptions, and JSON Schema
inputs as MCP. smrt-web registers them with document.modelContext.
The shell models expose only custom operations. They have no generated list, get, create, update, or delete route.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
The shell models expose only custom operations. They have no generated list, get, create, update, or delete route.