feat: MJML email template system with jersey reminder template #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
Lineage
plan-wkq-> Phase 11 (Girls Tryout) -> discovered scope -> new capability. Parent issue: basketball-api#134.Repo
forgejo_admin/westside-emailsUser Story
As an admin
I want branded email templates decoupled from API code
So that copy changes don't require code changes, PRs, or deploys
Context
Current email system embeds 825 lines of inline-CSS HTML inside Python f-strings in basketball-api's services/email.py. Every copy change requires a code change, PR, and deploy. MJML enables semantic markup that compiles to battle-tested inline-CSS HTML for Gmail, Outlook, and Apple Mail. Templates are decoupled from API code -- basketball-api loads compiled HTML and does simple string replacement at send time.
File Targets
Files to create:
package.json-- mjml dependency and build/preview scriptsscripts/build.js-- node script to compile src/.mjml to dist/.htmlsrc/base-layout.mjml-- shared Westside brand wrapper (header with logo, footer, brand colors)src/jersey-reminder.mjml-- girls jersey ordering reminder templatesample-data/jersey-reminder.json-- sample data for previewpreview/index.html-- loads compiled HTML with sample data for visual check.gitignore-- ignore node_modules and distAcceptance Criteria
npm run buildcompiles MJML to HTML indist/dist/jersey-reminder.htmlrenders branded email with placeholder markers in browser{{variable}}literal markers for simple string replacementTest Expectations
npm run buildexits 0 with valid HTML outputdist/jersey-reminder.htmlcontains expected placeholder markersnpm run build && open preview/index.htmlConstraints
{{variable}}markers are literal strings in compiled HTMLChecklist
Related
project-westside-basketball-- project this affects