Commit 03a5820
committed
feat(email): move email templates into their own package
Pull all email HTML out of the backend and into a standalone
`@docs.plus/email-templates` package — one place for every email
the app sends.
What changed:
Created
- 5 email template files (.eta) for notifications, digests,
new-document alerts, and the unsubscribe page
- Shared styles (colors, spacing, fonts) so every email looks
consistent without copy-pasting
- Reusable building blocks (avatars, buttons, footer links)
- Template engine (eta, 2KB) that compiles once and stays fast
Moved
- Supabase auth templates (magic-link, change-email-address) to
hocuspocus.server/templates/ where they belong
Cleaned up
- Removed ~950 lines of scattered HTML from the backend
- Backend now calls simple render functions from the new package
- Added 49 tests covering every template and input escaping
Also fixed lint-staged to not warn about ESLint-ignored files
(--no-warn-ignored) which affected all test files.1 parent 000b9a1 commit 03a5820
File tree
25 files changed
+2360
-956
lines changed- packages
- email-templates
- src
- __tests__
- __snapshots__
- templates
- hocuspocus.server
- src
- api
- lib/email
- templates
25 files changed
+2360
-956
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments