librechat-balances/services
DJP 81e18f8a73 Add email notifications with one-click approve/reject from email
When a user submits a credit request, an email is sent to all
configured NOTIFY_TO recipients with approve buttons (5M, 10M, 20M),
a custom amount option, and a reject button. Each button is a
signed HMAC-SHA256 webhook URL that expires after WEBHOOK_TTL_HOURS.

Clicking approve from email processes the top-up identical to the
admin dashboard — balance update, history log, request status change.
Double-approval protection prevents the same link from being used
twice. Portal approval still works alongside email approval.

New dependencies: nodemailer
New files: services/email.js, routes/webhooks.js
Modified: server.js, routes/requests.js, .env.example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:50:44 -04:00
..
balance.js Add low balance users view with threshold filters 2026-03-17 23:11:02 -04:00
email.js Add email notifications with one-click approve/reject from email 2026-03-27 09:50:44 -04:00
history.js Add history tracking and user history view 2026-03-23 13:33:08 -04:00
requests.js Add credit request system with public form and admin dashboard 2026-03-20 14:43:42 -04:00