# Admin Dashboard

## System Overview Metrics

The Admin Dashboard is the first screen you see after logging in as an administrator. It provides a real-time snapshot of your entire MailTrixy instance through a set of summary cards at the top of the page.

Card | What It Shows
--- | ---
Total Users | Number of registered users across all plans, with a trend indicator (up/down vs. last period).
Active Subscriptions | Users currently on a paid plan, broken down by plan name.
Total Conversations | Cumulative conversations across all users and channels (email, WhatsApp, SMS, etc.).
AI Replies Today | Number of AI-generated replies sent today, with a comparison to yesterday.
Monthly Revenue | Total subscription revenue for the current month.
AI Spend Today | Total AI API costs incurred today across all providers.

## User Statistics

Below the summary cards, the dashboard displays user analytics:

- New registrations chart: A line graph showing daily new user registrations over the past 30 days.
- User growth rate: Percentage increase in total users compared to the previous month.
- Active users: Users who logged in within the past 7 days.
- Plan distribution: A pie chart showing how users are distributed across your subscription plans (Free, Basic, Pro, Enterprise, etc.).
- Top users by conversation volume: A ranked list of the most active users by number of conversations processed.

## Revenue Metrics

The revenue section provides financial insight for SaaS operators:

- Monthly Recurring Revenue (MRR): The total value of all active subscriptions, annualized for monthly display.
- Revenue trend: A bar chart showing monthly revenue over the past 12 months.
- Recent transactions: A table of the latest payment transactions with status (completed, pending, failed, refunded).
- Churn rate: Percentage of users who cancelled their subscription in the current period.
- Average Revenue Per User (ARPU): MRR divided by total paying users.
- Payment gateway breakdown: Revenue split by payment method (Stripe, PayPal, etc.).

## System Health Monitoring

The system health panel provides at-a-glance server and application status:

- Queue status: Number of pending, processing, and failed jobs in the queue. A high number of failed jobs indicates a problem.
- Disk usage: Current storage consumption with a warning threshold.
- Database size: Total database size and row counts for key tables.
- AI provider status: Real-time connectivity status for each configured AI provider (green = connected, red = error).
- Email sync status: Whether the IMAP/API sync workers are running and up to date.
- Last cron run: Timestamp of the most recent scheduled task execution. If this is stale, your cron job may not be configured correctly.

> Tip: If any system health indicator shows red, click on it for detailed error logs and troubleshooting suggestions.

## Quick Actions

The dashboard includes shortcut buttons for common administrative tasks:

- Create User: Opens the user creation form.
- Create Plan: Opens the subscription plan builder.
- Clear Cache: Flushes the application cache (useful after configuration changes).
- Run Queue Worker: Manually triggers the queue worker if it has stopped.
- System Update: Check for and apply MailTrixy updates.
- View Logs: Opens the application log viewer for debugging.