feat: add registration confirmation email template #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "8-registration-confirmation-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
New MJML template for player registration confirmation emails. Uses shared partials (head, header, footer) for brand consistency. Includes player details card, credentials block injection point, and profile management CTA.
Changes
src/registration-confirmation.mjml-- new template with greeting, player details card (division, position, height, grad_class), credentials_block slot, red CTA button, sign-in link, and Coach Marcus contact infosample-data/registration-confirmation.json-- sample data for preview/testingTest Plan
npm testpasses (10/10) -- compilation, build output, placeholder markers, DRY verificationReview Checklist
Related Notes
None.
Related
Closes #8
PR #9 Review
DOMAIN REVIEW
Tech stack: MJML email templates with Mustache-style placeholders, npm test suite, sample data JSON.
Brand consistency: Verified against the existing jersey-reminder template (PRs #2, #5, #6). Color tokens are consistent:
#141414body sections,#0a0a0acard background,#c41230accent/CTA,#333card borders,#f0f0f0body text,#a0a0a0secondary text. Card component pattern (background-color="#0a0a0a" border-radius="8px" border="1px solid #333" padding="20px") matches exactly. CTA button styling matches.Shared partials: Correctly uses
mj-includefor head, header, and footer -- no inline duplication of brand elements.Placeholder completeness: All 10 placeholders (
parent_name,player_name,tenant_name,division,position,height,grad_class,profile_url,frontend_url,credentials_block) are present in both the MJML template and sample data JSON. Sample data has appropriate test values for all fields.Sample data: No real PII. Names are clearly fictitious. Tailscale hostname is the standard production domain used across the org.
credentials_blockis correctly empty (populated at send time by the API).Security:
credentials_blockis a raw HTML injection point by design -- the calling API (basketball-api) is responsible for sanitizing this content. No secrets, API keys, or real credentials in the committed files.BLOCKERS
None.
The test suite (10/10 per PR body) covers compilation, placeholder verification, and DRY checks. The existing test infrastructure appears to automatically cover new templates, so no new test file is needed. No unvalidated user input in the template layer itself (rendering is the API's responsibility). No secrets committed.
NITS
Hardcoded phone number (line 88 of MJML):
(385) 450-9963is hardcoded directly in the template. The jersey-reminder template uses "reply to this email" instead. If this number appears in future templates too, consider extracting it to a partial to avoid update-everywhere maintenance. Low risk for now with only two templates.frontend_urlnot hyperlinked (line 79-81): The "Sign in anytime at{{frontend_url}}" text renders the URL as plain text. Consider wrapping it in an<a>tag so email clients render it as a clickable link:<a href="{{frontend_url}}" style="color: #c41230;">{{frontend_url}}</a>. Some email clients auto-link URLs, but not all.Empty
credentials_blockrenders empty space: Whencredentials_blockis empty string (the common case for returning players), the credentials section still renders as a 16px-padded empty block. Minor visual gap. Consider conditionally rendering this section at the API layer, or documenting that the API should omit the placeholder entirely when not needed.SOP COMPLIANCE
8-registration-confirmation-templatefollows{issue-number}-{kebab-case-purpose}PROCESS OBSERVATIONS
Clean, focused PR. Two files, 109 lines, single concern. Template follows established patterns from the jersey-reminder template with no divergence in brand tokens or component structure. Test infrastructure automatically validates new templates, which is a good architectural choice for this repo. The
credentials_blockinjection pattern is a reasonable design for composable email content -- just ensure the basketball-api side sanitizes what it injects.VERDICT: APPROVED