Preview infrastructure

Give your app a
live preview layer.

Turn generated work into stable, reviewable links without building uploads, hosting, tenant isolation, domains, and lifecycle management yourself.

How it works

One integration, from upload to approval.

01

Create an Application

Create an Organization and Application, then issue a scoped server key for the product that will publish previews.

02

Publish a preview

Send a static bundle from your server, or mint a short-lived grant so a browser or desktop client can upload directly.

03

Keep the link moving

Update the same URL, collect review decisions, react to signed events, and revoke the preview when the work is done.

The platform layer

The hard parts are already connected.

Build the preview experience your product needs while temp.md owns the infrastructure behind it.

Delegated publishing

Give an untrusted client one tightly limited upload session without exposing your Application key.

Stable previews

Promote complete versions atomically while the canonical URL stays unchanged for the whole review cycle.

Review workflow

Freeze a version for approval and keep append-only review decisions attached to the preview.

Signed webhooks

Receive verifiable lifecycle and review events with retry-safe delivery for downstream automation.

Branded domains

Serve isolated preview subdomains beneath your own namespace with managed certificates and fallback URLs.

Tenant boundaries

Scope resources to an Application and associate every preview with your own customer and project IDs.

Server SDK

Publish for every customer from your backend.

Use @tempmd/platform with an Application-scoped key. Your customer and project IDs stay opaque to temp.md while giving your product a reliable way to list, update, and revoke its own previews.

npm install @tempmd/platform

server.ts
import { TempmdPlatform } from "@tempmd/platform";

const tempmd = new TempmdPlatform({
  apiKey: process.env.TEMPMD_APPLICATION_KEY!,
  clientIdentity: "my-builder/1.0.0",
});

const preview = await tempmd.createPreview({
  externalSubjectId: user.id,
  externalProjectId: project.id,
  files: [{ path: "index.html", data: html }],
  spaMode: true,
});

return { url: preview.canonicalUrl };
renderer.ts
import {
  TempmdClient,
  TempmdPreviewClient,
} from "@tempmd/client";

const previews = new TempmdPreviewClient(
  new TempmdClient({ accountToken: publishGrant })
);

const result = await previews.publishPreview({
  files: [{ path: "index.html", data: html }],
  onState: saveToProtectedStorage,
});

showPreview(result.record.canonicalUrl);

Delegated browser publishing

Let the client upload without giving it the keys.

Mint a one-session publish grant with explicit file and byte limits, then upload directly from a browser or Electron renderer. No backend file proxy, cookies, or Node polyfills required.

npm install @tempmd/client

Branded delivery

Your preview namespace, our delivery layer.

Connect a namespace such as preview.example.com once. Every preview gets an isolated branded subdomain and certificate while its canonical temp.md URL remains a safe fallback.

DNS + TLS

*.preview.example.com

CNAME → temp.md fallback origin

calm-river-a1b2.preview.example.com

Per-preview routing and certificate activation

Ready to add a preview layer?

Create an Application, publish the first customer preview, and keep your product focused on the experience around it.