Replaces the four legacy PHP scripts under email.notifications/send*.php with a single NestJS module. Four jobs (outstanding payments, payment confirmations, account-status alerts with day-of-week gates, trust payment confirmations) share one MailService modelled on StorageService: env-driven SES client, null fallback in dev with console logging, refuses to send in production when unconfigured. Schema adds email_notification_log (every attempt, sent/failed/skipped) and account_status_history (one row per threshold hit, Job 3). Enums encode the legacy wire shape so external log scrapers keep parsing notificationType keys verbatim. Web adds /notificaciones with four trigger cards, a flags panel, and a paginated log browser. New notification:send ability gates all four endpoints at MANAGER, matching the renewal:send trust tier.
53 lines
2.2 KiB
Bash
53 lines
2.2 KiB
Bash
# Copy to .env and fill in for local development.
|
|
DATABASE_URL=mysql://jorgecuadros:jorgecuadros@localhost:3306/jorgecuadros
|
|
SESSION_SECRET=change-me-to-a-random-string
|
|
WEB_ORIGIN=http://localhost:3000
|
|
NEXT_PUBLIC_API_ORIGIN=http://localhost:3001
|
|
|
|
# Object storage (MinIO / S3) for document blobs and scanned receipt pages.
|
|
# Without S3_ENDPOINT + credentials the API still boots, but every document
|
|
# upload/download and the whole recibo OCR intake are disabled. Credentials fall
|
|
# back to MINIO_ROOT_USER / MINIO_ROOT_PASSWORD when the S3_* pair is unset.
|
|
S3_ENDPOINT=http://localhost:9000
|
|
S3_BUCKET=jorgecuadros-documents
|
|
S3_ACCESS_KEY=
|
|
S3_SECRET_KEY=
|
|
|
|
# Login the "Operaciones" screen runs mysqldump/mysql as. Optional locally: when
|
|
# unset it falls back to the DATABASE_URL credentials, which a dev MySQL usually
|
|
# grants enough for. Required in any deployment, where the application user has
|
|
# only ALL ON jorgecuadros.* and mysqldump --single-transaction needs the global
|
|
# RELOAD privilege. Host/port/database always come from DATABASE_URL.
|
|
OPS_DB_ADMIN_USER=
|
|
OPS_DB_ADMIN_PASSWORD=
|
|
|
|
# Company info — printed in the header of every report (PDF + browser
|
|
# print). Leave blank to use the placeholders. COMPANY_LOGO_PATH is
|
|
# optional; when unset the API falls back to apps/api/assets/company_logo.png.
|
|
COMPANY_NAME=Jorge Cuadros & Asociados
|
|
COMPANY_ADDRESS_LINE1=
|
|
COMPANY_ADDRESS_LINE2=
|
|
COMPANY_CITY_STATE=
|
|
COMPANY_PHONE=
|
|
COMPANY_EMAIL=
|
|
COMPANY_TAX_ID=
|
|
COMPANY_WEBSITE=
|
|
COMPANY_LOGO_PATH=
|
|
|
|
# Outbound mail (Amazon SES — the channel the office already uses for bulk
|
|
# notification, see docs/MASS_EMAIL_NOTIFICATIONS.md). Without all four
|
|
# vars the API still boots; in dev the MailService logs sends to stdout,
|
|
# in production every send throws ServiceUnavailableException.
|
|
SES_REGION=
|
|
SES_ACCESS_KEY=
|
|
SES_SECRET_KEY=
|
|
SES_FROM=mail@jorgecuadros.com
|
|
SES_FROM_NAME=Information Server
|
|
# Optional — bounce/complaint event publishing configuration set.
|
|
SES_CONFIGURATION_SET=
|
|
|
|
# Comma-separated addresses that receive the per-job admin summary email
|
|
# (one summary per address, JSON body, sent after every sweep). Defaults to
|
|
# the legacy pair if unset.
|
|
NOTIFICATION_ADMIN_EMAILS=rmancinas@freakma.net,mpulido@freakma.net
|