feat: add email notification system (Brevo SMTP + N8N daily digest)
- Add core notification service: types, email-service (nodemailer/Brevo SMTP), notification-service (digest builder, preference CRUD, HTML renderer) - Add API routes: POST /api/notifications/digest (N8N cron, Bearer auth), GET/PUT /api/notifications/preferences (session auth) - Add NotificationPreferences UI component (Bell button + dialog with per-type toggles) in Registratura toolbar - Add 7 Brevo SMTP env vars to docker-compose.yml - Update CLAUDE.md, ROADMAP.md, DATA-MODEL.md, SYSTEM-ARCHITECTURE.md, CONFIGURATION.md, DOCKER-DEPLOYMENT.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -200,13 +200,26 @@ NEXT_PUBLIC_STORAGE_ADAPTER=localStorage
|
||||
# MINIO_BUCKET=architools
|
||||
|
||||
# ──────────────────────────────────────────
|
||||
# Authentication (future: Authentik SSO)
|
||||
# Authentication (Authentik SSO)
|
||||
# ──────────────────────────────────────────
|
||||
# AUTHENTIK_ISSUER=https://auth.internal
|
||||
# AUTHENTIK_CLIENT_ID=architools
|
||||
# AUTHENTIK_CLIENT_SECRET=<secret>
|
||||
|
||||
# ──────────────────────────────────────────
|
||||
# Email Notifications (Brevo SMTP)
|
||||
# ──────────────────────────────────────────
|
||||
BREVO_SMTP_HOST=smtp-relay.brevo.com
|
||||
BREVO_SMTP_PORT=587
|
||||
BREVO_SMTP_USER=<brevo-login>
|
||||
BREVO_SMTP_PASS=<brevo-smtp-key>
|
||||
NOTIFICATION_FROM_EMAIL=noreply@beletage.ro
|
||||
NOTIFICATION_FROM_NAME=ArchiTools
|
||||
NOTIFICATION_CRON_SECRET=<random-bearer-token>
|
||||
```
|
||||
|
||||
> **N8N cron setup:** Create a workflow with Cron node (`0 8 * * 1-5`), HTTP Request node (POST `https://tools.beletage.ro/api/notifications/digest`, header `Authorization: Bearer <NOTIFICATION_CRON_SECRET>`). The endpoint returns `{ success, totalEmails, errors, companySummary }`.
|
||||
|
||||
### Variable Scoping Rules
|
||||
|
||||
| Prefix | Available In | Notes |
|
||||
|
||||
Reference in New Issue
Block a user