Commit graph

15 commits

Author SHA1 Message Date
DJP
31358a8b86 fix: Repair Top Agents tab after LibreChat transaction shape change
LibreChat stopped tagging agent transactions with model: agent_xxx around
2026-03; new agent transactions record the underlying LLM and link to the
message via messageId. Aggregate from messages -> transactions and union
with the legacy path so historical and current data both show.

Also create createdAt / messageId / (createdAt, model) indexes on startup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 17:08:26 -04:00
DJP
1673694b11 feat: Add User Lookup tab with search and full user workup
New tab lets you search for any user by name or email, then shows:
- Summary cards (cost, tokens, conversations, visits) for the period
- All their conversations with titles, models, and cost breakdown
- Model usage breakdown with prompt/completion split
- CSV export of the full user report

Two new API endpoints: /api/search-users and /api/user-detail

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:09:43 -04:00
DJP
31a70bbef2 fix: Add cache-busting to API fetch calls
Prevents browser from caching API responses when changing date ranges,
which caused stat cards to show stale data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:07:03 -04:00
DJP
3d3c8a1a54 feat: Add Visits and Unique Users cards to overview
Visits counts total conversations created in the timeframe (from
conversations collection). Unique Users counts distinct users who
created at least one conversation in the period.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:48:46 -04:00
DJP
e74f21d57e feat: Add Conversations tab with user drill-down
New tab showing most expensive conversations with title, user, models,
and token breakdown. Clicking a user name in the Users tab filters
conversations to that user. Includes CSV export.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 15:16:49 -04:00
DJP
d25c21d781 docs: Add migration guide for moving LibreChat install to /opt
Step-by-step guide for relocating LibreChat from a user's home directory
to /opt/LibreChat, with data location mapping and rollback instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:24:32 -04:00
DJP
80a7e0ecee feat: Add CSV export buttons to all dashboard tabs
Each tab now has an Export CSV button that downloads the currently
displayed data as a CSV file, respecting the active time filter.
Exports: usage-over-time, top-users, top-models, top-agents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:42:16 -04:00
DJP
203ba7197e docs: Add ASCII architecture and data flow diagrams
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:44:20 -04:00
DJP
a7d5f39472 docs: Add detailed cost calculation explanation and verified pricing tables
Explains how LibreChat calculates tokenValue, how the dashboard reads it,
and includes verified pricing tables for Claude, OpenAI, and Gemini models.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:41:36 -04:00
DJP
ebf81ae48f docs: Rewrite README with full install guide, nginx setup, and troubleshooting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:12:38 -04:00
DJP
dea8207620 fix: Add librechat_default as external network in docker-compose
Removes need for manual docker network connect after each rebuild.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:13:10 -04:00
DJP
367ea56b34 fix: Use relative base path for API calls behind nginx proxy
When served at /librechat-analytics/, API calls now correctly
target /librechat-analytics/api/ instead of /api/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:08:37 -04:00
DJP
4564a23f99 fix: Check API key auth before loading dashboard data
Auth prompt now fires before any data fetch, preventing silent 401 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:02:07 -04:00
DJP
62749a8246 docs: Add README with install guide and deployment instructions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:50:05 -04:00
DJP
65824fc3b3 Initial commit: LibreChat Analytics Dashboard
Express.js + Chart.js dashboard for LibreChat usage analytics.
Queries MongoDB transactions collection for model/agent usage, costs, and top users.
Dark theme with Montserrat font, black/gold (#FFC407) color scheme.
Docker-ready with API key authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:48:40 -04:00