diff --git a/AGENTS.md b/AGENTS.md index cce7fe9..49b9ac9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,7 +51,7 @@ src/ .claude/skills/ # Claude skills (best practices) docs/AI_AGENT.md # Extended agent reference -docs/screenshots/ # UI illustrations for the README +docs/screenshots/ # Screenshots for the README .github/workflows/ # CI on Node 22: ci.yml (build), test.yml (Vitest), e2e.yml (Playwright) Dockerfile # Node 22, next build + next start (port 3000) vitest.config.mts # Vitest config (jsdom, setup file, path alias) diff --git a/README.md b/README.md index 531e663..6104880 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A visual editor for building HTML email templates as a tree of blocks. Authors c Built with **Next.js** (App Router), **React**, **Ant Design**, and **Vitest**. -![Editor overview](docs/screenshots/editor-overview.svg) +![Editor: AI assistant on the left, live email preview on the right](docs/screenshots/app-overview.png) ## Goal @@ -22,27 +22,29 @@ Give non-specialists (and developers) a reliable way to assemble email templates ## Screenshots -### Editor in action +All screenshots use the sample data that ships with the [backend](https://github.com/LLazyEmail/email-template-editor-nodejs): a No More To-Go "Weekly Menu" issue with six recipes. -A template tree built from nested elements, with the **Generate** link to the rendered HTML and the Elements library below. +### Live preview -![Template tree and Elements library](docs/screenshots/app-tree-and-elements.png) +The preview renders the template tree as the final email. Here are the recipe rows: each row is a `{{twoBlocks}}` element holding two `{{recipeCard}}` elements. -Editing an element: the title is the placeholder used in the tree (`{{twoBlocks}}`), the value is the HTML it expands to. +![Live preview of the recipe rows](docs/screenshots/app-preview-recipes.png) -![Edit element modal](docs/screenshots/app-edit-element.png) +### Template tree and Elements library -### Template tree +Both panels sit under the preview and are collapsed by default. Each placeholder in a node's HTML becomes a child node (`{{item1}}`, `{{link}}`, `{{image}}`, …). Right-click a node to add a child, edit it, or delete it. The Elements library holds the reusable blocks: `{{twoBlocks}}` (two-column row), `{{recipeCard}}` (photo, title and subtitle) and `{{textBlock}}` (a paragraph). -Right-click a node to add a child, edit the current node, or delete it. +![Template tree and Elements library](docs/screenshots/app-tree-and-elements.png) -![Template tree](docs/screenshots/template-tree.svg) +### Editing an element -### Elements library +The title is the placeholder used in the tree (`{{recipeCard}}`). The value is the HTML it expands to, with its own placeholders. + +![Edit element modal](docs/screenshots/app-edit-element.png) -Maintain the reusable blocks that can be dropped into the tree. +### Regenerating the screenshots -![Elements panel](docs/screenshots/elements-panel.svg) +Start the backend on `:9000` with the sample `db.json` and run `npm run dev`. Then capture the editor at 1440×900 (device scale 2): the overview, the preview scrolled to the first recipe row, both panels expanded, and the **edit** modal of `{{recipeCard}}`. Hide the Next.js dev badge before you capture. ## How it works @@ -153,7 +155,7 @@ src/ types/ Shared types AGENTS.md Guide for AI coding agents docs/AI_AGENT.md Extended agent reference -docs/screenshots/ UI illustrations used in this README +docs/screenshots/ Screenshots used in this README .claude/skills/ Claude skills (best practices) ``` diff --git a/docs/screenshots/app-edit-element.png b/docs/screenshots/app-edit-element.png index 63c9be7..123d1aa 100644 Binary files a/docs/screenshots/app-edit-element.png and b/docs/screenshots/app-edit-element.png differ diff --git a/docs/screenshots/app-overview.png b/docs/screenshots/app-overview.png new file mode 100644 index 0000000..067b425 Binary files /dev/null and b/docs/screenshots/app-overview.png differ diff --git a/docs/screenshots/app-preview-recipes.png b/docs/screenshots/app-preview-recipes.png new file mode 100644 index 0000000..6e66337 Binary files /dev/null and b/docs/screenshots/app-preview-recipes.png differ diff --git a/docs/screenshots/app-tree-and-elements.png b/docs/screenshots/app-tree-and-elements.png index 57654a9..818c7ec 100644 Binary files a/docs/screenshots/app-tree-and-elements.png and b/docs/screenshots/app-tree-and-elements.png differ diff --git a/docs/screenshots/editor-overview.svg b/docs/screenshots/editor-overview.svg deleted file mode 100644 index aef7c77..0000000 --- a/docs/screenshots/editor-overview.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - Email Template Editor - Build a tree of blocks, then generate HTML - - Add root element - - Generate - https://cdn.example.com/template.html - - Template tree - root - header - logo - title - body - cta-button - footer - - Elements - - Add element - - Header block - - CTA button - - Footer - diff --git a/docs/screenshots/elements-panel.svg b/docs/screenshots/elements-panel.svg deleted file mode 100644 index 798f7ad..0000000 --- a/docs/screenshots/elements-panel.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - Elements - - Add element - - Header block - - edit - - Delete - - CTA button - - edit - - Delete - - Footer - - edit - - Delete - diff --git a/docs/screenshots/template-tree.svg b/docs/screenshots/template-tree.svg deleted file mode 100644 index 28a1e9a..0000000 --- a/docs/screenshots/template-tree.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - Template tree - Right-click a node to add, edit, or delete - root - header - logo - body - cta-button - footer - - Add - Edit - Delete -