tinkaria
Advanced / operator

Advanced: author a platform app

Describe a small app with a descriptor and reach it at /<namespace>/<app>/.

Requires an operator to have provisioned your namespace first (a NATS account with its own quota). If you don't have a namespace yet, ask your operator - this step is not self-service on a fresh account.

The "Author a platform app" panel

Once your namespace exists, /app/ shows an Author a platform app panel. It takes your app's descriptor as JSON and publishes it over NATS via a self-serve, owner- confined authoring credential (/apps/author-cred) - there is no HTTP "create app" mutation; the descriptor write itself travels over NATS too.

The 'Author a platform app' panel: a JSON textarea with a Publish button.
The 'Author a platform app' panel: a JSON textarea with a Publish button.

The descriptor

A minimal generic app, served entirely by the platform's built-in static surface (no custom backend code needed):

{
  "namespace": "acme",
  "appId": "notes",
  "displayName": "Acme Notes",
  "authMode": "anonymous",
  "quota": {
    "conn": 200,
    "subs": 2000,
    "jetStreamDiskBytes": 67108864,
    "jetStreamMaxStreams": 8
  },
  "promotion": { "distSlug": "acme-notes" },
  "backend": { "type": "static" }
}

Publish it (from the panel, or the same NATS req/reply the panel uses), and the platform adopts it zero-restart: no process bounce, no redeploy. authMode gates who can reach it (anonymous, all-members, invited, or namespace-only); quota bounds its NATS footprint; promotion.distSlug points at a built static bundle if you have one.

Reach it

GET /acme/notes/          -> the app's shell (or a generic placeholder if no dist yet)
GET /acme/notes/config    -> vends a session credential, gated by authMode

Need your own server-side worker and/or your own frontend bundle (not the built-in static surface)? See Ship a userland app — it delivers a custom worker + dist to production by content hash over NATS, with no operator step.

See docs/AUTHORING.md (§16, "Complete worked example") for the full authored-app walk through, including wiring real store/reaction/view logic behind the descriptor.

On this page