@happyvertical/smrt-svelte
The top-of-stack Svelte integration: Provider, rich forms, browser AI, live collections, permissions, and AdminShell.
What it gives you
The top-of-stack Svelte integration: Provider, rich forms, browser AI, live collections, permissions, and AdminShell.
- 01Four-edge AdminShell with tenant navigation and activity feeds
- 02Tenant navigation built from the manifest, not hand-written
- 03SvelteKit server-to-client collection and message hydration
- 04Live-query bindings and browser AI adapters with a warm cache
Navigation the manifest already describes
tenantNavFromManifest turns a manifest into ordered navigation sections. It drops collections, internal and test classes, and items without a REST list route. It also drops single-table-inheritance subtypes that share a parent collection because the polymorphic endpoint already includes them. Pass permittedResources to filter the resources that a role can see. The filter checks the inheritance chain, so a permitted subtype keeps its applicable base link. Sorted output prevents manifest changes from reordering the sidebar.
How the shell is composed →AdminShell replaced the first-generation shells
The public workspace surface is the four-edge AdminShell contract. The earlier WorkspaceShell and RoleShell primitives remain only as migration references. No subpath exports them. Compose new work with AdminShell panels and focus tools. The earlier focus-tool dock stays available on the workspace/legacy subpath during application migration.
How the shell is composed →Browser AI preloads on a strategy you choose
Provider accepts a preload strategy of none, eager, idle, or on-visible. The default idle strategy schedules work in an idle callback. eager starts immediately, and none defers each adapter until first use. on-visible is manual: the package schedules nothing, and the application starts the preload. Adapters warm sequentially, and one failure does not stop the remaining adapters. A module-level cache keeps each initialized adapter, so navigation does not download a model again.
Calling a local model from a component
useLLM runs inside the Provider and exposes initialize, chat, and unload alongside reactive isReady, isGenerating, currentModel, error, and downloadProgress values. Streaming is delivered through an onToken callback while chat still resolves to the finished string. Unmounting deliberately does not unload the model, because the download is the expensive part.
One language snapshot per render
buildI18nSnapshot resolves server message templates for a locale, including tenant overrides. Provider accepts the result. The browser interpolates variables. A missing key uses the registered English default and then the key itself. Thus, a partly translated application still renders. The matching useI18n store and Trans component are in the UI foundation.
smrt-ui →