smrt
Open the smrt source on GitHub Switch to dark color scheme
← All packages
Web & UI v0.62.10 New

@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.

Source ↗

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.

  1. 01The owner changes the app through builder operations: models, fields, code methods, and recipes
  2. 02A risky change becomes an approval that only the signed-in owner decides
  3. 03Every change is a version, and the owner can undo to an earlier version
  4. 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.