feat: MJML sponsor-outreach email template #320

Open
opened 2026-04-03 23:50:16 +00:00 by forgejo_admin · 0 comments

Type

Feature

Lineage

Child of basketball-api#316 (sponsor outreach system). Independent — different file set, no code dependencies.

Repo

forgejo_admin/basketball-api

User Story

As an admin,
I want a branded sponsor outreach email template,
So that sponsorship emails match the Westside Kings & Queens brand.

Context

Marcus has been sending plain text sponsor emails. We need one MJML template that renders to inline HTML for email client compatibility. The template uses the existing load_email_template() system — compiled HTML with {{placeholder}} replacement.

The template lives at ~/westside-email-templates/ (hostPath mounted into the basketball-api pod). Source MJML compiles to HTML in the compiled/ directory. Existing templates: action.html, announcement.html, jersey-reminder.html, notification.html.

File Targets

Files the agent should create:

  • src/sponsor-outreach.mjml — MJML source template
  • compiled/sponsor-outreach.html — compiled output

Files the agent should reference for style:

  • src/brand.mjml — shared brand include (colors, logo)
  • compiled/jersey-reminder.html — reference for existing template style
  • compiled/announcement.html — reference for layout patterns

Files the agent should NOT touch:

  • Any existing compiled templates
  • Any basketball-api code

Acceptance Criteria

  • sponsor-outreach.mjml exists with Westside branding (red/black, WKQ logo)
  • Placeholders: {{business_name}}, {{pitch}}, {{sender_name}}, {{sender_phone}}, {{sponsorship_tiers}}
  • {{sponsorship_tiers}} renders as a formatted pricing table when populated (Title $5K+, Elite $2.5K, Team $1K, Social $500, Player $300-$1.2K), or is invisible when empty string
  • Compiles to valid inline HTML via mjml CLI
  • Email structure: header with logo → greeting with business_name → pitch paragraph → optional tiers block → closing with sender name/phone → footer
  • Renders correctly in Gmail (table-based layout, inline styles)

Test Expectations

  • Manual: compile with npx mjml src/sponsor-outreach.mjml -o compiled/sponsor-outreach.html
  • Manual: open compiled HTML in browser, verify layout
  • Manual: test placeholder replacement produces valid HTML

Constraints

  • Follow existing MJML patterns in the repo (see brand.mjml, jersey-reminder source if available)
  • Westside brand colors: red (#C41E3A), black (#1a1a1a), white (#ffffff)
  • Logo URL: use same logo URL as other templates
  • No Jinja2 or template engines — literal {{key}} placeholders only

Checklist

  • PR opened
  • Compiles without errors
  • No unrelated changes
  • basketball-api#316 — parent epic
### Type Feature ### Lineage Child of basketball-api#316 (sponsor outreach system). Independent — different file set, no code dependencies. ### Repo `forgejo_admin/basketball-api` ### User Story As an admin, I want a branded sponsor outreach email template, So that sponsorship emails match the Westside Kings & Queens brand. ### Context Marcus has been sending plain text sponsor emails. We need one MJML template that renders to inline HTML for email client compatibility. The template uses the existing `load_email_template()` system — compiled HTML with `{{placeholder}}` replacement. The template lives at `~/westside-email-templates/` (hostPath mounted into the basketball-api pod). Source MJML compiles to HTML in the `compiled/` directory. Existing templates: action.html, announcement.html, jersey-reminder.html, notification.html. ### File Targets Files the agent should create: - `src/sponsor-outreach.mjml` — MJML source template - `compiled/sponsor-outreach.html` — compiled output Files the agent should reference for style: - `src/brand.mjml` — shared brand include (colors, logo) - `compiled/jersey-reminder.html` — reference for existing template style - `compiled/announcement.html` — reference for layout patterns Files the agent should NOT touch: - Any existing compiled templates - Any basketball-api code ### Acceptance Criteria - [ ] `sponsor-outreach.mjml` exists with Westside branding (red/black, WKQ logo) - [ ] Placeholders: `{{business_name}}`, `{{pitch}}`, `{{sender_name}}`, `{{sender_phone}}`, `{{sponsorship_tiers}}` - [ ] `{{sponsorship_tiers}}` renders as a formatted pricing table when populated (Title $5K+, Elite $2.5K, Team $1K, Social $500, Player $300-$1.2K), or is invisible when empty string - [ ] Compiles to valid inline HTML via `mjml` CLI - [ ] Email structure: header with logo → greeting with business_name → pitch paragraph → optional tiers block → closing with sender name/phone → footer - [ ] Renders correctly in Gmail (table-based layout, inline styles) ### Test Expectations - [ ] Manual: compile with `npx mjml src/sponsor-outreach.mjml -o compiled/sponsor-outreach.html` - [ ] Manual: open compiled HTML in browser, verify layout - [ ] Manual: test placeholder replacement produces valid HTML ### Constraints - Follow existing MJML patterns in the repo (see brand.mjml, jersey-reminder source if available) - Westside brand colors: red (#C41E3A), black (#1a1a1a), white (#ffffff) - Logo URL: use same logo URL as other templates - No Jinja2 or template engines — literal `{{key}}` placeholders only ### Checklist - [ ] PR opened - [ ] Compiles without errors - [ ] No unrelated changes ### Related - basketball-api#316 — parent epic
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#320
No description provided.