feat(notifications+admin): SMS (Kavenegar) + Email (SMTP) channels & templates
Build backend images / build content-svc (push) Failing after 56s
Build backend images / build file-svc (push) Failing after 47s
Build backend images / build gateway (push) Failing after 1m0s
Build backend images / build identity-svc (push) Failing after 56s
Build backend images / build notification-svc (push) Failing after 11s
Build backend images / build render-svc (push) Failing after 4m5s
Build backend images / build studio-svc (push) Failing after 56s

Backend (notification-svc):
- channel_config table (per-tenant Kavenegar + SMTP settings) + migration 18
- sender pkg: Kavenegar SMS client + SMTP mailer (STARTTLS / implicit TLS), stdlib only
- endpoints: GET/PUT /v1/channels[/:channel], POST /v1/sms/send, POST /v1/email/send
  (template + {{var}} rendering); deliveries logged
- seeded 3 Persian email templates: welcome / account_verification / promotion
- gateway routes /v1/{channels,sms,email}/* → notification

Admin UI:
- /admin/messaging: SMS + Email provider config cards, test-send, email template editor
- nav link + fa/en labels

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-02 17:32:54 +03:30
parent e3f025cd2d
commit 507ac7e6a4
12 changed files with 735 additions and 2 deletions
+3
View File
@@ -139,6 +139,9 @@ func main() {
// ── Notification Service ──────────────────────────────────────────────────
v1.Any("/notifications/*path", apiRL, auth, notification.Handler())
v1.Any("/notification-templates/*path", apiRL, auth, notification.Handler())
v1.Any("/channels/*path", apiRL, auth, notification.Handler())
v1.Any("/sms/*path", apiRL, auth, notification.Handler())
v1.Any("/email/*path", apiRL, auth, notification.Handler())
log.Printf("gateway listening on :%s", port)
if err := r.Run(":" + port); err != nil {