Studio overview
Sendwend Studio is a local, read-only server that shows your workflows as canvases, renders your message templates, lists your segments and, with a stats source, reads live numbers from the engine's database.
Sendwend Studio (@sendwend/studio) is a local web app for looking at a Sendwend project. It reads the same workflow.config.ts that the compiler and your runtime read, compiles it, and shows what would ship: every workflow drawn as a canvas from its compiled IR, every email and push template rendered from its preview props, and every segment. Point it at the engine's Postgres and the same views carry real numbers: how many users entered and converted, how many messages were sent, delivered, opened and clicked, and how many users are waiting on each node right now.
It works the way react-email's preview server works: you start it next to your code, it serves a page on localhost, and it refreshes as you edit. Nothing is deployed and nothing leaves your machine.
This is where you go to answer "what does this workflow actually do", "what does this email look like with these props", and "how is this journey performing".
Why it is read-only
The studio views your project; it never changes it. There is no editor on the canvas, no publish button, no write-back to your files and no test send.
That follows from how Sendwend works. A workflow's structure is owned by code: it is typed TypeScript, reviewed in pull requests, compiled to a versioned IR and deployed with the rest of your app (see Workflows and Versioning). A second place that could change a journey would be a second source of truth, and the one in the browser would be the one nobody reviewed. So you edit workflows, templates and workflow.config.ts in your editor, Vite picks the change up, and the canvas and previews refresh in place.
A test send is left out for a related reason: it has effects outside the project (a real email in a real inbox, a provider's quota), so it belongs in a command of its own, not behind a button in a viewer.
Install and start
Install it as a dev dependency next to sendwend, then run it from the directory that holds workflow.config.ts:
The package is @sendwend/studio; sendwend is the command it installs, so run it through your package manager in a project that has the package installed. To run it without installing, name the package: pnpm dlx @sendwend/studio dev.
It prints Sendwend Studio ready at http://localhost:4321/ and serves until you stop it. A package.json script keeps it one command away; the example project in the SDK repository uses exactly this:
The dev server takes these options:
| Option | Default | What it does |
|---|---|---|
-p, --port <port> | 4321 | The port to listen on |
-c, --config <path> | ./workflow.config.ts | The project file to load |
-s, --stats <path> | ./workflow.stats.ts, if present | The stats source the numbers come from |
--open | off | Open the browser on start |
-h, --help | Print the usage |
The same binary also has two commands for CI and deploys, generate and plan, covered in CLI.
What it needs
- A
workflow.config.tswhose default export isdefineConfig({...})fromsendwend. Without one (or--config), the studio stops with a message saying so. It also looks forworkflow.config.tsx,.jsand.mjs. - Template registries in modules of their own. The config is evaluated on the dev server, never in the browser; the page receives the compiled IR as data and imports only the email and push registries, from the modules that export them. A registry written inline in
workflow.config.tscannot be imported that way. Configuration shows the layout. - React 19.
reactandreact-domare peer dependencies, as they are for your templates. postgres, only for database features. It is an optional peer dependency, needed by@sendwend/studio/postgresand bysendwend plan.- A stats source, only for numbers. Without
workflow.stats.tsevery structural view works and the numeric ones say no source is configured. The studio never fills them with mock data.
If the config does not compile (a message references an unregistered template, a template is used on the wrong channel, a literal prop fails the template's schema), the studio shows the compile error, naming the workflow and node, instead of the views. Fix the file and it refreshes on save.
A tour
The sidebar has five entries: Home, Workflows, Segments, Templates and Settings. Every view is its own URL, so you can paste a link to a canvas or a template into a pull request comment and a teammate running the studio on the same project lands on the same page.
Home is the project at a glance: how many workflows, templates and segments it has, and, with a stats source, how many users entered every workflow, how many converted, and the conversion rate. A template that a workflow references but no registry provides is counted here as "referenced without content".
Workflows lists every registered workflow with its shape (how many messages and delays it contains) and, with a stats source, its delivered count and open, click and conversion rates, each with a sparkline of recent daily counts. Open one and you get two tabs. Workflow is the canvas: the compiled IR drawn as cards and connectors, with a badge on each node showing how many users are waiting there. Click a node and an inspector opens with its parameters, the literals inside its conditions and the file and line that built it; a message node also shows what it sends, rendered. Overview charts the funnel over a date range: sent, open rate, click rate and conversion rate, a per-message table and the most-clicked links.
Templates lists every registered template and every template a workflow references, with a badge for the ones missing. An email renders through @react-email/render with its from, reply-to, subject and unsubscribe link above it, in light or dark mode and at desktop or mobile width. A push renders as an iOS and an Android lock-screen notification. Slack and Discord templates render as chat messages. A props editor lets you try other values in memory; when the template's schema refuses them, the preview is replaced by the list of failing fields.
Segments lists every segment, which workflows use it, and, with a stats source, its size and how that has moved recently. Open one to page through its members and open a member's profile.
Settings shows the config's email defaults (the default unsubscribe link and the quick-click window used to judge machine clicks), which stats functions are connected, and the studio's own language (English or Simplified Chinese) and theme.
Views goes through each one in detail, including what every number means and where it comes from.
What it never touches
The dev server reads the project directory, the config's directory, the workspace packages it links in, the studio package and node_modules. It serves your source to the page so previews can run, except workflow.config.ts and the stats file, which the page never imports, and the credential files a project keeps beside its code (.env*, .dev.vars*, *.p8, *.plist, google-services.json, *.pfx, *.pem, *.key). It sends no CORS headers, so a page on another origin cannot read it, and its one source-reading endpoint (mapping a node to its line on disk) answers same-origin requests only. Keep credentials in environment variables anyway.
Next
- Configuration: the config as the studio reads it, and connecting the engine's database for live numbers.
- Views: every screen and how to read it.
- CLI:
generatefor the engine's drizzle schema,planfor the deploy-time check. - Embedding: the canvas and other components in your own app.