Skip to main content
Studio is the admin UI that every Pylon app serves at /studio. An operator uses it to read and change rows and to see what the server does.

Sign in

Studio needs a signed-in admin. There are two kinds:
  • A Studio operator: an account for the deployment, with no row in your User entity. Create one with the CLI:
    Add --url <url> when Pylon does not run at http://127.0.0.1:4321. A Pylon that runs with PYLON_ADMIN_TOKEN needs the same variable set for the command. A local dev server with no token needs none.
  • An app admin: a user of your app that auth.user.adminField or PYLON_ADMIN_EMAILS marks as an admin. Sign in through the app, then open /studio.
An operator session counts only in Studio and on the admin API. It does not sign anyone in to the app.

Pages

The request log holds the last 1,000 requests. Set PYLON_REQUEST_LOG_SIZE to keep more (up to 50,000). On a SQLite app the server appends the log to <database file>.requests.jsonl every 5 seconds and reads it back when it starts, so a restart or a deploy keeps it. PYLON_REQUEST_LOG_FILE sets another path, and a Postgres app needs it to keep the log across a restart. It keeps the path with no query string, and no headers and no bodies. Live sync never shows the value of a serverOnly or encrypted field. It shows [redacted].

Configure

Put a studio.config.ts next to app.ts:
With no config, Studio shows every entity with one column for each field.

Extend

Put a studio.entry.tsx next to app.ts to add your own React components and action handlers:
The CLI bundles the file when the server starts. The bundle runs on the React instance that Studio runs on: import react as usual, and do not bundle your own copy. A handler gets: A kind: "custom" action with no handler is disabled. Its tooltip names the handler id that is missing.