diff --git a/README.md b/README.md index b6c22b3..741a977 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,26 @@ Give non-specialists (and developers) a reliable way to assemble email templates | Problem | How this app helps | | ---------------------------------------------- | --------------------------------------------------------------- | | Email HTML is fragile and hard to edit by hand | Structure is a tree of elements instead of a single HTML blob | -| Teams reinvent the same header/footer/CTA | Shared **Elements** library can be reused across templates | +| Teams reinvent the same header/footer/CTA | Each template has an **Elements** library of reusable blocks | +| Several emails are in progress at once | **Templates** list: create, rename, delete and open each one | | Design and code drift apart | Visual tree + generate step keeps the output tied to the model | | Hard to see the hierarchy of a template | Tree view with add / edit / delete on each node | | Generating a final file is manual | **Generate** calls the backend and returns a link to the result | +| No record of what was sent | **Sent emails** log keeps recipients, subject and the HTML | ## Screenshots -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. +All screenshots use the sample data that ships with the [backend](https://github.com/LLazyEmail/email-template-editor-nodejs): a template called "Default template" with a No More To-Go "Weekly Menu" issue of six recipes. For the list and the log, two empty templates were added and the sample was sent three times. + +### Templates + +`/` opens the list of templates. Click a name to open it in the editor; **Rename** and **Delete** sit in each row, **New template** creates an empty one. + +![Templates list](docs/screenshots/app-templates.png) + +### Editor + +The editor works on one template. The header shows its name and a link back to the list; the toolbar has **Add root element**, **Generate** and **Send email**. The AI assistant is on the left, the live preview on the right (see the screenshot at the top of this page). ### Live preview @@ -42,21 +54,57 @@ The title is the placeholder used in the tree (`{{recipeCard}}`). The value is t ![Edit element modal](docs/screenshots/app-edit-element.png) +### Sending an email + +**Send email** asks for recipients and a subject (the template name by default). Delivery is not configured yet: the backend renders the template and records the email in the log without delivering it. + +![Send email dialog](docs/screenshots/app-send-email.png) + +### Sent emails + +The **Sent emails** page lists every send, newest first. Filter by template in the Template column; more than three recipients collapse into a `+N` tag. + +![Sent emails log](docs/screenshots/app-sent-emails.png) + +Click a row to see the email as it was sent: recipients, template, time, status and the HTML snapshot. The snapshot stays even if the template is changed or deleted later. + +![A sent email opened in the drawer](docs/screenshots/app-sent-email.png) + ### Dark theme The button in the top-right corner switches the theme: **System** (default, follows the OS), **Light** or **Dark**. The choice is saved in a cookie, so the page renders in the right theme on the first paint. The email preview keeps the email's own colors: it shows what the recipient will see. ![Dark theme with the theme menu open](docs/screenshots/app-theme-menu-dark.png) -The tree, the Elements library and the modals follow the theme too. +The pages, the tree, the Elements library and the modals follow the theme too. + +![Templates list in the dark theme](docs/screenshots/app-templates-dark.png) ![Template tree and Elements library in the dark theme](docs/screenshots/app-tree-and-elements-dark.png) ![Edit element modal in the dark theme](docs/screenshots/app-edit-element-dark.png) +![A sent email in the dark theme](docs/screenshots/app-sent-email-dark.png) + ### Regenerating the screenshots -Start the backend on `:9000` with the sample `db.json` and run `npm run dev`. Then open the sample template from `/templates` and capture the editor at 1440×900 (device scale 2) with the `theme` cookie set to `light`: the overview, the preview scrolled to the first recipe row, both panels expanded (capture the panels only), and the **edit** modal of `{{recipeCard}}`. Repeat with `theme=dark` for the theme menu open, the panels and the edit modal (`-dark` suffix). Hide the Next.js dev badge before you capture. +1. Start the backend with a copy of the sample `db.json` (`DB_FILE=/tmp/db.json npm run dev`), so the extra data does not end up in the repo. Run `npm run dev` here. +2. Through the API, create two more templates ("Spring newsletter", "Welcome email") and send the sample template three times (`POST /templates/:id/send`), one of them to five recipients. +3. Capture at 1440×900, device scale 2, with the `theme` cookie set to `light` and the Next.js dev badge hidden: + - `/templates`; + - the editor of the sample template; + - the preview scrolled to the first recipe row; + - both panels expanded (capture the panels only, with a viewport tall enough to fit them); + - the **edit** modal of `{{recipeCard}}`; + - the **Send email** dialog with two recipients; + - `/sent`; + - `/sent` with the five-recipient email open. +4. Repeat with `theme=dark` (`-dark` suffix) for: + - the theme menu open in the editor; + - `/templates`; + - the panels; + - the edit modal; + - the open sent email. ## How it works diff --git a/docs/screenshots/app-edit-element-dark.png b/docs/screenshots/app-edit-element-dark.png index 7f44a7d..53ab70d 100644 Binary files a/docs/screenshots/app-edit-element-dark.png and b/docs/screenshots/app-edit-element-dark.png differ diff --git a/docs/screenshots/app-edit-element.png b/docs/screenshots/app-edit-element.png index 7cb372c..16b49d9 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 index 08ba7bd..10c0729 100644 Binary files a/docs/screenshots/app-overview.png and b/docs/screenshots/app-overview.png differ diff --git a/docs/screenshots/app-preview-recipes.png b/docs/screenshots/app-preview-recipes.png index 46b5cf0..2c7ee21 100644 Binary files a/docs/screenshots/app-preview-recipes.png and b/docs/screenshots/app-preview-recipes.png differ diff --git a/docs/screenshots/app-send-email.png b/docs/screenshots/app-send-email.png new file mode 100644 index 0000000..9d07340 Binary files /dev/null and b/docs/screenshots/app-send-email.png differ diff --git a/docs/screenshots/app-sent-email-dark.png b/docs/screenshots/app-sent-email-dark.png new file mode 100644 index 0000000..65a5a50 Binary files /dev/null and b/docs/screenshots/app-sent-email-dark.png differ diff --git a/docs/screenshots/app-sent-email.png b/docs/screenshots/app-sent-email.png new file mode 100644 index 0000000..41dacff Binary files /dev/null and b/docs/screenshots/app-sent-email.png differ diff --git a/docs/screenshots/app-sent-emails.png b/docs/screenshots/app-sent-emails.png new file mode 100644 index 0000000..8cace19 Binary files /dev/null and b/docs/screenshots/app-sent-emails.png differ diff --git a/docs/screenshots/app-templates-dark.png b/docs/screenshots/app-templates-dark.png new file mode 100644 index 0000000..f0e0f8a Binary files /dev/null and b/docs/screenshots/app-templates-dark.png differ diff --git a/docs/screenshots/app-templates.png b/docs/screenshots/app-templates.png new file mode 100644 index 0000000..bf671d8 Binary files /dev/null and b/docs/screenshots/app-templates.png differ diff --git a/docs/screenshots/app-theme-menu-dark.png b/docs/screenshots/app-theme-menu-dark.png index af033b4..c73046c 100644 Binary files a/docs/screenshots/app-theme-menu-dark.png and b/docs/screenshots/app-theme-menu-dark.png differ diff --git a/docs/screenshots/app-tree-and-elements-dark.png b/docs/screenshots/app-tree-and-elements-dark.png index ab56df1..9664250 100644 Binary files a/docs/screenshots/app-tree-and-elements-dark.png and b/docs/screenshots/app-tree-and-elements-dark.png differ diff --git a/docs/screenshots/app-tree-and-elements.png b/docs/screenshots/app-tree-and-elements.png index 5cfc617..ec54c72 100644 Binary files a/docs/screenshots/app-tree-and-elements.png and b/docs/screenshots/app-tree-and-elements.png differ