Skip to main content

@picsart/runtime

@picsart/runtime is a standalone miniapp host runtime for the Picsart editor. A kernel orchestrates rendering adapters, service providers, and tooling adapters to load and run miniapps across browser, Node.js, CLI, CI, and headless environments — with a single, dependency-injected entry point and no inheritance or layering.

Why it exists

It is the intended future standard for all miniapp hosts. Today photo-editor integrates the platform SDK directly and shell renders miniapps ad hoc; the runtime replaces both with one turnkey host that has a minimal integration cost.

The composition model

The kernel is the only entry point. It accepts adapters and providers through constructor injection — each category is independently composable, so a host picks exactly the pieces it needs:

Kernel (createRuntime) ← Rendering Adapter (web-layering | headless | custom)
← Service Providers (auth, theme, replay, credits, ...)
← Tooling Adapters (CLI, profiler, dev server)

There are no layers, no plugin registry, and no middleware chain — just plain constructor injection. See Architecture → Overview for the full picture.

Where to go next

  • Installation — add the runtime to a host and choose your entry points.
  • Quick Start — boot a kernel and load a miniapp.
  • Architecture — the composition model, adapter contracts, and context factories.
  • Adapters — rendering engines and the React provider stack.
  • Embedded Runtime — ship a miniapp as a standalone SPA.
  • API Reference — generated from the source via TypeDoc.