trails/openspec/changes/transactional-emails/tasks.md
Ullrich Schäfer c7c1c275df
Add 8 proposed changes and old trails analysis
Proposed changes (all with proposal, design, specs, tasks):
- app-navigation (9 tasks) — nav bars for both apps
- planner-landing-page (7 tasks) — standalone landing page
- planner-multiplayer-awareness (13 tasks) — participants, cursors, names
- changelog (13 tasks) — public changelog with "what's new"
- transactional-emails (15 tasks) — magic link + welcome emails
- planner-features (18 tasks) — no-go areas, notes, recovery, rate limits
- komoot-import (23 tasks) — Komoot tour import
- route-features (37 tasks) — sharing, multi-day, spatial, photos

Also adds docs/old-trails-analysis.md with feature analysis from the
older trails project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 03:57:20 +01:00

30 lines
1.5 KiB
Markdown

## 1. Email Infrastructure
- [ ] 1.1 Add `resend` package to Journal dependencies
- [ ] 1.2 Create `apps/journal/app/lib/email.server.ts` with sendEmail(to, subject, html, text) — uses Resend in production, logs to console in dev
- [ ] 1.3 Add `RESEND_API_KEY` env var to docker-compose.yml
- [ ] 1.4 Write unit test for sendEmail (mock Resend, verify dev-mode logging)
## 2. Email Templates
- [ ] 2.1 Create magicLinkTemplate(link: string) returning { html, text } — includes link, 15-min expiry note, trails.cool branding
- [ ] 2.2 Create welcomeTemplate(username: string) returning { html, text } — greeting, what they can do, link to routes
- [ ] 2.3 Wire sendMagicLink(email, link) and sendWelcome(email, username) helper functions
## 3. Integration
- [ ] 3.1 Update api.auth.login.ts: call sendMagicLink in production instead of just logging
- [ ] 3.2 Update registration flow: call sendWelcome after successful passkey registration
- [ ] 3.3 Verify dev mode still works (devLink returned, no email sent)
## 4. Privacy & Config
- [ ] 4.1 Update /privacy page: document email sending, provider (Resend), what data is shared
- [ ] 4.2 Add `RESEND_API_KEY` to CD secrets and deploy documentation
- [ ] 4.3 Document sender domain DNS setup (DKIM/SPF for noreply@trails.cool)
## 5. Verify
- [ ] 5.1 Test magic link email delivery locally with Resend test API key
- [ ] 5.2 Test welcome email on registration
- [ ] 5.3 Verify existing E2E tests still pass (dev mode unchanged)