← Commit history

Initial commit: app/adom-resend-studio

Colby Knox ·925bd3aeaa ·11d ago
2 files changed +144
README.mdadded+83
@@ -0,0 +1,83 @@+# Resend Studio++A local editor for [Resend](https://resend.com) email templates, for people who+would rather not live in Resend's dashboard. Paste your Resend API key, and edit,+preview, lint, test, and publish your templates from a fast local UI. It can also+move your templates over from SendGrid.++Runs on your machine. Your API key is stored locally and only ever sent to Resend.++![Editing a template with live preview, variables, and checks](docs/screenshots/editor.png)++## What it does++- **Lists your Resend templates** next to your local drafts, with published,+  unpublished, and local-only state at a glance.+- **Edits everything Resend stores**: name, alias, subject, sender, reply-to, HTML,+  and the variable schema (key, type, fallback), with a live preview substituted+  exactly the way Resend does it, at desktop and phone widths.+- **Lints as you type** against Resend's rules: leftover Handlebars blocks+  (`{{#if}}`) and double-brace variables that would go out as literal text,+  undeclared or reserved variables, missing fallbacks, the 50-variable limit.+- **Never changes live email by accident.** Save keeps a local draft. Upload sends+  it to Resend's draft. Publish is separate and asks you to type the alias.+- **Test sends**: send the unpublished draft (rendered locally with your sample+  values) or the published version through Resend's own template engine.+- **Imports from SendGrid** (read-only): converts `{{var}}` to `{{{var}}}`, and+  for each `{{#if}}` block lets you split it into two templates, always show it+  (with a fallback), or drop it, since Resend has no conditionals.++![Checks catching a leftover {{#if}} block and an undeclared variable](docs/screenshots/lint.png)++## Install++```bash+adom-wiki pkg install adom/adom-resend-studio+```++The installer builds from source, so it needs a Rust toolchain (`cargo`).++## Use++```bash+adom-resend-studio serve            # then open http://127.0.0.1:8894+adom-resend-studio serve --open-tab # inside Adom Hydrogen: opens it in a tab+```++On first run the studio opens **Settings**. Paste a Resend API key from+[resend.com/api-keys](https://resend.com/api-keys):++- **Full access** lets the studio list, upload, and publish templates.+- **Sending access** only allows test sends. The studio tells you which one you+  pasted.++Also set a default **From** address on a domain you verified in Resend.++![Settings: your key stays on this machine](docs/screenshots/settings.png)++## Two things worth knowing about Resend templates++1. **Variables are not HTML-escaped.** Resend inserts `{{{var}}}` values as raw+   HTML. If a value comes from a user (a name, a comment), escape it in your+   sending code, or someone can put links or markup into your email.+2. **The same value goes into the subject.** Escape a value for the body and the+   subject shows `&`. Build the subject from the raw values in your sender+   and pass it as `subject`, which overrides the template's.++## Where things live++| What | Where |+|---|---|+| Settings (keys, sender defaults) | `~/.local/share/adom-resend-studio/settings.json`, owner-only |+| Local drafts | `~/.local/share/adom-resend-studio/resend-studio.db` (SQLite) |+| Override the folder | `RESEND_STUDIO_HOME` |++Environment variables win over Settings when set: `RESEND_API_KEY`,+`SENDGRID_API_KEY`, `RESEND_STUDIO_FROM`, `RESEND_STUDIO_REPLY_TO`,+`RESEND_STUDIO_TEST_TO`.++The server listens on 127.0.0.1 only and accepts requests from its own page only.+To reach it through another hostname (a reverse proxy), list it in+`RESEND_STUDIO_ALLOWED_HOSTS`.++See `SKILL.md` for the HTTP API an AI agent can drive.
page.jsonadded+61
@@ -0,0 +1,61 @@+{+  "slug": "adom-resend-studio",+  "title": "Resend Studio",+  "type": "app",+  "version": "0.1.0",+  "description": "A local editor for Resend email templates: paste your API key, then edit, preview, lint, test-send, and publish templates without Resend's dashboard. Also imports SendGrid dynamic templates and converts their Handlebars to Resend's variable syntax.",+  "tags": [+    "cli",+    "resend",+    "email",+    "templates",+    "sendgrid"+  ],+  "dependencies": {},+  "discovery_triggers": [+    "resend template",+    "resend email template",+    "resend studio",+    "email template editor",+    "migrate sendgrid to resend",+    "publish resend template",+    "send test email",+    "preview email template"+  ],+  "discovery_pitch": "Edit Resend email templates locally with a live preview and lint, test-send drafts, and publish on purpose. Bring your own Resend API key; imports SendGrid templates too.",+  "sample_prompts": [+    {+      "label": "Install",+      "prompt": "install the adom-resend-studio app"+    },+    {+      "label": "Open it",+      "prompt": "open resend studio so I can edit my email templates"+    },+    {+      "label": "Migrate",+      "prompt": "import my SendGrid templates into Resend Studio"+    }+  ],+  "metadata": {+    "activate": {+      "kind": "bridge",+      "skill": "adom-resend-studio",+      "requires": [],+      "verbPrefixes": []+    }+  },+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "hero": {+    "type": "image",+    "path": "docs/hero.png"+  },+  "org": "adom",+  "author": {+    "name": "Colby Knox",+    "email": "[email protected]"+  }+}\ No newline at end of file