rdev/internal
jordan 27e6cfd42b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: add HTML email template system to skeleton service component
Every project generated from the skeleton now ships with styled,
production-ready transactional emails out of the box.

New pkg/email package:
- Renderer: loads templates from caller-provided embed.FS, inlines CSS via
  douceur at startup, derives plain text via goquery for multipart delivery
- DevHandler: live browser preview at GET /dev/emails and /dev/emails/{purpose}
  (development only, never mounted in production)
- CSSInlineErr field on RenderedEmail so callers can log degraded renders

New service component templates:
- internal/email/embed.go.tmpl — embeds template FS (uses all: prefix for _*.html)
- internal/email/renderer_test.go.tmpl — 9 tests covering all purposes + brand injection
- internal/email/templates/ — 5 HTML email types (login_otp, email_verify,
  magic_link, password_reset, welcome) + 5 shared partials (_layout, _header,
  _footer, _button, _code_box)

Updated service component templates:
- config.go.tmpl — brand fields: AppName, AppURL, SupportEmail, LogoURL, BrandColor
- main.go.tmpl — wires renderer at startup, logs template count
- routes.go.tmpl — mounts /dev/emails in development; EmailRenderer in Dependencies
- notify.go.tmpl — renders HTML before sending; warns on CSS inlining failure
- go.mod.tmpl — adds douceur, goquery, gorilla/css, andybalholm/cascadia

Deleted: internal/adapter/email/helpers.go.tmpl (replaced by meta.yaml + renderer)

Fix: template directory named email_verify (matching domain.PurposeEmailVerify)
rather than verify_email — the mismatch caused all verification emails to fail
with "unknown email purpose" at send time while tests passed (tests called
Render directly with the wrong name).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 22:44:59 -07:00
..
adapter feat: add HTML email template system to skeleton service component 2026-02-21 22:44:59 -07:00
auth feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
circuitbreaker chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
claudebox fix(git): harden git flow for concurrent SDLC stress test failures 2026-02-10 20:57:27 -07:00
cmdlimit feat: Add CI pipeline proxy, DNS alias management, and worker executor system 2026-01-27 21:05:28 -07:00
db feat: add GCS-based persistent media storage, AI generation pipeline, and composable skeleton packages 2026-02-19 21:29:09 -07:00
domain feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
envutil feat: implement composable monorepo template system with component architecture 2026-01-31 19:11:42 -07:00
handlers feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
logging fix(logging): implement http.Flusher on responseWriter for SSE streaming 2026-02-09 13:23:42 -07:00
metrics feat(saga): implement enterprise-grade resilience architecture 2026-02-08 01:58:02 -07:00
middleware feat: Add CI pipeline proxy, DNS alias management, and worker executor system 2026-01-27 21:05:28 -07:00
port feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
ratelimit feat: Add CI pipeline proxy, DNS alias management, and worker executor system 2026-01-27 21:05:28 -07:00
sanitize feat: Add claude-config API, security hardening, and testing infrastructure 2026-01-25 01:29:13 -07:00
sdlc refactor: add timeout constants for agent execution tiers 2026-02-11 10:48:24 -07:00
service feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
telemetry fix: Use FQDN for k8s service hostnames and remove broken commonLabels 2026-01-31 20:46:04 -07:00
testutil feat: Implement hexagonal architecture with services, webhooks, queue, and telemetry 2026-01-25 19:57:46 -07:00
validate feat: Add CI pipeline proxy, DNS alias management, and worker executor system 2026-01-27 21:05:28 -07:00
webhook chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
worker refactor: add timeout constants for agent execution tiers 2026-02-11 10:48:24 -07:00