From 19f22102dffc3383adb0a3802676655f87db749c Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Thu, 13 Aug 2026 15:13:08 +0200 Subject: [PATCH] feat(mail): use branded HTML template with personalized greeting (Gitea #21) GDPR export emails were unstyled HTML with a bare "Hallo," greeting. Adds a landing-page-branded email shell (orange gradient header, paw wordmark) and pulls the owner's first name from their Clerk profile for the salutation, falling back to "Hallo," when unavailable. Co-Authored-By: Claude Sonnet 5 --- CLAUDE.md | 10 ++++ src/lib/mail-template.ts | 102 ++++++++++++++++++++++++++++++++++++++ src/trpc/routers/admin.ts | 12 ++++- 3 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 src/lib/mail-template.ts diff --git a/CLAUDE.md b/CLAUDE.md index 5dbfff8..4096da1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -102,3 +102,13 @@ Despite `next.config.ts`'s `output: "standalone"` and the original stack researc - `pentest-ai-agents/` — a separately-cloned plugin repo (has its own `.git`) sitting inside this project root. Unrelated to PawFeed; don't treat its `agents/`, `commands/`, `db/` as part of the app. - `scaffold-tmp/` — leftover `create-next-app` scaffold from initial bootstrap (has its own `package.json`, `node_modules`, generic starter page). Not part of the running app, which lives under `src/`. + + + +# This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. + + diff --git a/src/lib/mail-template.ts b/src/lib/mail-template.ts new file mode 100644 index 0000000..15c3b37 --- /dev/null +++ b/src/lib/mail-template.ts @@ -0,0 +1,102 @@ +import "server-only"; + +/** + * Branded HTML shell for transactional emails, mirroring the landing page's + * orange gradient hero + paw-print wordmark (src/app/page.tsx) so PawFeed + * mail doesn't look like unstyled plaintext dumped into an HTML wrapper + * (Gitea report: "html plain" emails with a bare "Hallo," greeting). + * + * Table-based layout with inline styles throughout — email clients (Outlook + * especially) ignore most