rdev/internal/adapter
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
..
cached feat: Implement hexagonal architecture with services, webhooks, queue, and telemetry 2026-01-25 19:57:46 -07:00
citadel feat: add GCS-based persistent media storage, AI generation pipeline, and composable skeleton packages 2026-02-19 21:29:09 -07:00
claudebox refactor: add timeout constants for agent execution tiers 2026-02-11 10:48:24 -07:00
cloudflare feat: add auth scopes, OpenAPI docs, SDLC guides, and code quality improvements 2026-02-02 13:55:50 -07:00
cockroach chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
codeagent fix(worker): include stdout in error messages when Claude command fails 2026-02-10 17:55:46 -07:00
deployer feat: add GCS-based persistent media storage, AI generation pipeline, and composable skeleton packages 2026-02-19 21:29:09 -07:00
gcs fix(templates): upgrade Go to 1.25 and fix Woodpecker syntax 2026-02-08 23:57:38 -07:00
gitea chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
kubernetes feat(sessions): add command execution endpoint and activity tracking 2026-02-13 08:41:05 -07:00
memory feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
notify feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
postgres feat: implement project access enforcement and management API 2026-02-21 15:38:37 -07:00
redis chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
sdlc refactor: add timeout constants for agent execution tiers 2026-02-11 10:48:24 -07:00
templates feat: add HTML email template system to skeleton service component 2026-02-21 22:44:59 -07:00
woodpecker chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00
zot chore: accumulated platform hardening and CI fixes 2026-02-10 23:16:56 -07:00