@frontera-sdk/core
v1.50.19
Published
Frontera app runtime: the platform bridge client, app bootstrap and typed platform client.
Readme
@frontera-sdk/core
The runtime a Frontera app mounts on: the postMessage bridge to the platform host, the app bootstrap, and a typed platform client.
bun add @frontera-sdk/core react react-dom @tanstack/react-queryimport { FronteraAppProvider } from '@frontera-sdk/core/react'
export function Providers({ children }: { children: React.ReactNode }) {
return <FronteraAppProvider>{children}</FronteraAppProvider>
}FronteraAppProvider selects one configured transport before connecting:
embedded postMessage bridge, same-origin standalone session, or loopback local
session broker. All three synthesize the same BridgeInit, so Blueprint and
other domain providers do not need transport-specific branches. A missing
transport renders a configuration diagnostic immediately.
createFronteraApp() remains the Vite compatibility wrapper. Embedded
navigate() synchronizes the platform-owned URL; standalone and local Apps
own routing themselves.
Entry points
| Import | What it is |
|---|---|
| @frontera-sdk/core/react | FronteraAppProvider, useFronteraApp, and mode types |
| @frontera-sdk/core/create-frontera-app | app bootstrap and useFronteraApp |
| @frontera-sdk/core/client | the typed platform client |
| @frontera-sdk/core/config | credential and origin resolution |
| @frontera-sdk/core/bridge-client | the host handshake, if you need it directly |
| @frontera-sdk/core/bridge-protocol | the message types both sides speak |
| @frontera-sdk/core/app-state | shared, validated app state |
| @frontera-sdk/core/theme | applying the host's design tokens |
| @frontera-sdk/core/errors | the error taxonomy, code mirroring the service |
Standalone and local sessions refresh their short-lived App token at 80% of its lifetime. The browser never receives a long-lived workspace key.
Published as TypeScript source. Every consumer is a bundler or tsc, so a
build step would emit output the consumer immediately re-transpiles.
License
Apache-2.0. See LICENSE.
