Overview
The admin dashboard provides comprehensive billing management tools for LLM Gateway Enterprise. Access athttp://localhost:3006 or your configured ADMIN_URL.
Admin Dashboard Access
Authentication
The admin dashboard uses the same authentication system as the main application:- Navigate to
/loginin the admin dashboard - Sign in with admin credentials
- Only authenticated users can access admin features
URL Configuration
Organizations View
Organization List
View all organizations with key metrics:- Name - Organization name and ID
- Email - Billing email address
- Plan - Current subscription plan (free, pro, enterprise)
- Dev Plan - Developer plan tier (none, lite, pro, max)
- Credits - Current credit balance
- All Time Credits - Total credits ever added
- Total Spent - Total amount spent on the platform
- Created - Organization creation date
- Status - Active, inactive, or deleted
Search and Filter
Sorting
Sort organizations by:- Name
- Billing email
- Plan
- Dev plan
- Credits (current balance)
- Total credits (all time)
- Total spent
- Creation date
- Status
Organization Details
Metrics Dashboard
View detailed metrics for any organization:Time Windows
Analyze usage over different periods:- 1 hour - Real-time monitoring
- 4 hours - Recent activity
- 12 hours - Half-day view
- 1 day - Daily metrics (default)
- 7 days - Weekly trends
- 30 days - Monthly analysis
- 90 days - Quarterly review
- 365 days - Annual overview
Cost Breakdown
View detailed cost analysis:- Input cost - Prompt token costs
- Output cost - Completion token costs
- Cached cost - Cached token costs
- Total cost - Sum of all costs
- Discount savings - Amount saved with discounts
Credit Management
Gift Credits
Admins can grant free credits to organizations:Process
- Navigate to organization details
- Click “Gift Credits” button
- Enter credit amount (in USD)
- Add optional comment for internal tracking
- Confirm the gift
Transaction Record
Gifted credits create a transaction:Transaction History
View all financial transactions for an organization:Transaction Types
- subscription_start - New subscription created
- subscription_cancel - Subscription cancelled
- subscription_end - Subscription ended
- credit_topup - Credits purchased
- credit_refund - Credits refunded
- credit_gift - Credits gifted by admin
- dev_plan_start - Dev plan started
- dev_plan_upgrade - Dev plan upgraded
- dev_plan_downgrade - Dev plan downgraded
- dev_plan_cancel - Dev plan cancelled
- dev_plan_end - Dev plan ended
- dev_plan_renewal - Dev plan renewed
Subscription Management
View Subscriptions
See subscription details:- Stripe subscription ID
- Current plan (free, pro, enterprise)
- Billing cycle (monthly, yearly)
- Cancellation status
- Expiration date
Subscription Status
Manual Intervention
Admins can:- View Stripe subscription details
- Check payment history
- Investigate payment failures
- Resolve billing issues
Projects and API Keys
View Projects
See all projects for an organization:View API Keys
List all API keys:Project Metrics
View per-project analytics:- Request volume
- Token usage
- Cost breakdown
- Top models used
- Error rates
Request Logs
View detailed logs for project debugging:Team Members
View Members
See all organization members:Member Roles
- Owner - Full access including billing
- Admin - Manage projects and members
- Member - Use API keys and view analytics
- Viewer - Read-only access
User Management
Delete Users
Admins can delete user accounts:Confirmation Required
The admin dashboard requires confirmation:- Click delete button
- Enter user’s email to confirm
- Confirm deletion
Analytics and Reporting
Platform Metrics
View system-wide statistics:- Total organizations
- Total credits in circulation
- Revenue metrics
- Active subscriptions
- User growth
Charts and Visualizations
Built-in charts for:- Signups over time - User growth trends
- Revenue over time - Financial performance
- Token usage - Platform utilization
- Cost analysis - Spending patterns
Export Data
Export data for external analysis:Discount Management
View Discounts
See all discount codes and their usage:- Discount code
- Percentage or fixed amount
- Usage limits
- Expiration date
- Redemption count
Create Discounts
Create promotional discount codes:Provider Configuration
View Providers
Manage LLM provider settings:- Enabled/disabled status
- Rate limits
- Default API keys
- Model availability
Model Configuration
Configure model settings:- Pricing per token
- Availability by plan
- Context window limits
- Feature flags
Security and Audit
Admin Actions
All admin actions are logged:Audit Trail
View audit logs for compliance:- Who performed the action
- What action was taken
- When it occurred
- Which resources were affected
- Additional context
API Endpoints
Admin dashboard uses these API routes:Organizations
Projects
Users
Metrics
Best Practices
Regular Monitoring
- Check platform metrics daily
- Monitor for unusual spending patterns
- Review failed payments
- Track user growth
Credit Management
- Document all credit gifts
- Use descriptive comments
- Set spending alerts
- Review credit usage trends
Support Workflow
- User reports issue
- Look up organization in admin dashboard
- Review metrics and logs
- Identify problem (e.g., insufficient credits)
- Take action (e.g., gift credits)
- Document resolution
Data Privacy
- Only access user data when necessary
- Follow data protection regulations
- Log all data access
- Minimize data exposure
Troubleshooting
Admin Dashboard Won’t Load
Can’t Gift Credits
- Verify organization exists
- Check credit amount is positive
- Ensure admin is authenticated
- Review API logs for errors
Metrics Not Loading
- Check database connection
- Verify time window is valid
- Review API response for errors
- Check for data in the log tables