Commit graph

5 commits

Author SHA1 Message Date
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
DJP
a9c514d5b1 Add history tracking and user history view
- All balance changes (top-ups, sets, bulk ops, request approvals)
  are now logged to data/history.json
- New "History" tab in admin sidebar
- Search by email to see all changes for a user with totals
- Partial name search shows matching users with summary stats
- Each entry shows action type, amount, source, OMG job #,
  resulting balance, and timestamp

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:33:08 -04:00
DJP
2cc8178a18 Add credit request system with public form and admin dashboard
- Public page at /request for users to submit top-up requests
  (email + OMG job number, no auth required)
- Admin "Requests" view with pending/processed/all filters
- Approve with preset amounts (5M/10M/20M) or reject
- Pending count badge in sidebar nav
- Request data stored in JSON file (data/requests.json)
- Data volume mounted for persistence across rebuilds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:43:42 -04:00
DJP
e94cf8f503 Add low balance users view with threshold filters
Shows users below 1M/2M/3M/4M/5M tokens with filter buttons.
Sorted lowest first so admins can quickly find and top up users
running low.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:11:02 -04:00
DJP
bbefb03c4b Initial commit - LibreChat Balance Manager
Admin dashboard for managing user token balances. View, search, top up, and bulk-manage credits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:51:25 -04:00