Files
sase.tr/apps/api/.env.example
Semih Yesilyurt 1c79c18aff
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
feat(api): wire Novu lifecycle email triggers
Route all lifecycle/transactional emails through Novu
(api.bildirim.semih.ai, delivered via Postal). A framework-agnostic
client is shared by the NestJS API and the standalone BullMQ worker.

- welcome + referral on signup (better-auth user.create.after)
- email-verification + password-reset (auth.ts; token links never
  track-wrapped so the one-time token survives)
- referral-qualified / referral-reward to the referrer on qualification
- payment-success / payment-failed in the Stripe webhook handlers
- trial-ending + win-back via a new daily lifecycle-email cron (worker),
  idempotent via a 1-day endDate window (no sent-flag column)
- signed track.sase.tr CTA links when MAILTRACK_SECRET is set
- NOVU_* / APP_PUBLIC_URL / MAILTRACK_SECRET env added to config,
  validation, .env.example and both compose service blocks

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 01:30:39 +03:00

26 lines
1.0 KiB
Plaintext

NODE_ENV=development
PORT=4000
DATABASE_URL=postgresql://sase:YOUR_PASSWORD@127.0.0.1:5432/sase
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=YOUR_REDIS_PASSWORD
BETTER_AUTH_SECRET=YOUR_MIN_32_CHAR_RANDOM_SECRET
BETTER_AUTH_URL=http://localhost:4000
MINIO_ENDPOINT=http://127.0.0.1:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=YOUR_MINIO_PASSWORD
MINIO_BUCKET_NAME=sase-schemas
MINIO_PUBLIC_URL=https://storage.sase.tr/sase-schemas
MINIO_USE_SSL=false
CORS_ORIGIN=http://localhost:3000,https://v2.sase.tr
ML_PREDICTION_ENABLED=false
# Novu — lifecycle/transactional email automation (Tailscale-only; sends via Postal).
# Leave NOVU_API_KEY empty in dev → triggers are logged & skipped. Prod key: Bitwarden "Novu admin (bildirim.semih.ai)" → PROD_API_KEY
NOVU_API_URL=https://api.bildirim.semih.ai
NOVU_API_KEY=
# Public marketing-site origin for CTA targets
APP_PUBLIC_URL=https://sase.tr
# HMAC secret for signed track.sase.tr click links (Bitwarden "mailtrack tracking (track.sase.tr)"). Empty → no click tracking.
MAILTRACK_SECRET=