Audit and formalize contract offer email into MJML pipeline #3

Open
opened 2026-03-29 18:38:35 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Feature

Lineage

Standalone — discovered during girls contract rollout (2026-03-29). Contract offer emails were sent via ad-hoc Python script with inline HTML decoded from a previous boys email. Works but not sustainable.

Repo

forgejo_admin/westside-emails

User Story

As an admin,
I want all outbound emails to use the MJML template system in westside-emails,
So that branding is consistent, templates are version-controlled, and future programs can reuse them without ad-hoc scripts.

Context

The westside-emails repo currently has only base-layout.mjml and jersey-reminder.mjml. No contract offer template exists. Boys and girls contract offer emails were sent with inline HTML via Gmail API scripts. Queens pink (#e91e8c) was hardcoded. The basketball-api has send_contract_signed_email but no send_contract_offer_email. This ticket formalizes the email pipeline so all future Westside emails (contracts, announcements, reminders) go through MJML.

File Targets

Files the agent should modify or create:

  • src/contract-offer.mjml — new template extending base-layout
  • src/base-layout.mjml — may need color variable support (kings red vs queens pink)
  • scripts/send-contract-offers.py — reusable send script using compiled templates

Files the agent should NOT touch:

  • src/jersey-reminder.mjml — existing template, unrelated

Acceptance Criteria

  • contract-offer.mjml template in repo extending base-layout
  • Template supports Kings (red #d42026) and Queens (pink #e91e8c) via variable
  • Template variables: parent_name, player_name, team_name, contract_url
  • Compiled HTML output matches current brand (dark bg, accent bar, CTA button)
  • Audit catalog: document which emails use MJML vs inline HTML

Test Expectations

  • Build: npm run build compiles contract-offer.mjml to dist/contract-offer.html
  • Visual: rendered HTML matches current sent emails (screenshot comparison)
  • Run command: npm run build && diff dist/contract-offer.html expected/

Constraints

  • Must use inline CSS only (email client compatibility)
  • Follow existing MJML patterns in base-layout.mjml
  • No external CSS references — everything inlined by MJML compiler

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • westside-basketball — project this affects
  • basketball-api services/email.py — downstream consumer of compiled templates
### Type Feature ### Lineage Standalone — discovered during girls contract rollout (2026-03-29). Contract offer emails were sent via ad-hoc Python script with inline HTML decoded from a previous boys email. Works but not sustainable. ### Repo `forgejo_admin/westside-emails` ### User Story As an admin, I want all outbound emails to use the MJML template system in westside-emails, So that branding is consistent, templates are version-controlled, and future programs can reuse them without ad-hoc scripts. ### Context The westside-emails repo currently has only `base-layout.mjml` and `jersey-reminder.mjml`. No contract offer template exists. Boys and girls contract offer emails were sent with inline HTML via Gmail API scripts. Queens pink (`#e91e8c`) was hardcoded. The basketball-api has `send_contract_signed_email` but no `send_contract_offer_email`. This ticket formalizes the email pipeline so all future Westside emails (contracts, announcements, reminders) go through MJML. ### File Targets Files the agent should modify or create: - `src/contract-offer.mjml` — new template extending base-layout - `src/base-layout.mjml` — may need color variable support (kings red vs queens pink) - `scripts/send-contract-offers.py` — reusable send script using compiled templates Files the agent should NOT touch: - `src/jersey-reminder.mjml` — existing template, unrelated ### Acceptance Criteria - [ ] `contract-offer.mjml` template in repo extending base-layout - [ ] Template supports Kings (red #d42026) and Queens (pink #e91e8c) via variable - [ ] Template variables: parent_name, player_name, team_name, contract_url - [ ] Compiled HTML output matches current brand (dark bg, accent bar, CTA button) - [ ] Audit catalog: document which emails use MJML vs inline HTML ### Test Expectations - [ ] Build: `npm run build` compiles contract-offer.mjml to dist/contract-offer.html - [ ] Visual: rendered HTML matches current sent emails (screenshot comparison) - Run command: `npm run build && diff dist/contract-offer.html expected/` ### Constraints - Must use inline CSS only (email client compatibility) - Follow existing MJML patterns in base-layout.mjml - No external CSS references — everything inlined by MJML compiler ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `westside-basketball` — project this affects - basketball-api `services/email.py` — downstream consumer of compiled templates
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
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
ldraney/westside-emails#3
No description provided.